Repository navigation
Release v0.68.0 - #7243
Release v0.68.0#7243
Conversation
Release-Triggered-By: rdimitrov
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7243 +/- ##
==========================================
- Coverage 81.64% 81.64% -0.01%
==========================================
Files 903 903
Lines 91789 91789
==========================================
- Hits 74939 74938 -1
- Misses 16845 16846 +1
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
📝 Generated release notes for
|
| Config | Accepted callers |
|---|---|
serviceAccount: X |
Only system:serviceaccount:<ns>:X. <ns> is namespace if set, otherwise the namespace of the workload that references the config. |
namespace: N only |
Any service account in namespace N (sub starts with system:serviceaccount:N:) |
Neither set ({}) |
No subject restriction. Audience-only behaviour, unchanged from before. |
- Rejected requests: callers that don't match get
401 invalid_token("invalid subject"). The server logs the rejected and required subject at WARN, at most once per subject every 5 minutes. - Admission validation: both fields are now validated as DNS-1123 names (
serviceAccount≤ 253 chars,namespace≤ 63 chars). A value such assystem:serviceaccount:ns:sa, or one containing uppercase letters or underscores, is now rejected at admission. - Clusters without CRD validation ratcheting: on clusters older than Kubernetes 1.30, or where ratcheting is disabled, any update to a stored object that holds such a value (including finalizer removal) may be rejected. Fix these values before upgrading.
Common trap: the old docs said serviceAccount was "the service account to validate tokens for" and that it defaulted to the pod's own service account. Many configs therefore set it to the server's own service account. After upgrading, only that service account can call the server.
Before
apiVersion: toolhive.stacklok.dev/v1beta1
kind: MCPOIDCConfig
spec:
type: kubernetesServiceAccount
kubernetesServiceAccount:
serviceAccount: mcp-server # the server's own SA; silently ignored in v0.67.xAfter
apiVersion: toolhive.stacklok.dev/v1beta1
kind: MCPOIDCConfig
spec:
type: kubernetesServiceAccount
kubernetesServiceAccount:
# Option A: allow exactly one caller service account
serviceAccount: my-agent
namespace: agents # optional; defaults to the referencing workload's namespace
# Option B: allow any service account in a namespace
# namespace: agentsMigration steps
- List every
MCPOIDCConfigwithtype: kubernetesServiceAccount, and check itsserviceAccountandnamespacevalues. - Change them to name the calling workload's service account, or use the namespace-only form to allow several callers. Only one service account can be named per config.
- Make sure both values are valid DNS-1123 names. Use the bare service account name, not the full
system:serviceaccount:...subject. - After upgrading, watch the server logs for
token subject rejected by OIDC subject restrictionwarnings to find callers you missed. - Leaving both fields empty restores the old audience-only behaviour. That is the weaker mode and is not recommended.
Commit: 5d2fd9a (security fix)
Migration guide: Client assertion aud must be the issuer, and nothing else
Who is affected: private_key_jwt clients of the embedded authorization server that send the token endpoint URL ({issuer}/oauth/token) as aud, an array with more than one value, or a missing or empty aud.
- Endpoints: this applies everywhere the server authenticates clients: token, token exchange, revocation, introspection and PAR.
- Encoding: assertions with non-canonical encoding (padded base64, or whitespace inside a segment) are refused too.
- Client libraries: Spring Security and authlib use the token endpoint URL as
audby default, so clients built on them need reconfiguring. - Unchanged: SPIFFE JWT-SVID client authentication, and the
audchecks on JWT-bearer and ID-JAG grant assertions. - ToolHive components: none of them sign client assertions for the embedded server, so none are affected.
This closes the audience injection attack described in RFC 10070 §4. The token-URL form has been documented as deprecated since v0.58.0.
Before
{ "iss": "my-client", "sub": "my-client", "aud": "https://as.example.com/oauth/token" }{ "iss": "my-client", "sub": "my-client", "aud": ["https://as.example.com", "https://other-as.example"] }After
{ "iss": "my-client", "sub": "my-client", "aud": "https://as.example.com" }(A one-element array, ["https://as.example.com"], is also accepted.)
Migration steps
- Configure every
private_key_jwtclient to send the authorization server's issuer, exactly as published in discovery metadata, as the onlyaudvalue. - Roll out the client change before upgrading the server. Earlier releases already accept the issuer form, so this order needs no downtime.
- If you share Redis across replicas, expect intermittent 401s during a rolling upgrade for any client that hasn't switched yet.
- Watch for WARN log lines naming the refused
client_id.
Migration guide: ID-JAG redemption requires client authentication, and cnf-bound assertions are refused
Who is affected:
- Public clients that redeem ID-JAGs: any CIMD client, or a DCR client with
token_endpoint_auth_method: none. These now get401 invalid_client, with the reasonclient_authentication_required. The ID-JAG is not consumed, so a confidential client can still redeem it. - ID-JAG requests with no client credentials: these used to get
invalid_request. They now get401 invalid_client. - IdPs that put a
cnf(RFC 7800) claim in ID-JAGs or plain RFC 7523 assertions: any value is refused with400 invalid_grant, includingnulland{}. Proof of possession (DPoP or mTLS) isn't supported yet, and there is no opt-out.
ToolHive's own callers are unaffected. ToolHive never mints ID-JAGs with cnf, and vMCP's XAA strategy always authenticates as a confidential client.
Before
# DCR registration
token_endpoint_auth_method: none
# Token request
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=<ID-JAG>&client_id=my-appAfter
# DCR registration
token_endpoint_auth_method: private_key_jwt # or client_secret_basic / client_secret_post
# Token request
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=<ID-JAG>
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=<JWT with aud=issuer>Migration steps
- Re-register every client that redeems ID-JAGs as a confidential client (
client_secret_basic,client_secret_postorprivate_key_jwt). - Update those clients to authenticate at the token endpoint. For
private_key_jwt, use the issuer asaud(see the previous guide). - Configure your IdP not to include a
cnfclaim in the ID-JAGs or JWT-bearer assertions it issues for this server.
🆕 New Features
- Embedded authorization server issuers can now be limited to plain RFC 7523 JWT-bearer assertions or to ID-JAG assertions with the new optional per-issuer
acceptedAssertionTypesfield (jwt_bearer,id_jag). Leaving it out accepts both, as before. (#6678) VirtualMCPServerOIDC config gains optionalrequiredSubjectandrequiredSubjectPrefixfields. The operator fills them in from the referencedMCPOIDCConfig. (5d2fd9a)- New
subjectresolver andactorpolicy packages lay the groundwork for delegated access. Nothing calls them yet. (#7215)
🐛 Bug Fixes
- vMCP pods no longer flood the info log with routine cache-sync messages from readiness checks. These messages now log at debug, and sync-failure warnings are unchanged. (#7216)
🧹 Misc
- The
authorization_detailsparameter reader and the hookSubjectbuilder are shared across token exchange and exchange-grant opening, with no behaviour change. (#7217) - JWT-bearer and ID-JAG redemption handlers now take their dependencies as a single struct, which makes future additions easier. (#7220)
📦 Dependencies
| Module | Version |
|---|---|
golang.org/x/exp/jsonrpc2 |
digest e1094ee |
actions/create-github-app-token |
v3.4.0 |
anthropics/claude-code-action |
v1.0.286 |
github/codeql-action |
v4.39.4 |
slackapi/slack-github-action |
v4.1.0 |
zizmorcore/zizmor-action |
v0.9.0 |
👋 Welcome to our newest contributor: @FOWEPJF255 🎉
Full commit log
What's Changed
- Gate ID-JAG by issuer assertion types by @jhrozek in Gate ID-JAG by issuer assertion types #6678
- Log routine vMCP cache sync messages at debug by @FOWEPJF255 in Log routine vMCP cache sync messages at debug #7216
- Refuse unauthenticated ID-JAG clients and cnf-bound assertions by @jhrozek in Refuse unauthenticated ID-JAG clients and cnf-bound assertions #7214
- Require the issuer as the only client assertion aud by @jhrozek in Require the issuer as the only client assertion aud #7213
- Update golang.org/x/exp/jsonrpc2 digest to e1094ee by @renovate[bot] in Update golang.org/x/exp/jsonrpc2 digest to e1094ee #7206
- Update github actions by @renovate[bot] in Update github actions #7209
- Share the authorization_details reader by @jhrozek in Share the authorization_details reader #7217
- Add the subject resolver and actor policy packages by @jhrozek in Add the subject resolver and actor policy packages #7215
- Pass redemption handler dependencies as a struct by @jhrozek in Pass redemption handler dependencies as a struct #7220
- Release v0.68.0 by @toolhive-release-app[bot] in Release v0.68.0 #7243
New Contributors
- @FOWEPJF255 made their first contribution in Log routine vMCP cache sync messages at debug #7216
Full Changelog: v0.67.1...v0.68.0
🔗 Full changelog: v0.67.1...v0.68.0
Release v0.68.0
Version Bump
minor release
Files Updated
VERSIONdeploy/charts/operator-crds/Chart.yaml(path:version)deploy/charts/operator-crds/Chart.yaml(path:appVersion)deploy/charts/operator/Chart.yaml(path:version)deploy/charts/operator/Chart.yaml(path:appVersion)deploy/charts/operator/values.yaml(path:operator.image)deploy/charts/operator/values.yaml(path:operator.toolhiveRunnerImage)deploy/charts/operator/values.yaml(path:operator.vmcpImage)Next Steps
Checklist