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

stacklok / toolhive / 46151264258
75%

Build:
DEFAULT BRANCH: main
Ran 28 Nov 2026 01:56PM UTC
Jobs 1
Files 1094
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

28 Nov 2026 01:46PM UTC coverage: 75.151% (+0.07%) from 75.085%
46151264258

push

github

web-flow
Bind provider-identity rows to their issuer and claim

* Add issuer and claim binding to identity storage

Store Issuer and SubjectClaim on ProviderIdentity in memory and Redis
(additive omitempty JSON members so pre-upgrade rows still decode as
unstamped and older readers ignore the new fields).

Add optional ProviderIdentitySwapper with atomic CompareAndSwapProviderIdentity
so callers can stamp unstamped rows without clobbering timestamps and
atomically replace mismatched rows while detaching the previous user's
reverse index. Harden Redis DeleteUser and GetUserProviderIdentities
against stale reverse-index entries, and preserve binding fields in
MigrateLegacyUpstreamData. Keep UserStorage unchanged for external
storage decorators.

Co-authored-by: Mecatl <noreply@mecatl.dev>

* Enforce issuer and claim binding at sign-in

Stamp each upstream's issuer and subject claim onto new provider-identity
rows during sign-in (OIDC issuer + subject_claim, or mode-prefixed
endpoint URL + extraction rule for plain OAuth 2.0) and enforce them on
lookup across authorization-code callback, remembered consent, and device
verification.

Legacy unstamped rows match on first use and are atomically stamped via
ProviderIdentitySwapper with a once-per-resolver WARN (decision A1).
Mismatched rows create a new user and atomically replace the link,
leaving the previous user untouched (decision B1), while respecting
WithCreateOnlyFor and refusing to adopt a mismatched row in
resolveLinkFailure. Keep ResolveUser's signature unchanged and skip
stamping when external decorators omit ProviderIdentitySwapper.

Co-authored-by: Mecatl <noreply@mecatl.dev>

* Check row issuer and claim in subject resolver

Verify that the stored ProviderIdentity row's issuer and subject claim
match the requested subject.Ref before resolving to a local user. Rows
stamped under a different issuer or subject claim (or half-stamped rows)
are refused with subject.ErrUnknown without writing to storage.

Ac... (continued)

436 of 492 new or added lines in 13 files covered. (88.62%)

7 existing lines in 2 files now uncovered.

105649 of 140583 relevant lines covered (75.15%)

985.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
19
92.12
-7.88% pkg/authserver/server/handlers/user.go
9
85.22
-0.02% pkg/authserver/server_impl.go
6
95.33
-2.33% pkg/authserver/storage/types.go
6
71.43
-28.57% pkg/authserver/storage/unwrap.go
4
95.55
0.06% pkg/authserver/server/handlers/callback.go
4
92.86
0.33% pkg/authserver/server/handlers/handler.go
3
73.67
0.28% pkg/authserver/server/handlers/device_verification.go
3
84.71
0.15% pkg/authserver/storage/redis.go
2
94.15
-0.1% pkg/authserver/storage/memory.go

Coverage Regressions

Lines Coverage ∆ File
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
1
96.77
-3.23% pkg/foreach/foreach.go
Jobs
ID Job ID Ran Files Coverage
1 46151264258.1 28 Nov 2026 01:56PM UTC 1094
75.15
GitHub Action Run
Source Files on build 46151264258
  • Tree
  • List 1094
  • Changed 17
  • Source Changed 13
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #46151264258
  • f14c9239 on github
  • Prev Build on main (#46135486234)
  • Next Build on main (#46154083452)
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