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

stacklok / toolhive / 34469696838
71%

Build:
DEFAULT BRANCH: main
Ran 10 Sep 2026 11:15AM UTC
Jobs 1
Files 916
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

10 Sep 2026 11:08AM UTC coverage: 70.501% (+0.02%) from 70.486%
34469696838

push

github

web-flow
Add SPIFFE client authentication dispatch (#6562)

* Add SPIFFE client authentication dispatch

X.509-SVID (#6202) and JWT-SVID (#6203) client authentication both replace
the same fosite ClientAuthenticationStrategy: one dispatches on an assertion
type in the request form, the other on a SPIFFE ID placed in the request
context by an mTLS listener. Introducing that hook once, before either lands,
keeps both credential types resolving through a single path so they cannot
grow divergent principals.

Behaviour is unchanged. Both SPIFFE arms return invalid_client with a
not-implemented hint, and everything else falls through to fosite's default
strategy, so RFC 7523 jwt-bearer and secret-based client authentication are
untouched. The strategy is installed after NewOAuth2Provider because the
default strategy is a method on the provider and fosite reads the config
field per request.

Also restores the fail-closed token-endpoint coverage that was reduced to
principal-equivalence assertions, and renames those assertions to match what
they check.

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

* Break SPIFFE resolver import cycle

Both client-authentication arms must resolve a verified SPIFFE ID through
SPIFFEAssociationRegistry.Resolve, but the registry lives in package
authserver and the strategy in package authserver/server, which authserver
already imports. The strategy could not reach it. Left unresolved, #6202 and
the divergence this dispatch exists to prevent.

The two arms, built independently on the pre-resolver base, converged on the
same shape: a function type in package server returning fosite.Client (what
fosite.ClientAuthenticationStrategy needs), implemented as a closure built in
server_impl.go where the association registry and storage are already in
scope. A resolver interface returning a principal was a dead end here since
the strategy still needs a fosite.Client. Adopt that shape as
server.SPIFFEClientResolver, covering both X.509 and... (continued)

111 of 118 new or added lines in 5 files covered. (94.07%)

33 existing lines in 9 files now uncovered.

80483 of 114158 relevant lines covered (70.5%)

93.19 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
82.25
0.65% pkg/authserver/server_impl.go
2
94.39
6.64% pkg/authserver/spiffe_association_registry.go

Coverage Regressions

Lines Coverage ∆ File
9
53.7
0.0% cmd/thv/app/ai_plugin_install.go
6
27.27
0.0% cmd/thv/app/ai_plugin_push.go
4
63.89
-0.42% pkg/workloads/manager.go
3
82.77
-0.23% pkg/authserver/storage/redis.go
3
61.43
-4.29% pkg/state/runconfig.go
2
68.8
-0.85% pkg/ignore/processor.go
2
87.32
0.0% pkg/plugins/pluginsvc/build.go
2
73.24
-0.29% pkg/transport/proxy/streamable/streamable_proxy.go
2
55.58
-0.52% pkg/transport/stdio.go
Jobs
ID Job ID Ran Files Coverage
1 34469696838.1 10 Sep 2026 11:15AM UTC 916
70.5
GitHub Action Run
Source Files on build 34469696838
  • Tree
  • List 916
  • Changed 17
  • Source Changed 9
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34469696838
  • 9fe5c43a on github
  • Prev Build on main (#34458674571)
  • Next Build on main (#34471073125)
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