Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OAuth2 client authentication while using ConnectionFactory#createConnection(username/password) #49

Open
eolivelli opened this issue Jul 8, 2022 · 1 comment

Comments

@eolivelli
Copy link
Collaborator

Pulsar client supports OAuth2 client authentication
https://pulsar.apache.org/docs/security-oauth2/

and you can already use it by configuring the PulsarConnectionFactory via authPlugin and authParams.

but there is a request to support it while using ConnectionFactory#createConnection(username/password).

the most straight forward way of mapping OAuth2 client credentials is to map:

  • username -> client_id
  • password -> client_secret

and leave all the other parameters to be set in the ConnectionFactory configuration:

  • jms.oauth2.issuerUrl
  • jms.oauth2.audience
  • jms.oauth2.scope
  • jms.oauth2. client_email

The JMS client will create the "credentials" to be passed to the the AuthenticationFactoryOAuth2.clientCredentials method

@michaeljmarshall
Copy link
Member

@eolivelli - yes, I think these configuration options make sense. The scope, audience, and client_email are optional for some identity providers, so we'll want to treat the as optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants