Skip to content

Commit 19e677c

Browse files
Merge pull request #2094 from rabbitmq/use-versioned-oauth2-tutorial
OAuth2 examples for Next version should link to appropriate oauth2 tutorial branch
2 parents d622524 + 6f5166f commit 19e677c

File tree

8 files changed

+32
-35
lines changed

8 files changed

+32
-35
lines changed

docs/oauth2-examples-auth0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ and Auth0 as Authorization Server using the following flows:
3232

3333
* Have an [Auth0](https://auth0.com/) account
3434
* Docker
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
35+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next) for branch `next` that contains all the configuration files and scripts used on this example.
3636

3737
## Create RabbitMQ API
3838

@@ -115,7 +115,7 @@ called `audience` whose value matches the value of `auth_oauth2.resource_server_
115115
Earlier RabbitMQ versions always sent this URI parameter. If this additional URI parameter is not configured,
116116
Auth0 will consider the token invalid and RabbitMQ will display "No authorized" for error.
117117

118-
These [two configuration lines](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/main/conf/auth0/rabbitmq.conf.tmpl#L8-L9)
118+
These [two configuration lines](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/next/conf/auth0/rabbitmq.conf.tmpl#L8-L9)
119119
configure the `audience` parameter with the value `rabbitmq`.
120120

121121
:::

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ and Microsoft Entra ID as Authorization Server using the following flows:
3232
* Have an account in https://portal.azure.com.
3333
* Docker
3434
* Openssl
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
35+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next) for branch `next` that contains all the configuration files and scripts used on this example.
3636

3737
## Register your app
3838

@@ -183,7 +183,7 @@ For more information, check out Microsoft Entra documentation about [configuring
183183

184184
The configuration on **Entra ID** side is done. Next, configure RabbitMQ to use these resources.
185185

186-
Clone [rabbitmq.conf.tmpl](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/entra/rabbitmq.conf.tmpl) from the tutorial repository
186+
Clone [rabbitmq.conf.tmpl](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/entra/rabbitmq.conf.tmpl) from the tutorial repository
187187
to `rabbitmq.conf`. It must be in the same directory as `rabbitmq.conf.tmpl`.
188188

189189
Edit the new `rabbitmq.conf` file and proceed as follows:

docs/oauth2-examples-google.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The main reason is because it does not issue JWT access tokens
2727
but opaque access tokens. To support opaque access tokens, RabbitMQ would have to issue an
2828
external HTTP request to convert the opaque access token into a JWT access token.
2929

30-
Under the [`/conf/google`](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/google) folder you can find the configuration used to connect the
30+
Under the [`/conf/google`](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/google) folder you can find the configuration used to connect the
3131
RabbitMQ management UI with Google OAuth 2.0 endpoints. With this configuration,
3232
you can get to a point where the user is authenticated by Google, and eventually
3333
you get the error message in the RabbitMQ Management UI "Not Authorized".

docs/oauth2-examples-keycloak.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ and Keycloak as Authorization Server using the following flows:
3232

3333
* Docker
3434
* make
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
35+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next) for branch `next` that contains all the configuration files and scripts used on this example
3636

3737
## Deploy Keycloak
3838

@@ -54,7 +54,7 @@ management api and `producer` to access via AMQP protocol.
5454

5555
## Start RabbitMQ
5656

57-
Run the command below to start RabbitMQ configured with the **Keycloak** server we started in the previous section: This is the [rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/main/conf/keycloak/rabbitmq.conf) used for **Keycloak**.
57+
Run the command below to start RabbitMQ configured with the **Keycloak** server we started in the previous section: This is the [rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/next/conf/keycloak/rabbitmq.conf) used for **Keycloak**.
5858
```bash
5959
export MODE=keycloak
6060
make start-rabbitmq
@@ -84,7 +84,7 @@ make start-perftest-producer-with-token PRODUCER=producer TOKEN=$(bin/keycloak/t
8484

8585
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.
8686

87-
The sample Python application [can be found on GitHub](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/pika-client).
87+
The sample Python application [can be found on GitHub](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/pika-client).
8888

8989
To run this sample code proceed as follows:
9090
```bash

docs/oauth2-examples-multiresource.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ and several OAuth resources using the following flows:
3030
## Prerequisites
3131

3232
* Docker
33-
* 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
33+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next) for branch `next` that contains all the configuration files and scripts used on this example
3434

3535
## Single OAuth 2.0 vs Multiple OAuth 2.0 resources
3636

@@ -52,7 +52,7 @@ As both teams are registered in the same OAuth2 server you are going to configur
5252

5353
### Test applications accessing AMQP protocol with their own audience
5454

55-
This is a summary of the configuration, found in [rabbitmq.scenario1.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/main/conf/multi-keycloak/rabbitmq.scenario1.conf):
55+
This is a summary of the configuration, found in [rabbitmq.scenario1.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/next/conf/multi-keycloak/rabbitmq.scenario1.conf):
5656

5757
There are two OAuth2 clients (`prod_producer` and `dev_producer`) declared in Keycloak and configured to access their respective audience: `rabbit_prod` and `rabbit_dev`.
5858
The RabbitMQ OAuth 2 plugin is configured like so:
@@ -91,7 +91,7 @@ Follow these steps to deploy Keycloak and RabbitMQ:
9191
It is recommended to follow the logs until keycloak is fully initialized: `docker logs keycloak -f`
9292
:::
9393

94-
2. Launch RabbitMQ with [rabbitmq.scenario1.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/main/conf/multi-keycloak/rabbitmq.scenario1.conf):
94+
2. Launch RabbitMQ with [rabbitmq.scenario1.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/next/conf/multi-keycloak/rabbitmq.scenario1.conf):
9595

9696
```bash
9797
MODE="multi-keycloak" CONF="rabbitmq.scenario1.conf" make start-rabbitmq
@@ -198,7 +198,7 @@ This scenario uses the same OAuth 2.0 provider called **keycloak**, however, thi
198198
- `prod_producer` with the audience `rabbit_prod` (password: `PdLHb1w8RH1oD5bpppgy8OF9G6QeRpL9`).
199199
- `rabbit_prod_admin` (password: `rabbit_prod_admin`).
200200

201-
Despite there is only one physical OAuth provider, you need to configure RabbitMQ with two OAuth 2.0 providers. Each tenant has its own `issuer` url. This is the configuration file used for this scenario is [rabbitmq.scenario2.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/main/conf/multi-keycloak/rabbitmq.scenario2.conf). For convenience here is the relevant part:
201+
Despite there is only one physical OAuth provider, you need to configure RabbitMQ with two OAuth 2.0 providers. Each tenant has its own `issuer` url. This is the configuration file used for this scenario is [rabbitmq.scenario2.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/next/conf/multi-keycloak/rabbitmq.scenario2.conf). For convenience here is the relevant part:
202202
```ini
203203
...
204204
## Oauth providers
@@ -296,7 +296,7 @@ This scenario uses two separate OAuth 2.0 providers called `devkeycloak` and `pr
296296
- `prod_producer` with the audience `rabbit_prod` (password: `PdLHb1w8RH1oD5bpppgy8OF9G6QeRpL9`).
297297
- `rabbit_prod_admin` (password: `rabbit_prod_admin`).
298298
299-
Check out the section `oauth_providers` in the configuration file [rabbitmq.scenario3.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/main/conf/multi-keycloak/rabbitmq.scenario3.conf) used by this scenario. Like in the scenario 2, there are two OAuth providers however this time the URL refers to two different hostnames. For convenience here is the relevant part:
299+
Check out the section `oauth_providers` in the configuration file [rabbitmq.scenario3.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/blob/next/conf/multi-keycloak/rabbitmq.scenario3.conf) used by this scenario. Like in the scenario 2, there are two OAuth providers however this time the URL refers to two different hostnames. For convenience here is the relevant part:
300300
301301
```ini
302302
...

docs/oauth2-examples-okta.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ and Okta as Authorization Server using the following flows:
3030

3131
* Have an [Okta account](https://www.okta.com)
3232
* Docker
33-
* `git clone https://github.com/rabbitmq/rabbitmq-oauth2-tutorial`. This github repository
34-
contains all the configuration files and scripts used on this example
33+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next) for branch `next` that contains all the configuration files and scripts used on this example.
3534

