Skip to content

Commit fca0a76

Browse files
Merge pull request #300708 from jaganth/docs-editor/authenticate-with-namespaces-u-1748909696
Update authenticate-with-namespaces-using-json-web-tokens.md
2 parents adc4ac7 + e956d45 commit fca0a76

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

articles/event-grid/authenticate-with-namespaces-using-json-web-tokens.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ To use OAuth 2.0 JWT authentication for namespaces, follow these steps:
2828
1. Enable managed identity on your Event Grid namespace.
2929
1. Configure OAuth 2.0 authentication settings on your Event Grid namespace by following these steps:
3030
1. Create an Azure Key Vault account that hosts the CA certificate that includes your public keys and add role assignment in Key Vault for the namespace’s managed identity.
31-
1. Upload the PEM file of your public key certificates to namespace.
31+
1. Or upload the PEM file of your public key certificates to namespace.
32+
3233
1. Your clients can connect to the Event Grid namespace using the tokens provided by your identity provider.
3334

3435
## Create a namespace and configure its subresources
@@ -45,7 +46,7 @@ For information configuring system and user-assigned identities using the Azure
4546

4647

4748
## Configure OAuth 2.0 JWT authentication settings on your Event Grid namespace -Key Vault
48-
First, create an Azure Key Vault account, upload your server certificate, and assign the namespace's managed identity an appropriate role on the key vault. Then, you configure custom authentication settings on your Event Grid namespace using Azure portal and Azure CLI. You need to create the namespace first then update it using the following steps.
49+
First, create an Azure Key Vault account, upload your server certificate, and assign the namespace's managed identity an appropriate role on the key vault. Then, you configure custom authentication settings on your Event Grid namespace using either Azure portal or Azure CLI. You need to create the namespace first then update it using the following steps.
4950

5051
### Create an Azure Key Vault account and upload your server certificate
5152

@@ -132,8 +133,8 @@ az resource update \
132133
133134
```
134135
### JSON Web Token format
135-
JSON Web Tokens are divided into the JWT Header and JWT payload sections.
136-
136+
JSON Web Tokens needs to have JWT Header, JWT payload and JWT signature sections.
137+
137138
### JWT Header
138139

139140
The header must contain at least `typ` and `alg` fields. `typ` must always be `JWS` and `alg` must always be `RS256`. The token header must be as follows:
@@ -154,7 +155,7 @@ Event Grid requires the following claims: `iss`, `sub`, `aud`, `exp`, 
154155
| --- | ----------- |
155156
| `iss` | Issuer. Value in JWT must match issuer in the Event Grid namespace configuration for custom JWT authentication. |
156157
| `sub` | Subject. Value is used as authentication identity name. |
157-
| `aud` | Audience. Value can be a string or an array of strings. Value must contain standard Event Grid namespace hostname and/or custom domain for that Event Grid namespace (if configured). Audience can contain other strings, but we require at least one of these strings to be a standard Event Grid namespace hostname or custom domain for this namespace. |
158+
| `aud` | Audience. Value is an array of strings. Value must contain standard Event Grid namespace hostname and/or custom domain for that Event Grid namespace (if configured). Audience can contain other strings, but we require at least one of these strings to be a standard Event Grid namespace hostname or custom domain for this namespace. |
158159
| `exp` | Expiration. Unix time when JWT expires. |
159160
| `nbf` | Not before. Unit time when JWT becomes valid. |
160161

@@ -227,13 +228,13 @@ az eventgrid namespace update \
227228
```
228229

229230
- Replace `<resource-group-name>`, `<namespace-name>`, `<location>`, `<key-vault-name>`, `<certificate-name>`, and `<certificate-in-PEM-format>` with your actual values.
230-
- The encodedCertificate value must include the full certificate in PEM format, including headers ( `"-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE----`).
231+
- The encodedCertificate value must include the full certificate and public key in PEM format, including headers ( `"-----BEGIN CERTIFICATE-----", "-----END CERTIFICATE----, ``-----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----`).
231232
- Ensure the public key certificate provided is valid and trusted by your identity provider.
232233
- Regularly update the encodedIssuerCertificates if certificates are rotated or expired.
233234

234235
### JSON Web Token format
235236

236-
JWT payload
237+
JSON Web Tokens needs to have JWT Header, JWT payload and JWT signature sections.
237238

238239
Event Grid requires the following claims: `iss`, `sub`, `aud`, `exp`, `nbf`.
239240

0 commit comments

Comments
 (0)