Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How does rabbitmq authenticate with oauth 2?


Asked by Conrad Tucker on Dec 10, 2021 OAuth 2.0 Series



Authenticating with OAuth 2. RabbitMQ can be configured to use JWT-encoded OAuth 2.0 access tokens to authenticate client applications and management UI users. When doing so, the management UI does not automatically redirect users to authenticate against the OAuth 2 server, this must be configured separately.
Just so,
RabbitMQ validates the token before accepting it. If the token has expired, RabbitMQ will reject the connection. First of all, an application which wants to connect to RabbitMQ using Oauth2 must present a valid JWT token. To obtain the token, the application must first authenticate ( 1.) with UAA.
Consequently, Authentication mechanisms are now documented in the Access Control guide. If you have questions about the contents of this guide or any other topic related to RabbitMQ, don't hesitate to ask them on the RabbitMQ mailing list . If you'd like to contribute an improvement to the site, its source is available on GitHub .
Moreover,
You can find the source under /deps/rabbitmq_auth_backend_oauth2 . All issues have been transferred. This RabbitMQ authentication/authorisation backend plugin lets applications (clients) and users authenticate and authorize using JWT-encoded OAuth 2.0 access tokens. It is not specific to but developed against Cloud Foundry UAA.
Indeed,
Go to http://localhost:15672 and login using any of those two users. TL;DR the user displayed by the management ui is not the user name but rabbitmq_client which is the identity of RabbitMQ to work on half of the user