• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 44559477146
75%

Build:
DEFAULT BRANCH: main
Ran 19 Nov 2026 04:01PM UTC
Jobs 1
Files 1039
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Nov 2026 03:51PM UTC coverage: 73.667% (+0.06%) from 73.611%
44559477146

push

github

web-flow
Add reason codes to redemption refusals

## Summary

- **Why:** 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; `access_denied` means 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 makes `access_denied` a MUST when no requested resource is acceptable. ToolHive's AS-2 is moving to that split (stacklok/toolhive#7030, #6887, #7158, #6892), and our step (8) still described the -04-era contract (`invalid_target` for check 6, `invalid_grant`/`invalid_assertion` for an unmapped user). None of it is built in ToolHive yet; this settles the contract first.
- **What:**
  - Step (8) check 6 splits into 6a resource coverage (`invalid_target`, a broker bug since AS-1 copies our `resource` into the claim), 6b resource policy (`access_denied` + `resource_denied`) and 6c the actor (`access_denied` + `actor_denied`). Checks 7–9 keep their numbers.
  - An unknown user in embedded mode is `access_denied` + `subject_unknown`, and becomes `mcp_authorization_pending` with 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_denied` is `PERMISSION_DENIED`, "deny the call", like `denied`. `resource_denied` is a configuration fault.
  - The approval-pending case is `access_denied` + `consent_required` everywhere, matching #7158.
  - The broker retries only an `invalid_grant` with no reason code. `invalid_assertion` isn't retried (we mint per call already, and retrying a replay would hide a stolen ID-JAG); `access_denied` is never retried.
  - Failure matrix, error reasons (including the exact `^[a-z_]+(: .*)?$` grammar), the AS-2 test list in `implementation.md`, and `mcp-gateway-modes.md` / `mcp-authorization.md` match.
  - ID-JAG citations mo... (continued)

84 of 85 new or added lines in 6 files covered. (98.82%)

11 existing lines in 4 files now uncovered.

97687 of 132607 relevant lines covered (73.67%)

882.53 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
90.46
1.46% pkg/authserver/server/tokenexchange/jwt_bearer_handler.go

Coverage Regressions

Lines Coverage ∆ File
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
3
64.29
-21.43% pkg/authserver/upstream/tokens.go
1
93.99
0.62% pkg/authserver/server/tokenexchange/id_jag_handler.go
1
94.24
0.0% pkg/authserver/storage/memory.go
Jobs
ID Job ID Ran Files Coverage
1 44559477146.1 19 Nov 2026 04:01PM UTC 1039
73.67
GitHub Action Run
Source Files on build 44559477146
  • Tree
  • List 1039
  • Changed 13
  • Source Changed 5
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44559477146
  • 2d7e1d7d on github
  • Prev Build on main (#44548899538)
  • Next Build on main (#44575626681)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc