Skip to content

fix(registry): preserve exact crawl requester credentials - #7530

Merged
bokelley merged 1 commit into
mainfrom
conductor/fix-exact-crawl-requester-provenance
Sep 24, 2026
Merged

bokelley merged 1 commit into
mainfrom
conductor/fix-exact-crawl-requester-provenance

Conversation

@bokelley

@bokelley bokelley commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

A linked secondary credential could receive 202 from POST /registry/crawl-request, have its request stored under the canonical credential, then receive 404 when polling it. This change captures the immutable RegistryPrincipal at POST entry and persists its exact credential ID, so the creating credential can read its request while another linked credential receives the same response as a missing request.

This is a provenance/self-read availability follow-up for #6827; it does not close #6827.

The durable queue already counts requested_by_user_id for its requester quota. This route now passes the same frozen exact credential to the existing in-memory reservation and release overrides. Linked credentials therefore have separate requester quotas. The 30/hour threshold and five-minute domain cooldown are unchanged, and canonical-keyed brand/manager callers retain their existing behavior. Static-admin requests still persist static_admin/null.

Scope is limited to the POST handler and regressions. There is no migration, schema, protocol, dependency, or identity-management change. The fix applies to new submissions; existing rows retain their recorded ownership.

The branch was refreshed on current main as one commit after its former stacked parents landed. A current-main API drift in audit logging was resolved by reading principal.staticAdmin from the captured principal.

Validation on refreshed head:

  • registry-crawl-request-route.test.ts
  • registry-brand-force-crawl-route.test.ts
  • 2 files, 24 tests passed
  • git diff --check

The earlier candidate also passed its broader PostgreSQL integration and full server test matrices before the current-main refresh. GitHub CI is authoritative for the refreshed head.


Open workspace in Conductor

@bokelley
bokelley force-pushed the conductor/secure-web-admin-credential-sweep branch from 31e43f1 to 0e825e3 Compare September 15, 2026 00:02
@bokelley
bokelley force-pushed the conductor/secure-web-admin-credential-sweep branch 2 times, most recently from 7c3d8d3 to cf5c79e Compare September 17, 2026 11:52
Base automatically changed from conductor/secure-web-admin-credential-sweep to main September 17, 2026 12:03
@bokelley
bokelley force-pushed the conductor/fix-exact-crawl-requester-provenance branch from c306073 to 6536b94 Compare September 23, 2026 15:18
@bokelley
bokelley marked this pull request as ready for review September 23, 2026 15:18

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve — server-only fix aligns write and read ownership semantics.

PR #7530 captures a frozen RegistryPrincipal at POST /registry/crawl-request entry and persists requestedByUserId as the exact authenticating credential (authWorkosUserId ?? id), aligning the write with the read-path ownership check and closing the 202-then-404 self-read gap for linked credentials. The principal.user! assertion is guarded, and reservation/release key on the same frozen memberId. Two new >200-line test files cover mutation-across-await, quota isolation, and reservation release.

Checked:

  • Server-only diff (routes + tests) — no schema/protocol/dist/docs surface touched, so no changeset required (correctly none added).
  • high_risk is true only because server/src/routes/registry-api.ts is (modified) matching server/src/routes/**; no critical/high/medium findings on that file, so the modification is presumed safe (not an escalation trigger on the flag alone).
  • gated_paths is false; no author no-auto-approve team match.
  • No blocking or medium findings reported.

Decision table: rows 1–8 do not fire (no findings, gated_paths false, no deletions, no team gate). Falls through to row 9 → approve. Note: review_decision is REVIEW_REQUIRED, but row 2 only applies when gated_paths is true, which it is not here.

@bokelley
bokelley merged commit f547e3c into main Sep 24, 2026
31 checks passed
@bokelley
bokelley deleted the conductor/fix-exact-crawl-requester-provenance branch September 24, 2026 13:05
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.

Identity linking: isolate organization authorization to the authenticated credential

1 participant