3635

3736
## Create your app integration in Okta UI
@@ -195,10 +194,10 @@ For that, you will need the following values from the previous steps:
195194
* **okta-Issuer**: the **default Authorization server**
196195
* **okta-Metadata-URI**: the **default Authorization server**
197196

198-
Copy [rabbitmq.conf.tmpl](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/okta/rabbitmq.conf.tmpl) from the tutorial repository
197+
Copy [rabbitmq.conf.tmpl](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/okta/rabbitmq.conf.tmpl) from the tutorial repository
199198
to `rabbitmq.conf`. It must be in the same directory as `rabbitmq.conf.tmpl`.
200199

201-
There is a second configuration file, [advanced.config](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/okta/advanced.config),
200+
There is a second configuration file, [advanced.config](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/okta/advanced.config),
202201
that will not need any modifications. This is the RabbitMQ [advanced configuration file](./configure/) where RabbitMQ scopes are mapped to the permissions previously configured in Okta.
203202

204203
Edit `rabbitmq.conf` and proceed as follows:

docs/oauth2-examples-proxy.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Let's test the following flow:
4343

4444
* Docker
4545
* make
46-
* 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
46+
* A local clone of a [GitHub repository](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next) for branch `next` that contains all the configuration files and scripts used on this example.
4747

4848
## Deploy Keycloak
4949

@@ -52,7 +52,7 @@ Deploy Keycloak by running the following command:
5252
make start-keycloak
5353
```
5454

55-
Note: Keycloak is preconfigured with the required scopes, users, and clients. It is configured with its own signing key and the [rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/oauth2-proxy/rabbitmq.conf) file is also configured with the same signing key.
55+
Note: Keycloak is preconfigured with the required scopes, users, and clients. It is configured with its own signing key and the [rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/oauth2-proxy/rabbitmq.conf) file is also configured with the same signing key.
5656

5757
To access Keycloak Management UI, go to http://0.0.0.0:8080/ and enter `admin` as username and password.
5858

@@ -65,7 +65,7 @@ There is a dedicated **Keycloak realm** called `Test` configured as follows:
6565
## Start RabbitMQ
6666

6767
To start RabbitMQ run the following two commands. The first one tells RabbitMQ to pick up the
68-
rabbitmq.conf found under [conf/oauth2-proxy/rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/oauth2-proxy/rabbitmq.conf)
68+
rabbitmq.conf found under [conf/oauth2-proxy/rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/oauth2-proxy/rabbitmq.conf)
6969

7070
```
7171
export MODE=oauth2-proxy
@@ -74,7 +74,7 @@ make start-rabbitmq
7474

7575
**NOTE**: Oauth2 Proxy requires that the `aud` claim matches the client's id. However, RabbitMQ requires the
7676
`aud` field to match `rabbitmq` which is the designated `resource_server_id`. Given that it has been
77-
impossible to configure keycloak with both values, [rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/oauth2-proxy/rabbitmq.conf) has
77+
impossible to configure keycloak with both values, [rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/oauth2-proxy/rabbitmq.conf) has
7878
the setting below which disables validation of the audience claim.
7979

8080
```ini
@@ -90,7 +90,7 @@ To start OAuth2 Proxy, run the following command:
9090
make start-oauth2-proxy
9191
```
9292

93-
Oauth2 Proxy is configured using [Alpha configuration](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/oauth2-proxy/alpha-config.yaml). This type of configuration inserts the access token into the HTTP **Authorization** header.
93+
Oauth2 Proxy is configured using [Alpha configuration](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/oauth2-proxy/alpha-config.yaml). This type of configuration inserts the access token into the HTTP **Authorization** header.
9494

9595

9696
## Access [management UI](./management/)

0 commit comments

Comments
 (0)