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

Set client_credentials as the default OAuth2 grant type. #1238

Open
RobertIndie opened this issue Jul 9, 2024 · 1 comment
Open

Set client_credentials as the default OAuth2 grant type. #1238

RobertIndie opened this issue Jul 9, 2024 · 1 comment

Comments

@RobertIndie
Copy link
Member

Is your feature request related to a problem? Please describe.

Currently, the go client doesn't support setup OAuth2 params without the grant type to be specified.
The broker only supports the client_credentials grant type. It would be better to make this the default grant type for the Go client. This change would align the Go client's behavior with that of the Java client.

Describe the solution you'd like
Set client_credentials as the default OAuth2 grant type.

Describe alternatives you've considered
None yet

Additional context
None

@geniusjoe
Copy link
Contributor

geniusjoe commented Jul 24, 2024

Currently, Pulsar clients only support the client_credentials authentication type. The authentication type determines how to obtain an access token through an OAuth 2.0 authorization service.

https://pulsar.apache.org/docs/3.3.x/security-oauth2/#configure-oauth2-authentication-in-pulsar-clients

Since the latest pulsar version only support using client_credentials as an authentication type in OAuth, I think we can stay consistent with Java client. Maybe we need to handle params[ConfigParamType] return nil or empty string cases in NewAuthenticationOAuth2WithParams() function.

Besides, these code seems to be duplicated from pulsar/auth/oauth2.go to pulsaradmin/pkg/admin/auth/oauth2.go, I think we may need to change these code snippets together.

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