Open nodece opened 1 year ago
The issue had no activity for 30 days, mark with Stale label.
Would the idea be to maintain the current config / approach for configuring / using a single key? i.e., in addition to a tokenKeySetKey
config - do we keep the configs like tokenPublicKey
, tokenAuthClaim
, tokenAuthClaim
, etc. I would assume yes, for backwards compatibility and supporting folks with simpler use cases (e.g. single, non-rotating key)
Thanks
So I am late to the game, as I see https://github.com/apache/pulsar/pull/18336 was worked on - but closed.
We happily use JWT auth today though - and if we had the JWKS functionality we would be even happier. I am hesitate to move to OpenID auth though, as it is rather more complex than the super simple sign/verify JWT auth. Is there any contribution, etc. I could make to revive this PIP and https://github.com/apache/pulsar/pull/18336?
Thanks
Discussion: https://lists.apache.org/thread/kvkrcyrkv2h15jvbj3oogojqn4vm6092 Vote: https://lists.apache.org/thread/03v8dz51j47z2mbbsb4yyms0hqkk9jc3
Motivation
Usually, we use one public or secret key to verify the JWT in the Pulsar, but some user needs to use different keys to verify the JWT.
This is an excellent issue to improve JWT security, the client can send the different JWT to the broker and then verify by the broker using the corresponding key.
See https://github.com/apache/pulsar/issues/8152
Goal
https://openid.net/specs/draft-jones-json-web-key-03.html defines the JSON Web Key Set (JWKS), which includes a set of public keys containing the RSA or ECDSA algorithms issued by the OAuth2 server, which is used to verify the JSON Web Token(JWT).
The PIP goal adds the JWKS feature to provide the rotation of validation keys.
API Changes
No response
Implementation
This feature needs to define a
tokenKeySetKey
config in the broker config file to input JWKS data to the AuthenticationProviderToken, then parse this JWKS data to generate all the keys when initing the AuthenticationProviderToken. The JWT and JWK are associated based onkid
value, one from the JWT header, one from the JWK body.JWKS body:
JWT header:
tokenKeySetKey
format:Alternatives
No response
Anything else?
RP: https://github.com/apache/pulsar/pull/18336
Reference: