GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(aggregator): config-gated Access-JWT author derivation for writes (#1253, salvage of #7383) by dezren39 · Pull Request #8645 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Salvage re-application of the remainder of closed archive PR #7383 (task 14941, batch issue #7297) — the aggregator slice of #1253 (design tracker #1253 stays open; this is the aggregator-only slice, as in the original).

What

  • New pm-stack/aggregator/src/access-identity.ts: config-gated Cloudflare Access JWT author derivation for aggregator writes. When PM_AGG_ACCESS_TEAM_DOMAIN and PM_AGG_ACCESS_AUD are set, write endpoints validate Cf-Access-Jwt-Assertion against the team JWKS and derive the DashAuthor from verified claims (sub/email), never from the caller-supplied author. drew kind only when the verified identity is in the PM_AGG_OWNER_IDS allowlist; contradictory asserted drew → 403; invalid token → 401. Fail-closed: Access configured but allowlist unset/empty → all drew-kind authors rejected; non-drew kinds still derive from the verified JWT. Access unconfigured → byte-identical legacy behavior (accepted risk per aggregator(dashboard): comment API accepts self-asserted author identities — anyone can post as Drew into the orchestrator/GitHub flow (PR #920) #941).
  • server.ts: enforceAccessAuthor wired into all four write paths — roadmap annotations, comments, actions, and the batch-actions loop (per-item error in the batch case) — +22 lines, mirroring the archive wiring at the current handler sites.
  • New pm-stack/aggregator/test/access-identity.test.ts (7 tests).

Not re-applied: the archive's coverage-snapshot.json (a runtime data seed swept into the janitor archive, not source) and .pr-body-4964.md (PR-body scratch).

Tests (laptop, this branch)

  • bun test test/access-identity.test.ts — 7 pass / 0 fail.
  • Full aggregator suite: 2047 pass / 19 fail — every identified failing suite (projects, orchestration, quota, source-gate-1195, actions hook timeout) produces identical results on a pristine worktree of the same base commit (e.g. 87 pass / 6 fail on the four named files, both sides): pre-existing environmental failures, none in the touched paths.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
repo-worker-tmp-code-b
feat(aggregator): config-gated Access-JWT author derivation for writes (
991f935
#1253)

Salvage re-application of the remainder of closed archive PR #7383 (task 14941, issue #7297): new pm-stack/aggregator/src/access-identity.ts (Cf-Access-Jwt-Assertion verification against the team JWKS when PM_AGG_ACCESS_TEAM_DOMAIN + PM_AGG_ACCESS_AUD are set; author derived from verified claims, drew kind only for PM_AGG_OWNER_IDS allowlist, fail-closed when the allowlist is empty, inert legacy path when unconfigured) wired via enforceAccessAuthor into the four aggregator write paths in server.ts (roadmap annotations, comments, actions, batch actions), with test/access-identity.test.ts. The archive coverage-snapshot.json (runtime data seed) and .pr-body-4964.md (scratch) are not source and are not re-applied.
@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 10:40
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 338643c6-7c3d-43db-ada9-437ee9c02174
Commits

Reviewing files that changed from the base of the PR and between a3cc79e and e4dda6e.

Files selected for processing: 3

  • pm-stack/aggregator/src/access-identity.ts
  • pm-stack/aggregator/src/server.ts
  • pm-stack/aggregator/test/access-identity.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T10:50:59.338385Z e4dda6e New commits
ℹ️ 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 11, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 991f935961

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/src/access-identity.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pm-stack/aggregator/src/server.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

repo-worker-tmp-code-b
fix(aggregator): verify Access JWT once per batch; owner derives the …
e4dda6e
…standing drew identity

Codex P2s on PR #8645: (1) the batch loop re-verified the same request JWT per action — with a cold JWKS cache or a failing certs endpoint a 100-action batch could stack ~100 sequential 5s timeouts reporting the same 401. New createAccessAuthorEnforcer memoizes the verification (identity or 401) per request while derivation, including the per-item contradictory-drew 403, still runs per item; the batch loop uses one enforcer and enforceAccessAuthor delegates to it. New test: certs endpoint down, 3 enforcer calls, exactly 1 fetch. (2) The verified owner derived author id = email/sub, which re-keys saved views (ownerKey drew:drew matched exactly by ViewsStore) and all pre-Access drew authorship the day Access is enabled. The allowlisted owner now derives the standing drew identity {kind:drew, id:drew, label:Drew} from registry.ts; the allowlist check is what authorizes it.
@dezren39

dezren39 commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Both P2s fixed in e4dda6e:

Verify once per batch: new createAccessAuthorEnforcer(req, env, fetch) in access-identity.ts memoizes the request's JWT verification — the verified identity or the 401 failure is computed at most once per enforcer, while deriveAuthorFromAccess (including the per-item contradictory-drew 403) still runs per call. The batch loop in server.ts now creates one enforcer for the whole request; enforceAccessAuthor delegates to the same enforcer for single writes. New test: certs endpoint down, three enforcer calls return the same 401 with exactly 1 JWKS fetch attempt. Focused suite: 8 pass / 0 fail.

Saved-view ownership: the allowlisted owner now derives the standing drew identity { kind: "drew", id: "drew", label: "Drew" } (the registry.ts identity), instead of id = email/sub. The allowlist check is what authorizes the mapping — caller-supplied authors are still never trusted — and ownerKey stays drew:drew, so the verified owner keeps rename/remove/setDefault over pre-Access saved views (and pre-Access drew authorship on comments/actions stays continuous). The derivation test's expectation is updated to the standing identity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit b6b57d1 into main Nov 11, 2026
1 of 8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/14941-7297-access-identity branch November 11, 2026 10:53
@dezren39 dezren39 mentioned this pull request Nov 11, 2026
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
@dezren39

dezren39 commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Salvage note (task 13372, lane any-b, 2026-11-13): duplicate PR #4882 diffed against this canonical PR — nothing unique to salvage.

Shepherding PR #4882 (queue/4964-1253-access-authorship, the same #1253 Access-JWT slice) required a pairwise diff against this PR's landed version before any close, per the fleet's duplicate protocol. Result of the full three-file diff (access-identity.ts, server.ts, access-identity.test.ts):

  • Everything in PR feat(pm-stack): derive authors from Access JWT (#1253) #4882 is present on main through this PR (commits 991f935961, e4dda6e0ce), and main's version is strictly stronger in the two places they differ:
    1. The verified owner maps to the standing drew identity ({ kind: "drew", id: "drew", label: "Drew" }); PR feat(pm-stack): derive authors from Access JWT (#1253) #4882 derives id/label from email/sub, which would re-key pre-Access drew-authored artifacts (the Codex P2 this PR fixed).
    2. This PR's createAccessAuthorEnforcer verifies the JWT once per request/batch; PR feat(pm-stack): derive authors from Access JWT (#1253) #4882 verifies per write call.
  • The remaining differences are treefmt formatting only.

Nothing unique exists in PR #4882 to port. It is being closed as superseded by this PR, with the reason recorded on it and on batch issue #7297.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 13, 2026
feat(pm-stack): derive authors from Access JWT (#1253) #4882
Closed
feat(pm-stack): derive authors from Access JWT (#1253) — salvage of archive PR #7383 #8624
Closed
impl(pm-stack): aggregator Access JWT validation middleware + default-deny role check on write routes (#1253 split 1) #9603
Closed
pm-aggregator: log every Access write denial with the presented claim #11465
Merged
@dezren39 dezren39 mentioned this pull request Nov 22, 2026
design(pm-stack): one identity across the stack — SSO propagation from the public entry into every layer, roles replace asserted authorship #1253
Open
@dezren39 dezren39 added the audit:partial PR partially implemented; gap filed label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.