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

stacklok / toolhive / 40967065924
73%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2026 10:44PM UTC
Jobs 1
Files 987
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

29 Oct 2026 10:35PM UTC coverage: 72.095% (-0.04%) from 72.131%
40967065924

push

github

web-flow
Add exchange refresh token client config (#6989)

* Add exchange refresh token client config

A delegate client that exchanges a login token for a refresh token gets
a credential that outlives the login. Without per-client limits, one
leaked token can become long-term access, and if the server accepts
any self-issued subject token, one client can spend another client's
token.

Threat this closes. reporting-svc is a confidential client whose access
token AT1 (5 minutes, aud=crm.example) is issued for alice. AT1 leaks
from a log line. Without the source policy in the parent commit,
mallory-cli, another confidential client, exchanges AT1 for a token
with aud=payroll.example. If exchange can also mint refresh tokens,
the same leak becomes a refresh token whose life is limited only by
the server default, and it keeps renewing while it is used.

This commit adds the configuration that lets an operator decide, for
each client, whether exchange may issue refresh tokens and how long
they may live:

    token_exchange:
      self_issued_subject_tokens: restricted
      api_audience: https://crm.example
      exchange_refresh_tokens:
        id_jag_max_lifetime: 5m
        refresh_token_max_lifetime: 720h

Validation requires at least one cap, each positive and at most 720h,
api_audience set, restricted subject tokens, and a confidential client
with the token-exchange grant. An empty cap refuses that grant kind.
The 720h ceiling is a local choice; no specification sets it. The caps
are projected into ConfiguredClientPolicy keyed by token type. Nothing
reads the projection yet, so this commit changes no behaviour.

The source check reads the client_id of the subject token, which names
the client that obtained it. Only that client, or a listed source
client, may exchange it. The check does not compare sub with iss. For
a login token, sub is the user and iss is the server, so requiring them
to match would reject every valid login token.

Still open after this commi... (continued)

78 of 84 new or added lines in 3 files covered. (92.86%)

62 existing lines in 4 files now uncovered.

90990 of 126209 relevant lines covered (72.09%)

130.54 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
82.01
-0.27% pkg/authserver/server_impl.go

Coverage Regressions

Lines Coverage ∆ File
47
59.0
-4.89% pkg/workloads/manager.go
6
19.87
-3.97% pkg/client/manager.go
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
3
0.0
-100.0% pkg/workloads/sysproc_unix.go
Jobs
ID Job ID Ran Files Coverage
1 40967065924.1 29 Oct 2026 10:44PM UTC 987
72.09
GitHub Action Run
Source Files on build 40967065924
  • Tree
  • List 987
  • Changed 9
  • Source Changed 5
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40967065924
  • 47984337 on github
  • Prev Build on main (#40963107193)
  • Next Build on main (#40981886298)
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