Repository navigation
feat(identity): advertise native sign-in scopes for durable MCP sign-in - #724
Merged
Merged
Conversation
A native coding client received a session refresh token that dies after 30 minutes idle and at the maximum session age, so a harness session lasting days lost its sign-in. The identity provider issues an offline token only when the sign-in requests `offline_access`, and arbora advertised no scope. The protected-resource metadata `scopes_supported` and the `scope` parameter of the 401 challenge now carry the native client sign-in scopes, read from the one client contract. This is advertising only: `required_scopes` is unchanged, so tokens without `offline_access` still pass. Realm session timeouts are not changed. `/health/ready` now always reports `identity`, adding `unconfigured` (no contract configured) and `degraded` with `identity_config_invalid` (a configured contract that cannot be read). It reports codes only and never gates readiness. Spec: ARBORA-IDENTITY-R030.4.8, ARBORA-IDENTITY-R030.4.9 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The plan for the identity spec lacked the Phase 1 design answers that the spec standard checks once a spec is touched. This adds the spec-wide answers and the section for the sign-in scope advertisement. Spec: ARBORA-IDENTITY-R030.4.8, ARBORA-IDENTITY-R030.4.9 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Author
|
CI required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed and why
A long-running coding session (days) must never have to sign in again. Today a native coding client receives an ordinary session refresh token. It expires after 30 minutes idle and at the maximum session age, so an idle or long session loses its sign-in.
The identity provider issues an offline refresh token only when the sign-in requests the
offline_accessscope. Arbora's contract already attaches that scope to the native client, but arbora never asked clients to request it: the protected-resource metadata listed noscopes_supported, and the 401 challenge carried noscope.scopes_supportedand thescopeparameter of the 401WWW-Authenticatechallenge now carry the native client sign-in scopes, includingoffline_access. They are read from the one declared client contract, throughnative_signin_scopesin the identity ports. There is no second list. The change uses the supportedscopes_supportedandchallenge_scopesparameters of the MCP framework's remote auth provider.required_scopesverification is unchanged, so service and client-credential tokens withoutoffline_accessare still accepted, and a configured required scope is still enforced./health/readynow always reportsidentity:ready,checking,degraded(with the reconciler failure code),stopped, and the newunconfigured(no client contract configured) anddegradedwithidentity_config_invalid(a contract is set but cannot be read; before, the supervisor refused it and readiness said nothing). It reports codes only and never gates readiness.ARBORA-IDENTITY-R030.4.8andARBORA-IDENTITY-R030.4.9extend the R030.4 family. The rollup, test spec, tasks and plan are updated.Impact
Clients that follow the advertised scopes receive offline refresh tokens on their next sign-in. Existing sessions keep their current tokens until they sign in again.
/health/readygains anidentityfield on deployments that had none; it is non-gating.Verification
tests/identity/test_native_signin_scopes.py: metadata scopes equal the contract scopes and includeoffline_access; the challenge carries the same list; tokens withoutoffline_accessare still accepted while a required scope is still enforced; readiness reports each identity state; and a served sign-in that follows the advertised scopes against a fake identity provider receives an offline refresh token, while one that ignores them does not.🤖 Generated with Claude Code