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

stacklok / toolhive / 43200992482
73%

Build:
DEFAULT BRANCH: main
Ran 12 Nov 2026 10:40AM UTC
Jobs 1
Files 1016
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

12 Nov 2026 10:30AM UTC coverage: 73.103% (+0.05%) from 73.055%
43200992482

push

github

web-flow
Add the ID-JAG minting core and align token minting (#7117)

* Add the ID-JAG minting core

Issuing an ID-JAG needs the same steps whatever the subject came
from: check the request shape, find the configured target, pick the
subject claims, run the policy, sign, and write the response. These
steps are collected in one unexported core that knows nothing about
grants, so each subject source built later reuses them and cannot skip
the policy call.

The core refuses scope, authorization_details and actor tokens, signs
with the oauth-id-jag+jwt typ, and emits a closed set of claims. A
test redeems a minted ID-JAG through the real multi-issuer validator.
Nothing calls the core yet.

Co-authored-by: Mecatl <noreply@mecatl.dev>

* Sign ID-JAGs through Signer.SignIDJAG

The base PR replaced the free-form Signer.Sign(claims, typ) with
SignIDJAG, which always sets typ oauth-id-jag+jwt, and removed the
exported tokenexchange.IDJAGSigner after review.

The mint core now depends on an unexported idJAGSigner interface that
*server.Signer satisfies, so tests can still fake signing failures.
The recording test signer counts calls instead of recording typ, and
the golden test checks typ in the produced token's JOSE header.

Co-authored-by: Mecatl <noreply@mecatl.dev>

* Fix lint in the ID-JAG minting tests

Use jose.ParseSignedCompact instead of the deprecated
jose.ParseSigned (SA1019), and apply gofmt -s to a
json.RawMessage composite literal that the formatter check
flagged.

Co-authored-by: Mecatl <noreply@mecatl.dev>

* Refuse an ID-JAG whose cap has elapsed

When a NotAfter cap pulled exp down to now or earlier, mintIDJAG
returned a server_error, which blamed the operator for a grant the
client holds that has expired.

respondWithIDJAG now checks the bounds after the policy and before
minting. A target lifetime that does not reach the next second is
still a server_error. If a cap pushed exp to now or earlier, the
request is refused with invalid_grant and the stabl... (continued)

207 of 213 new or added lines in 3 files covered. (97.18%)

117 existing lines in 6 files now uncovered.

95203 of 130232 relevant lines covered (73.1%)

890.97 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
97.01
pkg/authserver/server/tokenexchange/id_jag_mint.go

Coverage Regressions

Lines Coverage ∆ File
60
84.36
-0.32% pkg/authserver/server_impl.go
28
92.46
0.82% pkg/authserver/server/tokenexchange/refresh_token_handler.go
15
89.0
0.33% pkg/authserver/server/tokenexchange/jwt_bearer_handler.go
7
88.73
-0.16% pkg/authserver/server/tokenexchange/factory.go
5
97.95
0.01% pkg/authserver/server/tokenexchange/handler.go
2
59.0
-0.21% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 43200992482.1 12 Nov 2026 10:40AM UTC 1016
73.1
GitHub Action Run
Source Files on build 43200992482
  • Tree
  • List 1016
  • Changed 10
  • Source Changed 9
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43200992482
  • f7fce07c on github
  • Prev Build on main (#43182352511)
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