You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/oauth2-examples.md
+16-7
Original file line number
Diff line number
Diff line change
@@ -91,8 +91,13 @@ The last command starts a RabbitMQ server with [this](https://github.com/rabbitm
91
91
92
92
The RabbitMQ Management UI can be configured with one of these two login modes:
93
93
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.
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
+
129
136
<preclass="lang-erlang">
130
137
...
131
138
{rabbitmq_management, [
@@ -152,7 +159,8 @@ How it works, firstly, the `rabbit_admin` user navigates to the web portal and c
152
159
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,
153
160
RabbitMQ validates the token in the http request and if it is valid, it redirects the user to the overview page.
154
161
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:
156
164
157
165
<preclass="lang-erlang">
158
166
...
@@ -165,9 +173,10 @@ By default, the RabbitMQ Management UI is configured with **service-provider ini
165
173
]},
166
174
</pre>
167
175
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`.
171
180
172
181
## <aid="access-other-protocols"class="anchor"href="#access-other-protocols">Access other protocols using OAuth 2.0 tokens</a>
Copy file name to clipboardExpand all lines: site/oauth2.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -323,7 +323,8 @@ By default, RabbitMQ searches for the `sub` claim first, and if it is not found,
323
323
324
324
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.
0 commit comments