mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-09 14:55:47 +00:00
Covers PUT-1708, PUT-1709 and PUT-1743. Twelve routes, every one setting requireUserActor -- that option is what installs requireAuthGate, requireVerifiedAccount and requireNonAccessTokenGate, because server.ts derives `needsAuth` from the route options. Reads need it as much as writes: without an auth option a route gets no suspension check and admits access tokens, so a just-disabled member could still read the roster and a scoped third-party token could read the audit log. Authority is checked before anything observable. Validating the body first made POST /members answer 400 before 403, and resolving :username first turned the member routes into a global username-existence oracle. Provisioning applies the same username and email rules as signup rather than its own -- USERNAME_REGEX, USERNAME_MAX_LENGTH, RESERVED_USERNAMES and validator.isEmail, now exported from AuthController. Without them a workspace could mint accounts signup would refuse, claim unregistered reserved names, and mail arbitrary unvalidated addresses. Handle problems are 400 or 409 rather than a bare Error, which the server turns into a 500 and a deduped critical alarm -- an uppercase handle should not page on-call. Disable drops sessions through SessionStore.removeByUuid rather than a raw DELETE. The store invalidates every composite cache key; without that a disabled member kept authenticating from cache for the session TTL, which is exactly the "takes effect on the next request, not after a cache TTL" property disable is supposed to have. Revoking also preserves last_ip/last_user_agent, which the member-facing audit view reads. Audit writes live in TeamService at the point of each action rather than in the route, so a caller reaching the service directly cannot skip them, and the SQL lives in TeamStore. Audit reads map internal user ids to usernames, and remain readable by the owner after the workspace is soft-deleted -- otherwise the delete_team entry was written and immediately unreachable. teams_enabled gates route registration through an optional isEnabled() the server honours, so with it off the paths do not exist rather than existing and refusing. It does not gate DDL. TeamIsolation.http.test.ts asserts the negative the feature rests on: the workspace manages accounts and cannot read them, including through a full-access token and after the member is disabled. It asserts outcomes rather than the absence of an implicator.
46 lines
1.5 KiB
JSON
46 lines
1.5 KiB
JSON
{
|
|
"config_name": "oss-default",
|
|
"env": "dev",
|
|
"port": 4100,
|
|
"protocol": "http",
|
|
"domain": "puter.localhost",
|
|
"cookie_name": "puter_auth_token",
|
|
"jwt_secret_v2": "dev-jwt-secret-v2-change-me",
|
|
"url_signature_secret": "dev-url-signature-secret-change-me",
|
|
"allow_all_host_values": true,
|
|
"allow_no_host_header": true,
|
|
"no_devwatch": false,
|
|
"enable_public_folders": true,
|
|
"is_storage_limited": false,
|
|
"min_pass_length": 6,
|
|
"static_hosting_domain": "site.puter.localhost",
|
|
"static_hosting_domain_alt": "host.puter.localhost",
|
|
"private_app_hosting_domain": "app.puter.localhost",
|
|
"private_app_hosting_domain_alt": "dev.puter.localhost",
|
|
"captcha": { "enabled": false },
|
|
"default_user_group": "78b1b1dd-c959-44d2-b02c-8735671f9997",
|
|
"default_temp_group": "b7220104-7905-4985-b996-649fdcdb3c8f",
|
|
"storage_capacity": 104857600,
|
|
"disable_user_signup": false,
|
|
"teams_enabled": false,
|
|
"strict_email_verification_required": false,
|
|
"gui_assets_root": "./src/gui",
|
|
"puterjs_root": "./src/puter-js/dist",
|
|
"builtin_apps": {
|
|
"dev-center": "./src/dev-center"
|
|
},
|
|
"extensions": [
|
|
"./extensions"
|
|
],
|
|
"database": {
|
|
"engine": "sqlite",
|
|
"path": "volatile/runtime/puter-database.sqlite"
|
|
},
|
|
"s3": {
|
|
"localConfig": {
|
|
"dataDir": "volatile/runtime/fauxqs-data",
|
|
"s3StorageDir": "volatile/runtime/fauxqs-s3-data"
|
|
}
|
|
}
|
|
}
|