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

OAuth implementation #53

Closed
SravanThotakura05 opened this issue Feb 5, 2024 · 3 comments · Fixed by #66
Closed

OAuth implementation #53

SravanThotakura05 opened this issue Feb 5, 2024 · 3 comments · Fixed by #66

Comments

@SravanThotakura05
Copy link
Collaborator

Currently we have finalised the below approach which is implemented for other connectors.

To use the OAuth 2.0 Client Credentials Grant, configure the following parameters.

Token Provider URL: The endpoint URL to acquire new access tokens.
Client ID: The identifier for the application requesting the token.
Client Secret: A secret known only to the application and the authorization server.
Scope: (Optional) The scope of the access request.
Resource: (Optional) The target resource for the access token.
Audience: (Optional) The intended audience for the token.
Refresh Buffer Time: The absolute time period in which the application will fetch a new token to keep the connection alive.
Custom Parameters: (Optional) Additional HTTP token request parameters.

The application during the start will fetch the access token and connects to Solace. Based on Refresh Buffer Time(which ideally should be less than token expiry time) we will send a request to fetch new access token and update the current solace session to use new token.

Considerations:

  1. We need http client dependency
  2. Enabling/Disabling SSL on token provider URL
@SravanThotakura05
Copy link
Collaborator Author

@ozangunalp we have drafted the configurations required for OAuth implementation in Quarkus Extension for Solace.

@ozangunalp
Copy link
Collaborator

I think you can get some inspiration from the https://github.com/Apicurio/apicurio-common-rest-client
In Quarkus we are using the vertx client module. It depends on vertx-web-client and jackson databind.

@ozangunalp
Copy link
Collaborator

And even better, there is an oauth2 client extension with built-in token refresh : https://quarkus.io/guides/security-openid-connect-client-reference

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

Successfully merging a pull request may close this issue.

2 participants