Skip to content

Commit d755c70

Browse files
Remove reference to client_secret when not needed
1 parent 6e74f33 commit d755c70

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

site/oauth2-examples-azure.md

-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ The configuration on Azure side is done. You now have to configure RabbitMQ to u
127127
Update it with the following values (you should have noted these in the previous steps):
128128
* **Tenant ID** associated to the app that you registered in Azure AD
129129
* **Application ID** associated to the app that you registered in Azure AD
130-
* Value of the **secret** you created for your app in Azure AD
131130
* Value of the **jwks_uri** key from `https://login.microsoftonline.com/{TENANT_ID}/v2.0/.well-known/openid-configuration`
132131

133132
<pre class="lang-bash">
@@ -139,7 +138,6 @@ $ vi rabbitmq.config
139138
{rabbitmq_management, [
140139
{oauth_enabled, true},
141140
{oauth_client_id, "PUT YOUR AZURE AD APPLICATION ID"},
142-
{oauth_client_secret, "PUT YOUR AZURE AD APPLICATION SECRET"},
143141
{oauth_provider_url, "https://login.microsoftonline.com/AZURE_AD_TENANT_ID"}
144142
]},
145143
{rabbitmq_auth_backend_oauth2, [

site/oauth2-examples.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ has to be configured to validate any of the two types of digital signatures.
8080
Given that asymmetrical keys is the most widely used option, you are going to focus on how to
8181
configure RabbitMQ with them.
8282

83-
Run the following 3 commands to get the environment ready to see Oauth 2.0 plugin in action:
83+
Run the following 2 commands to get the environment ready to see Oauth 2.0 plugin in action:
8484

8585
1. `make start-uaa` to get UAA server running
86-
2. `make setup-uaa-users-and-clients` to install uaac client; connect to UAA server and set ups users, group, clients and permissions
87-
3. `make start-rabbitmq` to start RabbitMQ server
86+
2. `make start-rabbitmq` to start RabbitMQ server
8887

8988
The last command starts a RabbitMQ server with [this](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/main/conf/uaa/rabbitmq.config) configuration file.
9089

@@ -132,7 +131,6 @@ To configure the RabbitMQ Management UI with OAuth 2.0, the following configurat
132131
{rabbitmq_management, [
133132
{oauth_enabled, true},
134133
{oauth_client_id, "rabbit_client_code"},
135-
{oauth_client_secret, "rabbit_client_code"},
136134
{oauth_provider_url, "http://localhost:8080"},
137135
...
138136
]},
@@ -144,14 +142,14 @@ When RabbitMQ is provided as a service from a web portal, it is easy to navigate
144142
with a single click. The web portal retrieves a token before taking the user to the RabbitMQ Management UI web page.
145143

146144
<pre class="lang-plain">
147-
[ Idp | WebPortal ] ----&gt; 2. /#/login?access_token=&lt;TOKEN&gt;---- [ RabbitMQ Cluster ]
145+
[ Idp | WebPortal ] ----&gt; 2. /login [access_token: TOKEN]---- [ RabbitMQ Cluster ]
148146
/|\ | /|\
149147
| +--------+
150148
1. rabbit_admin from a browser 3. validate token
151149
</pre>
152150

153151
How it works, firstly, the `rabbit_admin` user navigates to the web portal and clicks on the hyperlink associated with a RabbitMQ
154-
cluster. Next, the web portal obtains a token and redirects the user to RabbitMQ. Finally,
152+
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,
155153
RabbitMQ validates the token in the http request and if it is valid, it redirects the user to the overview page.
156154

157155
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:
@@ -161,7 +159,6 @@ By default, the RabbitMQ Management UI is configured with **service-provider ini
161159
{rabbitmq_management, [
162160
{oauth_enabled, true},
163161
{oauth_client_id, "rabbit_client_code"},
164-
{oauth_client_secret, "rabbit_client_code"},
165162
{oauth_provider_url, "http://localhost:8080"},
166163
{oauth_initiated_logon_type, idp_initiated},
167164
...
@@ -199,7 +196,7 @@ to the RabbitMQ management endpoint passing the JWT token within the `Authorizat
199196
The following command launches the browser with `mgt_api_client` client with a JWT token previously obtained from UAA:
200197

201198
<pre class="lang-bash">
202-
make curl url=http://localhost:15672/api/overview client_id=mgt_api_client secret=mgt_api_client
199+
make curl-uaa url=http://localhost:15672/api/overview client_id=mgt_api_client secret=mgt_api_client
203200
</pre>
204201

205202

@@ -739,12 +736,14 @@ The following configuration snippets demonstrate these steps:
739736
<pre class="lang-erlang">
740737
[
741738
{rabbitmq_management, [
739+
%% eanble Oauth
740+
{oauth_enabled, true},
742741
%% use UAA
743742
{enable_uaa, true},
744743
%% OAuth 2 identity server client ID
745-
{uaa_client_id, "rabbit_client"},
744+
{oauth_client_id, "rabbit_client"},
746745
%% UAA endpoint location
747-
{uaa_location, "http://localhost:8080/uaa"}
746+
{oauth_provider_url, "http://localhost:8080"}
748747
]},
749748
].
750749
</pre>

0 commit comments

Comments
 (0)