Repository navigation
fix(identitybroker): deny calls on AS-2 actor_denied - #2826
Merged
ChrisJBurns merged 1 commit intoNov 17, 2026
Merged
ChrisJBurns merged 1 commit into
ChrisJBurns merged 1 commit into
Conversation
AS-2 is moving to ID-JAG -06's redemption errors (design: credentials and lifecycle, step (8) and error reasons): access_denied with subject_unknown, actor_denied, or resource_denied, alongside the invalid_grant and invalid_target it already sent. Add access_denied and the three reasons to the known codes and reasons, so they are no longer reported as unknown. resource_denied joins the configuration faults; actor_denied does not, because it is a denial. redeemFailure now answers access_denied with actor_denied as PERMISSION_DENIED with the denied reason, as AS-1's denied is, without a retry. subject_unknown, resource_denied, and a reasonless access_denied stay INTERNAL. Co-authored-by: Mecatl <[email protected]>
jhrozek
marked this pull request as ready for review
November 17, 2026 10:27
ChrisJBurns
approved these changes
Nov 17, 2026
ChrisJBurns
merged commit Nov 17, 2026
0ac01e6
into
docs/as2-redemption-error-contract
50 of 69 checks passed
ChrisJBurns
pushed a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Mecatl <[email protected]>
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
access_deniedwithsubject_unknown,actor_deniedorresource_denied. The design in docs(agent-identity): follow ID-JAG -06 for AS-2 redemption errors #2825 saysactor_denieddenies the call, and the broker today reports all three as unknown and fails withINTERNAL.access_deniedis a known error code;subject_unknown,actor_deniedandresource_deniedare known reasons.resource_deniedis a configuration fault;actor_deniedisn't.redeemFailureanswersaccess_denied+actor_deniedwithPERMISSION_DENIEDand thedeniedreason, the same error AS-1'sdeniedproduces. No retry. A 503 carrying it staysUNAVAILABLE.subject_unknown,resource_deniedand a reasonlessaccess_deniedstill fail withINTERNALand no retry.subject_unknown→ pending with a sign-in link waits for a real gateway.consent_requiredtest rows useaccess_denied, as the design now says. The code matches on the reason alone, so behaviour doesn't change.Stacked on #2825. Nothing changes until we bump ToolHive past the AS-2 work; v0.65.0 never sends these.
Issue relationship
Relates to #2654
Type of change
Test plan
Baseline checks
task lint)task test): ran the focused suites instead, belowtask test:race): not run; focused race tests belowgo run ./cmd/mecademo): not affectedtask docs): no markdowntask site:build): not applicabletask api:check): not applicabletask api:update+engine/CHANGELOG.md: not applicablego test -race ./internal/identitybroker/... ./internal/adapter/mcpbroker/...passes. New rows inTestAuthorizeCallMapsAS2Refusalsand the server-refusal tables, each checking a single redemption (no retry).User-facing change
None today: production configures no AS-2 gateway and we pin ToolHive v0.65.0. Once both change, an agent whose actor AS-2 refuses sees the call denied instead of an internal error.