-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 2.0: support IDP-initiated login in the management UI #6015
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MarcialRosales
changed the title
OIDC idp initiated login
OIDC idp initiated login in the management ui
Oct 4, 2022
MarcialRosales
changed the title
OIDC idp initiated login in the management ui
OAuth 2.0 idp initiated login in the management ui
Oct 5, 2022
MarcialRosales
force-pushed
the
oidc_idp_initiated_login
branch
2 times, most recently
from
October 20, 2022 07:29
058e928
to
89f9d39
Compare
MarcialRosales
force-pushed
the
oidc_idp_initiated_login
branch
from
October 25, 2022 08:36
89f9d39
to
5054b87
Compare
MarcialRosales
force-pushed
the
oidc_idp_initiated_login
branch
2 times, most recently
from
November 2, 2022 12:16
64cdb38
to
47f49fa
Compare
MarcialRosales
force-pushed
the
oidc_idp_initiated_login
branch
3 times, most recently
from
November 14, 2022 06:18
3e90f1d
to
35b7845
Compare
michaelklishin
changed the title
OAuth 2.0 idp initiated login in the management ui
OAuth 2.0 IDP-initiated login in the management UI
Nov 14, 2022
michaelklishin
changed the title
OAuth 2.0 IDP-initiated login in the management UI
OAuth 2.0: support IDP-initiated login in the management UI
Nov 14, 2022
MarcialRosales
force-pushed
the
oidc_idp_initiated_login
branch
from
November 16, 2022 14:30
7e45f7e
to
5748b9e
Compare
This was referenced Nov 21, 2022
This comment was marked as spam.
This comment was marked as spam.
MarcialRosales
force-pushed
the
oidc_idp_initiated_login
branch
2 times, most recently
from
December 13, 2022 13:10
be85e06
to
28e4212
Compare
MarcialRosales
force-pushed
the
oidc_idp_initiated_login
branch
from
December 19, 2022 15:50
d23abee
to
43c09f7
Compare
Configure preferred username from a token Make client_secret optional
For OAuth2 idp initiated logon
Instead use localStorage
Use window.localStorage. If it is disabled Management UI should stop working rather than falling back to cookies
import and export definitions
When running test remotely, the import definition file must be transfered from the test container onto the selenium container wehre the browser runs
clicking on any area triggered the download of the definitions
And enable hard session timeout which was disabled by mistake when moved credentials from cookies to local storage
This is to force GH Action run selenium tests. for some reason it is not running it
michaelklishin
force-pushed
the
oidc_idp_initiated_login
branch
from
January 3, 2023 12:09
43c09f7
to
6a08cd0
Compare
michaelklishin
added a commit
that referenced
this pull request
Jan 3, 2023
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Support "Identity Provider initiated login" workflow whereby a user comes to RabbitMQ with an access_token rather than coming without any and being redirected to the authorization server to get one. The http endpoint to login directly with an access token is POST
/login
with the token as the value of the form fieldaccess_token
(here is the sample form used by our automated testing).This PR must take into account the following flows :
It requires the following oauth2 related configuration settings in the management plugin :
- service-provider initiated logon (
sp_initiated
term) which is the default value and corresponds to Oauth 2.0 authorization code flow.- identity-provider initiated logon (
idp_initiated
term)It has been considered to use this PR to merge another 2 PRs very much related to the same area of code as this PR.
There is a documentation PR linked to this PR: rabbitmq/rabbitmq-website#1504
This PR introduces the following potential breaking change: With this PR the management UI no longer stores credentials (basic or token) on cookies. Instead it uses
window.localStorage
. Furthermore, and here it is the breaking change: if the window.localStorage is disabled, the management ui will not proceed with the login process. It will not fallback to cookies. This is because bearer tokens may be larger than 4Kb in length and browsers will not accept cookies whose value is greater than 4Kbytes.Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that apply