Class AuthenticationProviderOpenID

java.lang.Object
org.apache.pulsar.broker.authentication.oidc.AuthenticationProviderOpenID
All Implemented Interfaces:
Closeable, AutoCloseable, AuthenticationProvider

public class AuthenticationProviderOpenID extends Object implements AuthenticationProvider
An AuthenticationProvider implementation that supports the usage of a JSON Web Token (JWT) for client authentication. This implementation retrieves the PublicKey from the JWT issuer (assuming the issuer is in the configured allowed list) and then uses that Public Key to verify the validity of the JWT's signature. The Public Keys for a given provider are cached based on certain configured parameters to improve performance. The tradeoff here is that the longer Public Keys are cached, the longer an invalidated token could be used. One way to ensure caches are cleared is to restart all brokers. Class is called from multiple threads. The implementation must be thread safe. This class expects to be loaded once and then called concurrently for each new connection. The cache is backed by a GuavaCachedJwkProvider, which is thread-safe. Supported algorithms are: RS256, RS384, RS512, ES256, ES384, ES512 where the naming conventions follow this RFC: https://datatracker.ietf.org/doc/html/rfc7518#section-3.1.