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

stacklok / toolhive / 44599262066
75%

Build:
DEFAULT BRANCH: main
Ran 19 Nov 2026 07:39PM UTC
Jobs 1
Files 1040
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 07:31PM UTC coverage: 73.626% (-0.03%) from 73.657%
44599262066

push

github

web-flow
Refuse ID-JAGs whose resource claim disagrees (#7198)

## Summary

Draft-ietf-oauth-identity-assertion-authz-grant-06 section 4.4.1 says every value in an ID-JAG's `resource` claim MUST be a resource the redeeming server governs, and the access token MUST be restricted to the resources in that claim. AS-2 only logged a draft departure when the claim did not list the requested resource or was malformed. So an ID-JAG issued for one gateway could be redeemed for another gateway that trusts the same issuer, as long as the subject binding and the client's audiences allowed it.

- Every claim value must be a valid resource URI and equal one of `allowed_audiences` exactly (draft section 4.3: simple string comparison). Otherwise the redemption is refused with `invalid_grant`, `invalid_assertion`, whatever the request holds.
- A malformed claim is refused with `invalid_grant`, `invalid_assertion`.
- When every claim value is governed, a requested `resource` the claim does not list is refused with `invalid_target`.
- None of these refusals names the resource or a claim value, and all of them happen before the assertion is consumed, so the same ID-JAG can still be redeemed for the resource it names.
- The `resource_not_covered` and `resource_malformed` findings leave the draft-departure log. The architecture doc describes the rule and adds the refusals to the redemption refusal table.

Closes #6892

## Type of change

- [x] Bug fix
- [ ] New feature
- [ ] Refactoring (no behavior change)
- [ ] Dependency update
- [ ] Documentation
- [ ] Other (describe):

## Test plan

- [x] Unit tests (`task test`)
- [ ] E2E tests (`task test-e2e`)
- [x] Linting (`task lint-fix`)
- [ ] Manual testing (describe below)

Unit tests were run as `go test -race ./pkg/authserver/...`. The handler table covers malformed claims with and without a `resource` parameter, claims mixing a governed value with a foreign or non-URI one, a foreign single-value claim with and without a parameter,... (continued)

32 of 32 new or added lines in 1 file covered. (100.0%)

52 existing lines in 3 files now uncovered.

97641 of 132618 relevant lines covered (73.63%)

882.22 hits per line

Coverage Regressions

Lines Coverage ∆ File
47
59.21
-4.68% pkg/workloads/manager.go
3
0.0
-100.0% pkg/workloads/sysproc_unix.go
2
97.4
-2.6% pkg/authserver/server/audience.go
Jobs
ID Job ID Ran Files Coverage
1 44599262066.1 19 Nov 2026 07:39PM UTC 1040
73.63
GitHub Action Run
Source Files on build 44599262066
  • Tree
  • List 1040
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44599262066
  • c310a819 on github
  • Prev Build on main (#44575626681)
  • Next Build on main (#44617133567)
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