Skip to content

Commit 18c82d2

Browse files
More edits
1 parent 133609f commit 18c82d2

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

site/oauth2-examples.md

+16-7
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,13 @@ The last command starts a RabbitMQ server with [this](https://github.com/rabbitm
9191

9292
The RabbitMQ Management UI can be configured with one of these two login modes:
9393

94-
* [Service-Provider initiated logon](#service-provider-initiated-logon) - This is the default and traditional OAuth 2.0 logon mode. When you visit the RabbitMQ Management UI, it shows a button with the label `Click here to logon`. When you click, the logon process starts by redirecting you to the configured **Authorization Server**.
95-
* [Identity-Provider initiated logon](#identity-provider-initiated-logon) - This mode is opposite to the previous mode, you must first access the RabbitMQ Management's `/login` endpoint with a token. If the token is valid, you can then access the RabbitMQ Management UI. This mode is very useful for web portals which allow users to access the RabbitMQ Management UI with a single click. The web portals get a token on your behalf and redirect you to the RabbitMQ Management's `/login` endpoint.
94+
* [Service-Provider initiated logon](#service-provider-initiated-logon): this is the default and traditional OAuth 2.0 logon mode.
95+
When the user visits the RabbitMQ Management UI, it shows a button with the label `Click here to logon`. When the user clicks it,
96+
the logon process starts by redirecting to the configured **Authorization Server**.
97+
* [Identity-Provider initiated logon](#identity-provider-initiated-logon): this mode is opposite to the previous mode.
98+
The user must first access the RabbitMQ Management's `/login` endpoint with a token. If the token is valid, the user is allowed to access the RabbitMQ Management UI.
99+
This mode is very useful for Web sites which allow users to access the RabbitMQ Management UI with a single click.
100+
The original Web site get a token on user's behalf and redirects the user to the RabbitMQ Management's `/login` endpoint.
96101

97102
### <a id="service-provider-initiated-logon" class="anchor" href="#service-provider-initiated-logon">Service-Provider initiated logon</a>
98103

@@ -125,7 +130,9 @@ It was signed with the symmetric key.
125130

126131
![JWT token](./img/oauth2/admin-token-signed-sym-key.png)
127132

128-
To configure the RabbitMQ Management UI with OAuth 2.0, the following configuration entries are required:
133+
To configure the RabbitMQ Management UI with OAuth 2.0, the following configuration entries are required
134+
in `advanced.config`:
135+
129136
<pre class="lang-erlang">
130137
...
131138
{rabbitmq_management, [
@@ -152,7 +159,8 @@ How it works, firstly, the `rabbit_admin` user navigates to the web portal and c
152159
cluster. Next, the web portal obtains a token and redirects the user to RabbitMQ `/login` endpoint with the token within the HTTP form field `access_token`. Finally,
153160
RabbitMQ validates the token in the http request and if it is valid, it redirects the user to the overview page.
154161

155-
By default, the RabbitMQ Management UI is configured with **service-provider initiated logon**, to configure **Identity-Provider initiated logon**, add one entry to the configuration. An example is provided here:
162+
By default, the RabbitMQ Management UI is configured with **service-provider initiated logon**, to configure **Identity-Provider initiated logon**,
163+
add one entry to `advanced.config`. For example:
156164

157165
<pre class="lang-erlang">
158166
...
@@ -165,9 +173,10 @@ By default, the RabbitMQ Management UI is configured with **service-provider ini
165173
]},
166174
</pre>
167175

168-
**NOTE**: When the user logs out, or its RabbitMQ session expired, or the token expired, the user is directed to the
169-
RabbitMQ Management landing page which has a **Click here to login** button. The user is
170-
never automatically redirected back to the url configured in the `oauth_provider_url`. It is only when the user clicks **Click here to login** , the user is redirected to the configured url in `oauth_provider_url`.
176+
**Important**: when the user logs out, or its RabbitMQ session expired, or the token expired, the user is directed to the
177+
RabbitMQ Management landing page which has a **Click here to login** button.
178+
The user is never automatically redirected back to the url configured in the `oauth_provider_url`.
179+
It is only when the user clicks **Click here to login** , the user is redirected to the configured url in `oauth_provider_url`.
171180

172181
## <a id="access-other-protocols" class="anchor" href="#access-other-protocols">Access other protocols using OAuth 2.0 tokens</a>
173182

site/oauth2.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ By default, RabbitMQ searches for the `sub` claim first, and if it is not found,
323323

324324
Most authorization servers return the user's GUID in the `sub` claim instead of the user's username or email address, anything the user can relate to. When the `sub` claim does not carry a *user-friendly username*, you can configure one or several claims to extract the username from the token.
325325

326-
Example configuration:
326+
Example `advanced.config` configuration:
327+
327328
<pre class="lang-erlang">
328329
...
329330
{rabbitmq_auth_backend_oauth2, [

0 commit comments

Comments
 (0)