For machine clients using client_credentials, Sphinx supports client_secret_basic and client_secret_post. We run a client service at many customer sites, and a shared secret there is a reusable password stored on a machine we don't control.
Could Sphinx support private_key_jwt client authentication (OpenID Connect Core, section 9, RFC 7523)?
What it would need
- Registering a public key, or a JWKS URI, on a client app, alongside or instead of
ClientSecrets. - Accepting
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearerwith a signedclient_assertionat/oauth/token, and checking:- the signature against the client's registered key
issandsubequal to the client idaudequal to the token endpointexp, andjtinot seen before
- Advertising it in
token_endpoint_auth_methods_supported. - Ideally, ES256 or EdDSA signing on the client side without shipping OpenSSL (see Enable TMS Crypto Pack as a signing method in Bcl).
Why
- No reusable secret sits on the client machine. Only the server holds the public key.
- Keys can be rotated per client by registering several public keys, the same way
ClientSecretsaccepts several secrets.
The constants for this are already in Sphinx.Consts.pas, but nothing uses them yet.