Files
1df516d316 oidc: an application that cannot sign names the cert it names and why (#42)
An application whose row names a cert that is not a platform signing cert
answered the token exchange with "this application has no signing cert, so
no token can be issued for it". That is wrong on its face for the case in
hanzo-inc/cloud#757: an organization adds a certificate, points its
application at it, and is told it has none. The reason is the trust
boundary in store.GetSigningCert: only certs under the reserved platform
owners sign, because only the platform holds signing keys.

signerFor now returns unsignableError. It wraps ErrNoSigningCert and names
the registration, the cert it names, and why that cert cannot sign. The
three cases are no cert, the delegation key, and a cert that is not one of
the platform's. mintError answers with that text, plus the remedy: a
platform administrator points the application at a platform signing cert.
Names are quoted within RFC 6749 section 5.2's character set and capped.
Nothing about signing or trust changes.

Testing: internal/oidc/unsignable_test.go fails on the previous token.go.
The full internal/oidc package passes, and internal/oidc and server pass
under -race. CI test-amd64 is green.
Risk: low. Only the error_description of an already-failing 500 changes.
How to revert: git revert this commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 13:26:00 -05:00
..
2026-10-24 01:42:25 -04:00