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

stacklok / toolhive / 30286866222
70%

Build:
DEFAULT BRANCH: main
Ran 27 Jul 2026 05:02PM UTC
Jobs 1
Files 841
Run time 3min
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

27 Jul 2026 04:54PM UTC coverage: 69.601% (-0.01%) from 69.615%
30286866222

push

github

web-flow
Fix Cedar deny-all when upstream JWT lacks identity claims (#6022)

With the embedded auth server active, the runner force-injects the first
upstream as Cedar's PrimaryUpstreamProvider, so policies were evaluated
against that provider's access token alone. Many OIDC providers assert
profile claims only in the id_token, so a JWT-shaped access token without
`email` parsed cleanly, never hit the opaque-token fallback from #5147, and
left `principal has claim_email` false for every user: tools/list returned
empty and tools/call 403, with no diagnostic. Audit logging reads the
AS-issued token, so it kept naming the correct user and pointed
investigations away from authorization.

Supplement the missing profile claims from the same provider's stored
id_token. `name` and `email` fall back to it when the access token omits
them; access-token values always win. Provenance is preserved by
construction, so `principal has claim_email` still means "this upstream
asserted an email".

The ToolHive-issued token is deliberately not a claim source here. In a
multi-upstream chain its mirrored name/email always belong to the FIRST
configured upstream (validateChain pins chain[0] to upstreams[0], and only
the first leg resolves identity from its provider), while
primaryUpstreamProvider may name any upstream — so using it would attribute
one IdP's email to another.

`sub` is never supplemented: it becomes the Cedar principal entity ID, where
Cedar offers no `has`-style guard, so a missing access-token `sub` fails
closed with ErrMissingPrincipal rather than having a principal chosen for it.

The id_token is read without checking `exp`, deliberately. It is a record of
what the upstream asserted at login, not a presented credential; enforcement
of that contract belongs at the RFC 8693 consumer. Enforcing it here would
let a policy permit early in a session and silently deny later, since
sessions outlive id_tokens by days.

Two rate-limited warnings make the condition diagnosa... (continued)

89 of 92 new or added lines in 1 file covered. (96.74%)

34 existing lines in 9 files now uncovered.

80590 of 115789 relevant lines covered (69.6%)

86.47 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
96.63
-0.2% pkg/authz/authorizers/cedar/core.go

Coverage Regressions

Lines Coverage ∆ File
7
61.52
-0.6% pkg/workloads/manager.go
6
20.11
-3.45% pkg/client/manager.go
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
3
73.79
-2.91% pkg/state/local.go
3
67.14
-4.29% pkg/state/runconfig.go
3
49.27
-0.62% pkg/transport/stdio.go
2
96.05
0.0% pkg/authserver/storage/memory.go
2
93.94
-6.06% pkg/foreach/foreach.go
2
71.92
-0.24% pkg/transport/proxy/streamable/streamable_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 30286866222.1 27 Jul 2026 05:02PM UTC 841
69.6
GitHub Action Run
Source Files on build 30286866222
  • Tree
  • List 841
  • Changed 11
  • Source Changed 1
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30286866222
  • e837d694 on github
  • Prev Build on main (#30284275715)
  • Next Build on main (#30292044720)
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