Skip to content

fix(permissions): bound delegated global permission edits by platform-level access - #828

Merged
antosubash merged 7 commits into
mainfrom
fix/s02-permission-ceiling
Nov 5, 2026
Merged

antosubash merged 7 commits into
mainfrom
fix/s02-permission-ceiling

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Hardening for delegated permission editing.

User and role permission grants are global, so the access that bounds a delegated editor (an actor with permissions.manage who is not an unscoped admin) is now computed from platform-level authority only: global roles, direct grants and grant sources, without the synthetic tenant:* roles of the active tenant. API-token scope caps still apply; unscoped platform admins are unchanged.

  • simple_module_hosting.permissions.resolve_principal_permissions(..., include_tenant_roles=False) resolves that set (tenant roles are filtered from the role list, as the tenants/api_tokens resolvers do). Credential validity (required_permission) stays tenant-aware.
  • permissions.write_safety.check_permission_write requires platform-level permissions.manage and uses the platform set for both the "assign only what you hold" and "target within reach" checks; an unauthenticated request is refused before any grant source runs.
  • Behaviour change: a tenant owner/admin who holds permissions.manage only through a tenant role can no longer edit global grants. Docs (docs/framework/permissions.md, docs/modules/permissions.md) and CHANGELOG (Unreleased → Security) updated.

Pipeline: /optimize (1 commit), two review passes (correctness + maintainability), triage kept locally.
Local CI: make lint ✓ · make test-js ✓ · make test-py (8 workers) 7886 passed, 1 failed: test_clean_target_is_not_in_repo, the known local /tmp/.git placeholder failure; it passes when re-run alone.

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4439f80
Status: ✅  Deploy successful!
Preview URL: https://2203a892.simple-module-python.pages.dev
Branch Preview URL: https://fix-s02-permission-ceiling.simple-module-python.pages.dev

View logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-05T15:22:19.741694Z 19ad152 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@antosubash
antosubash merged commit 0b83ef2 into main Nov 5, 2026
16 checks passed
@antosubash
antosubash deleted the fix/s02-permission-ceiling branch November 5, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant