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

stacklok / toolhive / 45139848235
75%

Build:
DEFAULT BRANCH: main
Ran 23 Nov 2026 08:44AM UTC
Jobs 1
Files 1046
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

23 Nov 2026 08:35AM UTC coverage: 73.684% (-0.02%) from 73.706%
45139848235

push

github

web-flow
Add the subject resolver and actor policy packages (#7215)

* Add subject resolver types

Tokens name a user by a claim from an issuer, and the token exchange,
the vMCP and embedders must all map that claim to the same local user.
Put the lookup key, the Resolver interface and its three failure modes
in a leaf package under pkg/authserver, next to pkg/authserver/identity,
so the authorization server does not depend on pkg/auth and other
callers can import it without pulling in the rest of the server.

ErrUnknown refuses the token, ErrAmbiguous lets directory-backed
resolvers refuse an identity that matches two users, and
ErrUnavailable tells callers to answer with a server error rather
than invalid_grant so the client can retry.

Closes #7157

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

* Add standalone subject resolver

Delegated-access redemption needs to turn an identity-provider subject
into the local user it belongs to. Add a subject.Resolver for the
standalone authorization server that reads the provider-identity rows
it already keeps (see the "Subject resolver" part of the delegated
access issue).

The resolver is built from a map of issuer to (provider name, subject
claim). An unknown issuer, a claim other than the provider's subject
claim, a missing row, or a row whose user is missing is ErrUnknown;
any other storage error is ErrUnavailable. It never returns an empty
user with a nil error. Rows exist only for the identity-provider
sign-in leg, so later legs never resolve.

A row alone does not prove the user exists: Redis deletes the user
record before it cleans up the user's rows, best effort, so a stale
row can outlive its user. Like the sign-in path, the resolver also
loads the user and treats a missing one as ErrUnknown.

Mapping an issuer to a provider asserts that the issuer's subject
claim values are the subjects that provider's sign-in stores; a wrong
mapping resolves to the wrong user. New accepts several issuers for
one provider, b... (continued)

145 of 177 new or added lines in 6 files covered. (81.92%)

62 existing lines in 6 files now uncovered.

97978 of 132971 relevant lines covered (73.68%)

880.76 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
0.0
pkg/authserver/actor/mocks/mock_policy.go
15
0.0
pkg/authserver/subject/mocks/mock_resolver.go
2
91.67
pkg/authserver/subject/binding_claim.go

Coverage Regressions

Lines Coverage ∆ File
45
59.63
-4.27% pkg/workloads/manager.go
11
93.64
-0.06% pkg/authserver/server/tokenexchange/refresh_token_handler.go
3
0.0
-100.0% pkg/workloads/sysproc_unix.go
1
98.46
0.01% pkg/authserver/server/tokenexchange/exchange_grant.go
1
88.02
-0.12% pkg/transport/proxy/transparent/transparent_proxy.go
1
94.66
-0.76% pkg/vmcp/composer/dag_executor.go
Jobs
ID Job ID Ran Files Coverage
1 45139848235.1 23 Nov 2026 08:44AM UTC 1046
73.68
GitHub Action Run
Source Files on build 45139848235
  • Tree
  • List 1046
  • Changed 9
  • Source Changed 4
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #45139848235
  • 122fdefb on github
  • Prev Build on main (#45068316202)
  • Next Build on main (#45151614249)
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