Skip to content

Commit 47d8813

Browse files
authored
Language edits for oauth2-examples-forward-proxy.md
1 parent d28c9c8 commit 47d8813

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

docs/oauth2-examples-forward-proxy.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ This guide explains how to set up OAuth 2.0 for RabbitMQ to access the Authoriza
3838
3939
```
4040

41-
RabbitMQ establishes a http connection with Keycloak via the forward-proxy in any of
41+
RabbitMQ establishes an HTTP connection with Keycloak via the forward-proxy in any of
4242
these situations:
4343

4444
- You have configured `auth_oauth2.issuer` so that RabbitMQ downloads the OpenID configuration via the OpenID discovery endpoint.
45-
- You have configured `auth_oauth2.issuer` or `auth_oauth2.jwks_url` so that RabbitMQ
46-
downloads the tokens' signing keys.
45+
- You have configured `auth_oauth2.issuer` or `auth_oauth2.jwks_url` so that RabbitMQ downloads the tokens' signing keys.
4746

4847
## Prerequisites for Using OAuth 2 vith a forward proxy
4948

@@ -57,42 +56,42 @@ localhost keycloak rabbitmq forward-proxy
5756

5857
:::info
5958
`make start-keycloak` will
60-
generate the TLS certificate and private keys necessary. These certificates have an expiration date.
59+
generate the TLS certificate and private keys as necessary. These certificates have an expiration date.
6160

62-
In case of any error messages that hint at expired or invalid certificates, stop Keycloak and run `make clean-certs` to regenerate the certificates and private keys,
63-
then restart Keycloak and the proxy
61+
In you see any error messages that hint at expired or invalid certificates, stop Keycloak, run `make clean-certs` to regenerate the certificates and private keys,
62+
and then restart Keycloak and the proxy.
6463
:::
6564

6665
## Deploy Keycloak
6766

68-
Deploy Keycloak by running the following command which deploys keycloak on its own network called `keycloak_net`:
67+
Deploy keycloak on its own network called `keycloak_net` by running:
68+
6969
```bash
7070
PROVIDER_NETWORK=keycloak_net make start-keycloak
7171
```
7272

73-
To access Keycloak Management UI, go to https://keycloak:8443/ and enter `admin` as username and password.
73+
To access Keycloak Management UI, go to https://keycloak:8443/ and enter `admin` as the username and password.
7474

7575
There is a dedicated **Keycloak realm** called `Test` configured as follows:
7676

77-
* [rsa](https://keycloak:8443/admin/master/console/#/realms/test/keys) signing key
77+
* [rsa](https://keycloak:8443/admin/master/console/#/realms/test/keys) signing-key
7878
* [rsa provider]https://keycloak:8443/admin/master/console/#/realms/test/keys/providers)
7979
* `rabbitmq-proxy-client` client
8080

8181
## Start Forward Proxy
8282

83-
To start the forward proxy, run the following command which deploys forward-proxy in
84-
two networks, `keycloak_net` and `rabbitmq_net`:
83+
Deploy and start the forward-proxy in two networks, `keycloak_net` and `rabbitmq_net`, by running:
8584

8685
```bash
8786
PROVIDER_NETWORK=keycloak_net make start-forward-proxy
8887
```
8988

90-
The forward proxy is configured using [httpd.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/forward-proxy/httpd/httpd.conf). This type of configuration inserts the access token into the HTTP **Authorization** header.
89+
The forward proxy is configured by using [httpd.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/next/conf/forward-proxy/httpd/httpd.conf). This type of configuration inserts the access token into the HTTP **Authorization** header.
9190

9291

9392
## Start RabbitMQ
9493

95-
To start RabbitMQ run the following command which deploys rabbitmq in its own network `rabbitmq_net`:
94+
Deploy RabbitMQ in its own network `rabbitmq_net` and start it by running:
9695

9796
```
9897
export IMAGE=<Tanzu RabbitMQ OCI image name>
@@ -103,19 +102,19 @@ MODE=forward-proxy OAUTH_PROVIDER=keycloak make start-rabbitmq
103102
## Access [management UI](./management/)
104103

105104
Go to https://rabbitmq:15671/, proceed to login, and enter the credentials
106-
`rabbit_admin` as username and `rabbit_admin` as password when Keycloak prompts you.
107-
You should be redirected back to RabbitMQ management UI.
105+
`rabbit_admin` as the username and `rabbit_admin` as the password when Keycloak prompts you.
106+
You will be redirected back to RabbitMQ management UI.
108107

109-
Take into account that the management UI running in the browser goes straight to keycloak.
110-
In other words, it does not go via the forward-proxy. If you really want the management UI to
111-
go via the forward-proxy you would have to configure the browser. That is beyond
108+
The management UI running in the browser goes straight to keycloak.
109+
In other words, it does not go via the forward-proxy. If you want the management UI to
110+
go via the forward-proxy, you must configure the browser. That is beyond
112111
the scope of this example.
113112

114113
However, in order to validate the token the management UI received from keycloak, RabbitMQ has to connect to keycloak via the forward-proxy. This is necessary in order to download the signing keys and to download the OpenID configuration if you only configured the `issuer` URL.
115114

116-
## Access Management api
115+
## Access Management API
117116

118-
To access the management api run the following command. It uses the client [mgt_api_client](https://keycloak:8443/admin/master/console/#/test/clients/c5be3c24-0c88-4672-a77a-79002fcc9a9d/settings) which has the scope [rabbitmq.tag:administrator](https://keycloak:8443/admin/master/console/#/test/client-scopes/f6e6dd62-22bf-4421-910e-e6070908764c/settings).
117+
To access the management API run the following command. It uses the client [mgt_api_client](https://keycloak:8443/admin/master/console/#/test/clients/c5be3c24-0c88-4672-a77a-79002fcc9a9d/settings), which has the scope [rabbitmq.tag:administrator](https://keycloak:8443/admin/master/console/#/test/client-scopes/f6e6dd62-22bf-4421-910e-e6070908764c/settings).
119118

120119
```bash
121120
make curl-keycloak url=https://localhost:15671/api/overview client_id=mgt_api_client secret=LWOuYqJ8gjKg3D2U8CJZDuID3KiRZVDa realm=test

0 commit comments

Comments
 (0)