GeezerVison is showing github.com — fleet-hosted: service-token auth needs tenancy only, not an RP issuer (#14978 / CF-2b) by developing-today-fleet[bot] · Pull Request #15551 · developing-today/code
Conversation
Summary
CF-2b (#14987) / #14978 route-around for the queue plane: decouple fleet-hosted caller-auth per credential kind.
authenticate() required BOTH the RP issuer and the tenancy directory for every caller, so with the #9077 OIDC provider still design-stage (no issuer URL of record), every door route fails closed 503 auth_not_configured — including opaque service-token callers, whose validation never uses the RP issuer at all (SHA-256 lookup + route scope + active flag against the tenancy directory, src/tenancy.ts).
Change
src/auth.ts: tenancy directory is required for all callers (absent → same 503, nothing fails open); the RP issuer is required only on the JWT path — rp/agent callers still fail closed 503 without one; service-token callers authenticate on tenancy alone.
src/config.ts: new serviceAuthConfigured (tenancy configured), documented as distinct from the full authConfigured summary.
src/health.ts: /health auth block now also reports service_auth_configured.
test/auth.test.ts: two new tests naming their oracle (design §4.1 service-token rule) — service token resolves + route scope enforced + unknown token refused with tenancy-only config; JWT caller still 503 with tenancy-only config.
Why this is the right scope
The queue door's caller is the native broker — a service-token caller scoped to ["queue"]. This PR lets a deployment carrying a tenancy fixture with the broker's token record (SHA-256 only, the interim stopgap #14978 itself names) serve queue-door traffic without waiting on the person-facing #9077 provider. It does not close #14978 for person/agent callers; the bridge-door round-trip in its acceptance still needs the issuer.
Evidence
Remote verification via fleet-command on developing-today/fleet, run 45807449396 (auth/tenancy/doors/bridge/queue/d1-parity suites) — result recorded on #14987.
Rollback note for the eventual flip is recorded on #14987 (comment 7190274662) before any flip, per the CF-2 hard rules.
Refs #14978, #14987, #14942, #14866. Left unmerged for Felix.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-26T11:09:38Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": "/home/hatch/workspace/cf2-work",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/hatch/workspace/cf2-work",
"repo": "developing-today/code",
"branch": "felix/cf2-service-auth-14978",
"sha": "aac9a06909780c247fc694bff9d438e6c88eab2f"
},
"auth_subject": "felix",
"stamped_by": "fleet 0.1.0 (native)"
}
}
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.
…#14978)
authenticate() required BOTH the RP issuer and the tenancy directory
for every caller kind, so with the #9077 OIDC provider still
design-stage every door route failed closed 503 auth_not_configured
- including opaque service-token callers, whose validation (SHA-256
lookup, route scope, active flag in the tenancy directory) never
uses the RP issuer at all.
Decouple per credential kind: no tenancy directory still refuses
every caller; JWT (rp/agent) callers still fail closed 503 until an
RP issuer is configured; service-token callers authenticate against
the tenancy directory alone. config gains serviceAuthConfigured and
/health reports it. This is the smallest enabling step for CF-2b
(#14987): the native queue broker can call the queue door as a
service-token caller scoped to the queue door once a tenancy fixture
carrying its token record is deployed, without waiting on #9077.
Refs #14978, #14987, #14942
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
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:
56ac6ab1-4b81-4635-bf31-63884cd0d176
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- 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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
agent-note:v1 — shepherd premise + auth-diff review (lane CF, direct no-queue, 2026-11-26 ~05:20 CST)
Premise: PR OPEN, non-draft, base main, head aac9a06909780c247fc694bff9d438e6c88eab2f, no labels. Only comment is CodeRabbit (review skipped); no reviews. Author is the felix CF-2 lane; its latest note is on #14987 (comment 7190274662, 11:06Z).
Auth intent vs diff — MATCHES, no weakening beyond stated intent:
src/auth.ts: tenancy directory still required for EVERY caller (absent → same 503 auth_not_configured, nothing fails open). The RP issuer check moved into the JWT branch only — JWT (rp/agent) callers still fail closed 503 without an issuer. The service-token path below (SHA-256 lookup + route scope + active flag) is untouched by the diff. No check removed that the body does not mention.
src/config.ts / src/health.ts: additive only — new serviceAuthConfigured (tenancy-only) reported alongside the unchanged full authConfigured.
test/auth.test.ts: two new tests naming their oracle (design §4.1 service-token rule) — service token resolves + route scope enforced (403) + unknown token refused (401) under tenancy-only config; JWT caller still 503 under tenancy-only config.
- No credential values committed or logged: the test fixture stores only
sha256Hex(SERVICE_TOKEN) of the existing test constant.
Verification — NOT yet green, standing down (not merging): the PR body's cited fleet-command run on developing-today/fleet, run 45807449396 (created 2026-11-26T11:06:03Z), is still queued with no conclusion and no test output. A queued run is not verification, and this lane does not duplicate an author dispatch already queued. PR checks on the head are only CodeRabbit SKIPPED / Proof SKIPPED.
Next: when run 45807449396 completes successfully with real test output for this change, this PR is merge-ready under the standing merge authority (merge commit). Re-check head SHA at that time.
#15521 note: landing this PR removes #14978 as the auth gate for the queue plane only (per #14987 comment 7190274662, steps (a)–(c) remain: tenancy-fixture deploy, broker all-verbs client). Draft #15521's own stated merge blocker is separate — its corrected run fp_00aab3f76ba055fbe635527b023f7a55 still waiting for a runner — so this PR landing does not by itself make #15521 mergeable.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 26, 2026
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 27, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|