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

stacklok / toolhive / 41696227393
73%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 06:51PM UTC
Jobs 1
Files 992
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

03 Nov 2026 06:41PM UTC coverage: 72.348% (+0.05%) from 72.298%
41696227393

push

github

web-flow
Derive child exchange grants from refresh tokens (#7007)

* Derive child refresh tokens from grants

A client holding a grant that allows refresh_token had no way to hand
out narrower credentials. Token exchange with a refresh-token subject
and a refresh-token requested type now derives a child grant that
allows one other token type (id-jag), copies the parent's client and
subject, and never outlives the parent or the client's cap for the
child's type.

This replaces the blanket refusal of refresh-token subjects for clients
with exchange_refresh_tokens. A refresh-token subject that asks for any
other requested_token_type, and every refresh-token subject from a
client without exchange_refresh_tokens, keep the unsupported
subject_token_type refusal.

The presented token is checked in a fixed order that reveals nothing
before the client check: HMAC only (no store call), lookup, same
client, the grant's own liveness, the parent's liveness, then the
refresh_token type. A forged, unknown, other-client or login refresh
token all get one invalid_request with the stable description
grant_invalid, so a caller learns nothing about which case applied.
Later refusals use the exact reasons revoked, parent_revoked and
not_issuable. An expired grant is not found in the store, so it gets
grant_invalid too. A child lists no refresh_token, so it cannot be
derived from (depth 1).

A derive logs "Exchange grant derived" at debug level with
has_parent=true. A child has no replay marker, so a derive can be
repeated, and a lost response leaves an orphan child until its parent
ends; this is documented.

* Drop the expired reason for exchange grants

A client learns when a grant ends from the expires_at echoed in the
response that issued it, so a separate expired reason tells it nothing.
Both stores already hide expired records, so an expired grant reached
the handler only when the server and store clocks disagreed.

An expired grant is now answered like an unknown grant: the ... (continued)

124 of 138 new or added lines in 3 files covered. (89.86%)

13 existing lines in 6 files now uncovered.

91978 of 127133 relevant lines covered (72.35%)

133.26 hits per line

Uncovered Changes

Lines Coverage ∆ File
14
91.92
-1.2% pkg/authserver/server/tokenexchange/refresh_token_handler.go

Coverage Regressions

Lines Coverage ∆ File
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
3
64.0
4.37% pkg/workloads/manager.go
1
91.92
-1.2% pkg/authserver/server/tokenexchange/refresh_token_handler.go
1
96.77
-3.23% pkg/foreach/foreach.go
1
87.74
-0.13% pkg/transport/proxy/transparent/transparent_proxy.go
1
94.66
-0.76% pkg/vmcp/composer/dag_executor.go
Jobs
ID Job ID Ran Files Coverage
1 41696227393.1 03 Nov 2026 06:51PM UTC 992
72.35
GitHub Action Run
Source Files on build 41696227393
  • Tree
  • List 992
  • Changed 13
  • Source Changed 5
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41696227393
  • f87c47ac on github
  • Prev Build on main (#41684712257)
  • Next Build on main (#41712012209)
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