-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Support for more general OAuth2 providers #2605
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
Comments
We are working on the Next steps:
|
@MirahImage Can you test against a few well known providers? Such as Azure AD, Google G Suite, Auth0, etc. I got so far as getting Azure OAuth tokens working against The way permissions are accepted only in an array is not ideal. Normally, in OAuth 2/OpenID, the requested, and authorized, scopes are echoed back in an space delimited I got the current plugin to work using the Azure specific I wanted a lookup table in the RabbitMQ config file that mapped specific scopes in the |
@ngbrown We are in the process of testing against more providers. Auth0 is already tested. You can check it out here. However, we have only tested it against the messaging protocols such as AMQP, not against the management ui. With regards the format of permissions, it can be a json array or a space-separated list of scopes within a single string. And RabbitMQ can be configured to read those permissions/scopes from a configurable field name such as The OAuth2 specification does not say whether the scopes should be treated as roles. You are right that Azure uses |
In Azure, it was possible to use the I did try to use the Attempt to use So then adding to the I look forward to the management UI being able to participate in SSO via other providers such as Azure AD. |
@ngbrown it would be very helpful to share a project demonstrating this. Testing OAuth against several providers is extremely time consuming to set up and maintain. Anything users can do to assist will speed up that process is appreciated. |
Hello @ngbrown, @MarcialRosales, @MirahImage, I am currently trying to use Azure AD to authenticate user to the UI management but I am blocked because of the issue mentioned here: I am redirected to Is there currently a way to be update the expected endpoints so that I would be redirected to the right one? @ngbrown: from your previous posts, I understand that you managed to overcome it. Is it the case? Thanks for your help! |
HI @baptistedaroit. we are currently working on a new version of the management plugin and the oauth2 plugin precisely because of the issues you are experiencing. For your reference, this work is being carried out on this branch https://github.com/rabbitmq/rabbitmq-server/tree/oidc-integration. Also, the oauth2 tutorial (https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/oidc-integration) is being updated to reflect the new work done in the oidc branch.
Oauth2 implicit flow is deprecated. OAuth2 authorization code is supported. And authorization code with PKCE will be supported too. By the way, the oidc-integration branch is based on 3.10.x branch. This work is still in development. Feel free if you are interested in testing it against Azure AD. Our plan is to eventually test it against Azure. |
Hi @MarcialRosales, Thanks a lot for all your inputs. So far, I have been able to configure RabbitMQ to use Azure AD as OAuth Backend for the Management UI. I am quite new on Azure AD and OAuth2 in general so I wrote kind of a documentation to describe all the steps needed to set it up. Would you like me to enrich the tutorials to provide guidance for people who could be interested? |
@baptistedaroit that would be helpful for me and i guess others as well. Can you please post your documentation? |
@baptistedaroit definitely you are very welcome to expand the tutorial. Did you get it to work using the official docker image? or did you use the oidc-integration branch that I have been working on recently? |
@MarcialRosales, I get it to work using the oidc-integration branch you mentioned (I built a docker image based on it and did my tests using it). Sure, I need to format it properly and I will raise a PR to the tutorial repo (cc @sahilsachdeva) |
Awesome ! @baptistedaroit . In that case, feel free to create a PR to add another integration use case, in your case Azure. You know that we have under |
Thanks for the guidance! I opened a PR here. Feel free to comment so I can adjust it if needed :) |
@baptistedaroit Thank you so much for the amount of work you have put !! I am reviewing it today. |
When using the
rabbitmq-management
plugin with therabbitmq-auth-backen-oauth2
, users are redirected to the OAuth server to authenticate following an implicit_grant flow. The plugin makes several assumptions about the structure of the endpoints provided by the OAuth server, not all of which are valid.uaa_location/oauth/authorize
. While the use of/authorize
is general as specified in RFC 6749, the prefix of/oauth
is specific to UAA./info
endpoint is not general. RFC 8414 specifies that a generic OAuth2 server should provide the/.well-known/oauth-authorization-server
endpoint for such purposes, but also that specific implementations may specify a different endpoint. For example, servers implementing OIDC may instead provide the/.well-known/openid-configuration
endpoint.In regards to the first point above, one solution would be to generalize the
uaa_location
advanced config to anoauth_location
config property. In the specific case of UAA, theoauth_location
would correspond touaa_location/oauth
.Similarly, for the second point, we could provide an optional configuration for the metadata endpoint, with the default value being
/.well-known/oauth-authorization-server
.The text was updated successfully, but these errors were encountered: