Repository navigation
docs(agent-identity): follow ID-JAG -06 for AS-2 redemption errors - #2825
Merged
Merged
Conversation
This was referenced Nov 17, 2026
jhrozek
marked this pull request as ready for review
November 17, 2026 10:26
This was referenced Nov 17, 2026
Merged
Base automatically changed from
fix/identitybroker-as1-actor-reasons
to
main
November 17, 2026 17:36
ID-JAG draft -06 (§4.4.1, §4.4.3) splits redemption refusals by whether a new ID-JAG can help: invalid_grant means the ID-JAG failed a validation rule, and access_denied means it is valid but the user, client, or actor is not authorized. ToolHive's AS-2 is moving to that split (stacklok/toolhive#7030, #6887, #7158, #6892; not built yet), so the design docs described a contract AS-2 is leaving. Step (8) now splits check 6 into resource coverage (invalid_target, a broker bug), resource policy (access_denied with resource_denied), and the actor check (access_denied with actor_denied). An unknown user in embedded mode is access_denied with subject_unknown and becomes mcp_authorization_pending with a link to the embedded gateway's sign-in. The approval-pending case is access_denied with consent_required everywhere. The broker retries only an invalid_grant with no reason code, never invalid_assertion or access_denied. The failure matrix, error reasons, and AS-2 test list match. The ID-JAG citations move to -06 numbering: re-submission and the no-refresh-token rule are §4.4.4, and the security-considerations sections cited are now §9.4, §9.8, and §9.10. Co-authored-by: Mecatl <[email protected]>
Co-authored-by: Mecatl <[email protected]>
ChrisJBurns
force-pushed
the
docs/as2-redemption-error-contract
branch
from
November 17, 2026 17:45
0ac01e6 to
9d96210
Compare
ChrisJBurns
approved these changes
Nov 17, 2026
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.
Summary
invalid_grantmeans the ID-JAG failed a validation rule;access_deniedmeans it's valid but the user, client or actor isn't authorized at the gateway, and a new one won't help. §4.4.1 makesaccess_denieda MUST when no requested resource is acceptable. ToolHive's AS-2 is moving to that split (Authorization server: reason codes in error_description for ID-JAG redemption refusals toolhive#7030, #6887, #7158, #6892), and our step (8) still described the -04-era contract (invalid_targetfor check 6,invalid_grant/invalid_assertionfor an unmapped user). None of it is built in ToolHive yet; this settles the contract first.invalid_target, a broker bug since AS-1 copies ourresourceinto the claim), 6b resource policy (access_denied+resource_denied) and 6c the actor (access_denied+actor_denied). Checks 7–9 keep their numbers.access_denied+subject_unknown, and becomesmcp_authorization_pendingwith a link we build to the embedded gateway's sign-in. Nothing else creates the user's AS-2 account before the first redemption, so a plain failure would leave no way out. External gateways get no link; the call fails.actor_deniedisPERMISSION_DENIED, "deny the call", likedenied.resource_deniedis a configuration fault.access_denied+consent_requiredeverywhere, matching #7158.invalid_grantwith no reason code.invalid_assertionisn't retried (we mint per call already, and retrying a replay would hide a stolen ID-JAG);access_deniedis never retried.^[a-z_]+(: .*)?$grammar), the AS-2 test list inimplementation.md, andmcp-gateway-modes.md/mcp-authorization.mdmatch.Stacked on #2823.
Issue relationship
Relates to #2654
Type of change
Test plan
Baseline checks
task lint): docs onlytask test): docs onlytask test:race): docs onlygo run ./cmd/mecademo): not affectedtask docs): 236 documents, 0 broken links or anchors, 0 orphanstask site:build): not applicabletask api:check): not applicabletask api:update+engine/CHANGELOG.md: not applicableChanges
docs/drafts/agent-identity/credentials-and-lifecycle.mddocs/drafts/agent-identity/implementation.mddocs/drafts/agent-identity/mcp-gateway-modes.mdaccess_denied; citationsdocs/drafts/agent-identity/mcp-authorization.mddocs/drafts/agent-identity/audit.mdUser-facing change
None. Design docs only, and production configures no AS-2 gateway yet.
Special notes for reviewers
access_deniedand the three new reasons fall through toINTERNAL, which is safe. Known lists andactor_denied→PERMISSION_DENIEDcome next on a separate branch;subject_unknown→ pending with a link waits for a real gateway.authorize_integration_test.go("a user AS-2 does not trust") and twoas2_test.gocases change expectations. That belongs in the bump PR.invalid_grantis still retried once under the new rule.