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

stacklok / toolhive / 39842073365
73%

Build:
DEFAULT BRANCH: main
Ran 22 Oct 2026 07:50PM UTC
Jobs 1
Files 972
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

22 Oct 2026 07:39PM UTC coverage: 71.647% (+0.1%) from 71.542%
39842073365

push

github

web-flow
Support authorization_details on token exchange (#6921)

* Add authorizationdetails package

Token exchange needs RFC 9396 authorization_details support for delegated
clients (#6894). Add a Go-only, immutable registry that maps a type name to
the grant types it applies to and a Grant hook. Parsing enforces the RFC 9396
structure plus ToolHive policy: duplicate and case-folded member names, a
64 KiB limit and depth 64. Grant calls each hook once with all of its
entries and the request context, validates the hook output to the same
limits, and returns the granted details in a fixed order. Hooks decide only;
the package does not persist details or put them in tokens.

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

* Support authorization_details on token exchange

Delegated clients such as Mecatl name a session or schedule grant with an
authorization_details entry on token exchange (#6894). With a registry
configured, the handler rejects a repeated parameter with invalid_request
(RFC 6749 section 5.2), parses the details before the subject token is
checked, and calls the type hooks after the subject, consent, scope and
audience checks. The response echoes what the hooks granted, only after the
token is issued. Typed hook errors become invalid_authorization_details or
invalid_request with a safe reason; other hook failures become server_error.
Each rejection is logged once at WARN with a fixed reason; hook error text
is never logged, since it could carry credentials or request data. Without
a registry the parameter is ignored, as before.

The registry is passed through a functional factory option,
authserver.Config and runner.WithAuthorizationDetailsRegistry. Setting it
while token exchange is disabled is a startup error. Docs describe the
behaviour and its limits: details are not put in tokens, persisted or sent
to resource servers yet (#6909, #6895).

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

* Fix golangci-lint findings in authorization_details

CI's ... (continued)

331 of 337 new or added lines in 10 files covered. (98.22%)

7 existing lines in 2 files now uncovered.

89034 of 124268 relevant lines covered (71.65%)

127.37 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
98.15
pkg/authserver/authorizationdetails/authorizationdetails.go
2
66.67
pkg/authserver/authorizationdetails/errors.go
2
85.09
0.12% pkg/authserver/runner/embeddedauthserver.go

Coverage Regressions

Lines Coverage ∆ File
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
1
81.07
-0.12% pkg/vmcp/composer/workflow_engine.go
Jobs
ID Job ID Ran Files Coverage
1 39842073365.1 22 Oct 2026 07:50PM UTC 972
71.65
GitHub Action Run
Source Files on build 39842073365
  • Tree
  • List 972
  • Changed 11
  • Source Changed 6
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39842073365
  • 76b09c0d on github
  • Prev Build on main (#39840999664)
  • Next Build on main (#39850913766)
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