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

stacklok / toolhive / 38576322591
71%

Build:
DEFAULT BRANCH: main
Ran 14 Oct 2026 02:06PM UTC
Jobs 1
Files 953
Run time 2min
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

14 Oct 2026 01:58PM UTC coverage: 71.249% (+0.01%) from 71.238%
38576322591

push

github

web-flow
Refresh upstream tokens when the ID token expires (#6773)

* Add opt-in refresh on expired upstream ID token

Upstream token refresh was keyed only on access-token expiry, so a
provider whose ID token expires before its access token (e.g. Entra ID)
left consumers holding an expired ID token for part of every cycle.

Implements changes for issue #6237:
- Add WithRefreshOnExpiredIDToken option to InProcessService; when set,
  an expired stored ID token triggers a refresh in both GetValidTokens
  and GetAllUpstreamCredentials, reusing the refresher path
- Suppress the trigger until the access token next expires when a
  refresh leaves the ID token expired (provider omitted id_token) or
  fails, so reads do not loop on refresh
- Default behaviour is unchanged; document the option and the
  omitted-id_token caveat on Identity.UpstreamIDTokens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Let ID-token refresh reach the upstream provider

The refresher short-circuited whenever the re-read row's access token
was unexpired, so the opt-in ID-token trigger never actually rotated
the ID token in production. It now skips the upstream call only when
the row was rewritten since the caller read it.

- Add an end-to-end test against the real refresher and mockoidc
- Back off briefly after a failed ID-token refresh instead of until
  access-token expiry, so a transient error does not reopen the window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Compare expiry when detecting a rotated token row

A provider that re-issues the same access token string with a new
expiry would not count as a change, so a queued caller would redeem
the refresh token a second time. Also test the failed-refresh backoff
window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Always refresh upstream tokens on expired ID token

The opt-in option was not wired into any production caller, so #6237
stayed unfixed in practice. Refreshing on an expired ID toke... (continued)

98 of 98 new or added lines in 2 files covered. (100.0%)

436 existing lines in 7 files now uncovered.

86545 of 121469 relevant lines covered (71.25%)

126.58 hits per line

Coverage Regressions

Lines Coverage ∆ File
226
44.59
-0.22% cmd/thv-operator/api/v1beta1/zz_generated.deepcopy.go
80
90.77
0.15% cmd/thv-operator/pkg/controllerutil/authserver.go
70
81.47
0.0% cmd/thv-operator/api/v1beta1/mcpexternalauthconfig_types.go
50
86.24
-0.82% pkg/authserver/spiffe_trust.go
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
3
83.0
-0.18% pkg/authserver/storage/redis.go
1
93.05
0.0% pkg/authserver/storage/memory.go
Jobs
ID Job ID Ran Files Coverage
1 38576322591.1 14 Oct 2026 02:06PM UTC 953
71.25
GitHub Action Run
Source Files on build 38576322591
  • Tree
  • List 953
  • Changed 14
  • Source Changed 8
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38576322591
  • ce74cfa3 on github
  • Prev Build on main (#38573361668)
  • Next Build on main (#38588411863)
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