Skip to content

feat: PPT-526 enforce staff domain isolation - #390

Draft
camreeves wants to merge 11 commits into
masterfrom
PPT-526-tenancy
Draft

camreeves wants to merge 11 commits into
masterfrom
PPT-526-tenancy

Conversation

@camreeves

@camreeves camreeves commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Tenant administration is limited to the caller's structural reach and the live grant permissions required for each operation. Management partner users gain cluster reach only from a staff organisation; authority grants cover exactly one domain, read grants cannot authorise writes, and tenant updates validate the destination domain. Existing JWT scope and admin checks still apply.

Spaces use the domain's configured org_zone. When it is absent, the fallback reads only organisation-owned rooms/zones after verifying that the organisation has one domain and its owned rooms reference owned zones. Ambiguous configuration returns HTTP 501 with an org_zone message. Asset-type creation and updates validate the destination category authority, preserving legacy NULL-authority category support.

Staff API retains its authenticated Host/JWT, email-domain Tenant, parent Tenant and calendar/delegated-credential context. This PR also fixes an existing calendar spec's dependence on cached OAuth tokens. README configuration guidance and generated OpenAPI schemas are updated.

Requires the ownership foundation in PlaceOS/models#332; the models tenancy dependency is pinned at 716ca76 until that foundation is released. Related rollout seeding: PlaceOS/init#105. Tracking: #396 and PlaceOS/rest-api#465.

Review

  • Tests were committed before production fixes: P1 regression run reproduced five intended failures; the corrected P2 regression run reproduced six intended failures with no fixture errors.
  • Final CI at a9b8a21 passed latest and unstable Crystal suites, browser e2e, formatting and lint. Runtime suites contain 654 examples with 12 existing pending; no failures or errors.
  • Local semantic spec compilation, full application compilation, changed-file ameba and formatting passed. OpenAPI regenerated with the final model pin matches the committed contract; all local schema references resolve.
  • Working tree is clean; commits were pushed normally and retain PR history.
  • The current-head multiarch image build passed, including Ameba. Every required check is green at a9b8a21; the PR remains a draft.

@github-actions github-actions Bot added the type: enhancement new feature or request label Oct 7, 2026
Resolve the caller's reach the way rest-api does and keep the tenants list,
lookups and creates inside it. PLACE_TENANCY_ENFORCE switches between
refusing and logging. Builds against the models tenancy branch until
models #332 merges.
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Oct 7, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@stakach stakach changed the title feat: PPT-526 scope tenant administration to the caller's organisations feat: PPT-526 enforce staff domain isolation Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants