Skip to content

Commit bb493d5

Browse files
Merge pull request #2087 from rabbitmq/update-oauth2-multi-resource-example
Update multi-resource example
2 parents b804471 + 321bc73 commit bb493d5

24 files changed

+862
-246
lines changed

docs/oauth2-examples-auth0.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,18 @@ limitations under the License.
2121

2222
# Use https://auth0.com/ as OAuth 2.0 server
2323

24-
Demonstrate how to authenticate using the OAuth 2.0 protocol
24+
This guide explains how to set up OAuth 2.0 for RabbitMQ
2525
and Auth0 as Authorization Server using the following flows:
2626

27-
* Access management UI via a browser
27+
* Access [management UI](./management/) via a browser
2828
* Access management rest api
29-
* Access AMQP protocol
29+
* Application authentication and authorization
3030

3131
## Prerequisites to follow this guide
3232

3333
* Have an account in https://auth0.com/.
3434
* Docker
35-
* `git clone https://github.com/rabbitmq/rabbitmq-oauth2-tutorial`. This github repository
36-
contains all the configuration files and scripts used on this example.
35+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial) that contains all the configuration files and scripts used on this example
3736

3837
## Create RabbitMQ API
3938

docs/oauth2-examples-entra-id/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ limitations under the License.
2121

2222
# Use Microsoft Entra ID (formerly known as Microsoft Azure AD) as OAuth 2.0 server
2323

24-
Demonstrate how to authenticate using the OAuth 2.0 protocol
24+
This guide explains how to set up OAuth 2.0 for RabbitMQ
2525
and Microsoft Entra ID as Authorization Server using the following flows:
2626

2727
* Access the management UI via a browser
@@ -31,8 +31,7 @@ and Microsoft Entra ID as Authorization Server using the following flows:
3131
* Have an account in https://portal.azure.com.
3232
* Docker
3333
* Openssl
34-
* `git clone https://github.com/rabbitmq/rabbitmq-oauth2-tutorial`. This github repository
35-
contains all the configuration files and scripts used on this example.
34+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial) that contains all the configuration files and scripts used on this example
3635

3736
## Register your app
3837

@@ -214,7 +213,7 @@ on port `15671`, see the management UI guide.
214213

215214
:::
216215

217-
When you run `make start-rabbitmq` for the first time with `MODE=entra`, before RabbitMQ is deployed, a TLS certificate is generated for RabbitMQ so that it listens on HTTPS port 15671.
216+
When you run `make start-rabbitmq` for the first time with `MODE=entra`, before RabbitMQ is deployed, a TLS certificate is generated for RabbitMQ so that it listens on HTTPS port 15671.
218217

219218
The script generates the following files in `conf/entra/certs`:
220219
* **cacert.pem**: a custom certificate authority that is used to generate and sign a self signed certificate for RabbitMQ

docs/oauth2-examples-keycloak.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,18 @@ limitations under the License.
2121

2222
# Use Keycloak as OAuth 2.0 server
2323

24-
Demonstrate how to authenticate using the OAuth 2.0 protocol
24+
This guide explains how to set up OAuth 2.0 for RabbitMQ
2525
and Keycloak as Authorization Server using the following flows:
2626

27-
* Access management UI via a browser
27+
* Access [management UI](./management/) via a browser
2828
* Access management rest api
29-
* Access AMQP protocol
29+
* Application authentication and authorization
3030

3131
## Prerequisites to follow this guide
3232

3333
* Docker
3434
* make
35-
* `git clone https://github.com/rabbitmq/rabbitmq-oauth2-tutorial`. This github repository
36-
contains all the configuration files and scripts used on this example.
35+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial) that contains all the configuration files and scripts used on this example
3736

3837
## Deploy Keycloak
3938

@@ -69,7 +68,7 @@ To access the management api run the following command. It uses the client [mgt_
6968
make curl-keycloak url=http://localhost:15672/api/overview client_id=mgt_api_client secret=LWOuYqJ8gjKg3D2U8CJZDuID3KiRZVDa
7069
```
7170

72-
## Access AMQP protocol with PerfTest
71+
## Application authentication and authorization with PerfTest
7372

7473
To test OAuth 2.0 authentication with AMQP protocol you are going to use RabbitMQ PerfTest tool which uses RabbitMQ Java Client.
7574

@@ -81,7 +80,7 @@ make start-perftest-producer-with-token PRODUCER=producer TOKEN=$(bin/keycloak/t
8180

8281
**NOTE**: Initializing an application with a token has one drawback: the application cannot use the connection beyond the lifespan of the token. See the next section where you demonstrate how to refresh the token.
8382

84-
## Access AMQP protocol with Pika
83+
## Application authentication and authorization with Pika
8584

8685
In the following information, OAuth 2.0 authentication is tested with the AMQP protocol and the Pika library. These tests specifically demonstrate how to refresh a token on a live AMQP connection.
8786

@@ -97,7 +96,7 @@ python3 pika-client/producer.py producer kbOFBXI9tANgKUq8vXHLhT6YhbivgXxn
9796

9897
Note: Ensure you install pika 1.3
9998

100-
## Access Management UI
99+
## Access [management UI](./management/)
101100

102101
1. Go to http://localhost:15672.
103102
2. Click on the single button on the page which redirects to **Keycloak** to authenticate.

0 commit comments

Comments
 (0)