Skip to content

feat(security): add Cloudflare Access staff identity controls - #24

Merged
zskbot merged 10 commits into
feat/token-vault-agent-scopesfrom
feat/token-vault-access-staff
Nov 7, 2026
Merged

zskbot merged 10 commits into
feat/token-vault-agent-scopesfrom
feat/token-vault-access-staff

Conversation

@zskbot

@zskbot zskbot commented Nov 7, 2026

Copy link
Copy Markdown
Member

Summary

Stacked on PR #23. This adds the authorized-personnel layer while preserving the password-only TOKEN bootstrap.

Included

  • Use Cloudflare Workers' verified ctx.access.getIdentity() context; no unverified request header or hand-rolled JWT parser.
  • Map the verified Access email to an active D1 identity and its assigned application role.
  • Add owner-only personnel provisioning, role updates, inventory, and revocation.
  • Supported staff roles: security_admin, developer, and auditor; staff cannot be promoted to owner through this API.
  • Revoke existing cookie sessions when a staff identity is disabled.
  • Add ACCESS_REQUIRED=true enforcement for all browser/human routes. The separate bearer-key agent API remains protected by its own scoped credentials.
  • Add owner-only member-management UI and Access identity integration tests.

Deployment requirements (not performed)

  • Create a Cloudflare Access Self-hosted application for the Worker hostname.
  • Restrict Allow policies to approved staff identities/groups; do not add a public bypass.
  • Set Worker variable ACCESS_REQUIRED=true before exposing the service.
  • Keep the bootstrap TOKEN password separate from staff SSO and AI Agent keys.

No Access application, Worker variable, D1 database, secret, or deployment was created. This PR is stacked on #23; merge/review in order only after CI and security review.

@zskbot
zskbot marked this pull request as ready for review November 7, 2026 18:14
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T18:15:02.673891Z
We couldn’t complete this review. Comment @codex review to try again.
eb8ca3b Draft marked ready
ℹ️ 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.

@zskbot
zskbot merged commit 00f33d2 into feat/token-vault-agent-scopes Nov 7, 2026
1 check passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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