Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f543119

Browse files
Update idp-initiated logon
1 parent e865e66 commit f543119

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,29 @@ To configure RabbitMQ Management UI with OAuth 2.0 you need the following config
135135

136136
### Identity-Provider initiated logon
137137

138-
**Note**: **This feature has not been released yet. It is only available in the development docker image
139-
pivotalrabbitmq/rabbitmq:oidc_idp_initiated_login-otp-max-bazel **
138+
Alike Service-Provider initiated logon, with Idp-initiated logon users land to RabbitMQ management ui with a valid token.
139+
These two scenarios below are examples of Idp-initiated logon:
140140

141-
When RabbitMQ is offered as a service from a web portal, it is more convenient to navigate to RabbitMQ Management UI with a single click. The web portal is responsible for getting a token before taking the user to the RabbitMQ Management UI web page.
141+
* RabbitMQ is behind a web portal which conveniently allow users to navigate directly to RabbitMQ fully authenticated
142+
* There is an OAuth2 proxy in between users and RabbitMQ which intercepts their requests and forwards them to RabbitMQ injecting the token into the HTTP `Authorization` header
143+
144+
The latter scenario is demonstrated [here](oauth2-examples-proxy.html). The former scenario is covered in the following section.
145+
146+
#### Idp-initiated logon via the login endpoint
147+
148+
A web portal offers their authenticated users, the option to navigate to RabbitMQ by submitting a form with their OAuth token in `access_token` form field as it is illustrated below:
142149

143150
```
144-
[ Idp | WebPortal ] ----> 2. /login (access_token=<TOKEN>)---- [ RabbitMQ Cluster ]
151+
[ Idp | WebPortal ] ----&gt; 2. /login [access_token: TOKEN]---- [ RabbitMQ Cluster ]
145152
/|\ | /|\
146153
| +--------+
147154
1. rabbit_admin from a browser 3. validate token
148155
```
149156

150-
At step 1, `rabbit_admin` user navigates to the web portal and clicks on the hyperlink associated to a RabbitMQ cluster. At step 2, the web portal obtains a token and redirects the user to RabbitMQ's `/login` url with the token within the form field `access_token`. And at step 3, RabbitMQ validates the token in the http request and if it is valid, it redirects the user to the overview page.
157+
If the access token is valid, RabbitMQ redirects the user to the overview page.
151158

152-
By default, RabbitMQ Management UI is configured with service-provider initiated logon. You have to configure the Management plugin by adding just one entry to the configuration as shown below:
159+
By default, the RabbitMQ Management UI is configured with **service-provider initiated logon**, to configure **Identity-Provider initiated logon**,
160+
add one entry to `advanced.config`. For example:
153161

154162
```
155163
...
@@ -161,7 +169,10 @@ By default, RabbitMQ Management UI is configured with service-provider initiated
161169
]},
162170
```
163171

164-
**NOTE**: When the user logs out, or its RabbitMQ session expired, or the token expired, the user is directed to the Management landing page which presents the user with a button labeled `Click here to login`. The user is never redirected automatically back to the url configured in `oauth_provider_url`. Only when the user clicks on the `logout` button, it is redirected to the configured in `oauth_provider_url`.
172+
**Important**: when the user logs out, or its RabbitMQ session expired, or the token expired, the user is directed to the
173+
RabbitMQ Management landing page which has a **Click here to login** button.
174+
The user is never automatically redirected back to the url configured in the `oauth_provider_url`.
175+
It is only when the user clicks **Click here to login** , the user is redirected to the configured url in `oauth_provider_url`.
165176

166177
## Access other protocols using OAuth 2.0 tokens
167178

@@ -343,7 +354,7 @@ make start-amqp1_0-publisher
343354
This section has been dedicated exclusively to explain what scopes you need in order to operate on **Topic Exchanges**.
344355

345356
**NOTE**: None of the users and/or clients declared in any of Authorization servers provided by this tutorial have the
346-
appropriate scopes to operate on **Topic Exchanges**. In the [MQTT Protocol](#mqtt-protocol) section, the application used a hand-crafted token with the scopes to operate on **Topic Exchanges**.
357+
appropriate scopes to operate on **Topic Exchanges**. In the [MQTT Protocol](#mqtt-protocol) section, the application used a hand-crafted token with the scopes to operate on **Topic Exchanges**.
347358

348359
To bind and/or unbind a queue to/from a **Topic Exchange**, you need to have the following scopes:
349360

0 commit comments

Comments
 (0)