-
Notifications
You must be signed in to change notification settings - Fork 595
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 credential refresh for OAuth 2/JWT authentication scenarios #956
Comments
This was referenced Oct 20, 2020
Are you still aiming for fixing this issue in the 7.0.0 release? |
lukebakken
added a commit
that referenced
this issue
Sep 21, 2023
lukebakken
added a commit
to rabbitmq/rabbitmq-website
that referenced
this issue
Oct 2, 2023
michaelklishin
pushed a commit
to rabbitmq/rabbitmq-website
that referenced
this issue
Oct 5, 2023
lukebakken
added a commit
that referenced
this issue
Oct 5, 2023
Follow-up to: * #956 * #1346 UAA service, RabbitMQ mounts for UAA Source code checkout happens _after_ service containers are started Use conventional-actions/docker-run@v1 Start adding test project for OAuth2 Converting OAuth2 test program to Xunit Run OAuth2 tests using `dotnet test` Refactor test to use async/await when available Remove TestApplications/OAuth2 Simplify APIApproval a bit
lukebakken
added a commit
that referenced
this issue
Oct 5, 2023
Follow-up to: * #956 * #1346 UAA service, RabbitMQ mounts for UAA Source code checkout happens _after_ service containers are started Use conventional-actions/docker-run@v1 Start adding test project for OAuth2 Converting OAuth2 test program to Xunit Run OAuth2 tests using `dotnet test` Refactor test to use async/await when available Remove TestApplications/OAuth2 Simplify APIApproval a bit
lukebakken
added a commit
that referenced
this issue
Oct 5, 2023
Follow-up to: * #956 * #1346 UAA service, RabbitMQ mounts for UAA Source code checkout happens _after_ service containers are started Use conventional-actions/docker-run@v1 Start adding test project for OAuth2 Converting OAuth2 test program to Xunit Run OAuth2 tests using `dotnet test` Refactor test to use async/await when available Remove TestApplications/OAuth2 Simplify APIApproval a bit Ensure main workflow does NOT run OAuth2 tests
lukebakken
added a commit
that referenced
this issue
Oct 6, 2023
Follow-up to: * #956 * #1346 UAA service, RabbitMQ mounts for UAA Source code checkout happens _after_ service containers are started Use conventional-actions/docker-run@v1 Start adding test project for OAuth2 Converting OAuth2 test program to Xunit Run OAuth2 tests using `dotnet test` Refactor test to use async/await when available Remove TestApplications/OAuth2 Simplify APIApproval a bit
lukebakken
added a commit
that referenced
this issue
Oct 6, 2023
Follow-up to: * #956 * #1346 UAA service, RabbitMQ mounts for UAA Source code checkout happens _after_ service containers are started Use conventional-actions/docker-run@v1 Start adding test project for OAuth2 Converting OAuth2 test program to Xunit Run OAuth2 tests using `dotnet test` Refactor test to use async/await when available Remove TestApplications/OAuth2 Simplify APIApproval a bit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Modern RabbitMQ versions support OAuth 2/JWT token authentication.
In practical terms this means that on the client side, a JWT token has to be provided in the password field. The username will be ignored (all relevant information will be taken from the decoded token).
You can make such a connection today, there's nothing to change in the client.
However, JWT tokens have limited shelf life. When they expire, no operations performed by a client will be accepted as token validation will fail. Since the protocols RabbitMQ supports assume long lived connections, there has to be a refresh mechanism. OAuth 2 clients have a different token, called the refresh token, that can be used to obtain a new JWT token with a refreshed expiration period.
In the Java client,
CredentialsProvider
is an interface that allows for the end user to provide a "refresh function" that, in the case of OAuth 2, will use a suitable OAuth 2 vendor client library and a refresh token to produce a new token and replace it on a connection.connection.update-secret
is a new protocol extension for AMQP 0-9-1 that makes it possibleto update the token for an already open connection.
The
connection.update-secret
protocol method is already supported in this client and can be used manually. However, this is somewhat inconvenient since the timing of updates is then up to the application developers.This client needs its own version of a
CredentialsProvider
(possibly under a different name, since in the .NET world this may be an overloaded term) which is a pluggable abstraction that is expected to do a few thingsconnection.update-secret
operation on the connection to update the secret on the server endThe text was updated successfully, but these errors were encountered: