feat(tenancy): resources of a tenant, their sealed secrets and the tenant selector #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/41-tenant-resources-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #41. Part of #38 (steps 2 and 3).
What changes
0003_tenant_secretscreates the table of theTenantSecretmodel of@quatrain/tenancy, with row-level security: a statement only sees the secrets of the tenant of the request. Values are sealed (AES-256-GCM, reversibleHashProperty) withTENANT_SECRETS_KEY. Without the key the instance keeps no secret and says so./t/<tenant>/api/tenant/…:resources(read, change),secrets/<name>(set, delete) for its administrators;overviewfor any member. A secret value is never returned nor logged.PUT /api/admin/tenants/<slug>/instance-modeland a switch on the Tenants page, for the administrators of the instance. A tenant cannot grant it to itself./t/<tenant>/is the home of a tenant,/t/<tenant>/resourcesthe page of its administrators. The side menu lists the pages of the tenant when inside one.@quatrain/core,backend,tenancyandtypesmove to the betas that carry the reversibleHashPropertyand the tenant secrets.The curation routes do not read these resources yet: that is the next step of #38.
Verified
yarn test: 152 tests pass. One run out of five showed a single failure that did not come back; I could not identify the test.yarn buildpasses.To do when deploying
TENANT_SECRETS_KEY(openssl rand -base64 32) to the secrets of the deployment.yarn admin migrate.🤖 Generated with Claude Code