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

stacklok / toolhive / 41027563081
73%

Build:
DEFAULT BRANCH: main
Ran 30 Oct 2026 08:45AM UTC
Jobs 1
Files 988
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

30 Oct 2026 08:36AM UTC coverage: 72.134% (+0.02%) from 72.114%
41027563081

push

github

web-flow
Define exchange grant authorization details type (#6990)

A confidential client run by an operator, such as an agent broker,
must keep acting for a user after that user's login has ended, for
example in scheduled background work. Its access token is short-lived
and tied to the login, so it cannot do this alone. The planned
mechanism exchanges the user's access token, through RFC 8693, for a
client-bound refresh token. The exchange request has to say what the
grant may produce and for how long, so this defines that request as an
RFC 9396 authorization_details type and the rules applied to it.

The type, https://toolhive.dev/exchange_grant, has three members:
type, issuable_token_types (one ID-JAG or refresh-token URN), and an
optional integer expires_at. Unknown members are refused, and a request
carries exactly one such entry. The lifetime comes from the operator's
policy per client and token type, not from the user's access-token
expiry, because the grant must outlive that token (RFC 8693 section
2.2.1). A missing expires_at takes the cap, and a larger one is cut
down to it (RFC 9396 section 7.1). A child grant cannot be a refresh
token and cannot outlive its parent.

The repeated-parameter error now comes from one constructor shared with
the existing handler, with no change in behaviour. Nothing calls these
rules yet; the handler arrives in a later change.

Known limits: the grant is not yet bound to an audience or resource
(RFC 9700 section 4.14.2, deferred). There is no inactivity expiry,
so only the hard cap applies. Consent is not checked yet; the handler
will require offline_access.

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

134 of 138 new or added lines in 2 files covered. (97.1%)

9 existing lines in 3 files now uncovered.

91145 of 126355 relevant lines covered (72.13%)

131.16 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
96.97
pkg/authserver/server/tokenexchange/exchange_grant.go

Coverage Regressions

Lines Coverage ∆ File
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
2
59.63
-0.21% pkg/workloads/manager.go
1
94.1
0.0% pkg/authserver/storage/memory.go
Jobs
ID Job ID Ran Files Coverage
1 41027563081.1 30 Oct 2026 08:45AM UTC 988
72.13
GitHub Action Run
Source Files on build 41027563081
  • Tree
  • List 988
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41027563081
  • a10b2ce6 on github
  • Prev Build on main (#40981886298)
  • Next Build on main (#41032628931)
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