Skip to content

Commit 756a8e7

Browse files
committed
Update after discussing with Seth
1 parent 4190a48 commit 756a8e7

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ az eventgrid namespace update --resource-group <resource group name> --name <nam
4343

4444
For information configuring system and user-assigned identities using the Azure portal, see [Enable managed identity for an Event Grid namespace](event-grid-namespace-managed-identity.md).
4545

46-
## Create an Azure Key Vault account and upload your server certificate
46+
47+
## 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+
50+
### Create an Azure Key Vault account and upload your server certificate
4751

4852
1. Use the following command to create an Azure Key Vault account:
4953

@@ -59,7 +63,7 @@ For information configuring system and user-assigned identities using the Azure
5963
> Your certificate must include the domain name in the Subject Alternative name for DNS. For more information, see [Tutorial: Import a certificate in Azure Key Vault](/azure/key-vault/certificates/tutorial-import-certificate).
6064
6165
62-
## Add role assignment in Azure Key Vault for the namespace’s managed identity
66+
### Add role assignment in Azure Key Vault for the namespace’s managed identity
6367
You need to provide access to the namespace to access your Azure Key Vault account using the following steps:
6468
6569
1. Get Event Grid namespace system managed identity principal ID using the following command
@@ -80,17 +84,15 @@ You need to provide access to the namespace to access your Azure Key Vault accou
8084
8185
For more information about Key Vault access and the portal experience, see [Provide access to Key Vault keys, certificates, and secrets with an Azure role-based access control](/azure/key-vault/general/rbac-guide).
8286
83-
## Configure OAuth 2.0 JWT authentication settings on your Event Grid namespace -Key Vault
84-
In this step, 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.
8587
86-
### Use Azure portal
88+
### Use Azure portal to configure authentication
8789
8890
1. Navigate to your Event Grid namespace in the [Azure portal](https://portal.azure.com).
8991
1. On the **Event Grid Namespace** page, select **Configuration** on the left menu.
9092
1. In the **Custom JWT authentication** section, specify values for the following properties:
9193
1. Select **Enable custom JWT authentication**.
9294
1. **Token Issuer**: Enter the value of the issuer claims of the JWTs, presented by the MQTT clients.
93-
1. Select **Add issuer certificate**
95+
1. For **Issuer certificate**, select **From Azure Key Vault**.
9496
9597
:::image type="content" source="./media/authenticate-with-namespaces-using-json-web-tokens/configuration-custom-authentication.png" alt-text="Screenshot that shows the Custom JWT authentication section of the Configuration page for an Event Grid namespace." lightbox="./media/authenticate-with-namespaces-using-json-web-tokens/configuration-custom-authentication.png":::
9698
1. In the new page, specify values for the following properties.

articles/event-grid/mqtt-client-custom-jwt.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,26 @@ You can authenticate MQTT clients with OAuth 2.0 JWT to connect to the Event Gri
2424
## Authentication using OAuth 2.0 JWT
2525
You can use the MQTT v5 CONNECT packet to provide the OAuth 2.0 JWT to authenticate your client and the MQTT v5 AUTH packet to refresh the token.
2626

27+
> [!IMPORTANT]
28+
> If you don't set the CONNECT packet's authentication method to CUSTOM-JWT, you receive an 'invalid issuer' error—even if all other configurations are correct.
29+
30+
In the CONNECT packet, you can provide the required values in the following fields:
31+
32+
|Field | Value |
33+
|---------|---------|
34+
|Authentication Method | CUSTOM-JWT |
35+
|Authentication Data | JWT |
36+
37+
In the AUTH packet, you can provide the required values in the following fields:
38+
39+
|Field | Value |
40+
|---------|---------|
41+
| Authentication Method | CUSTOM-JWT |
42+
| Authentication Data | JWT |
43+
| Authentication Reason Code | 25 |
44+
45+
Authenticate Reason Code with value 25 signifies reauthentication.
46+
2747
> [!NOTE]
2848
> Audience: `aud` claim must be set to `https://[namespace].ts.eventgrid.azure.net/`.
2949

articles/event-grid/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ items:
112112
href: custom-disaster-recovery-client-side.md
113113
- name: How to configure multiple sessions for an MQTT client
114114
href: mqtt-establishing-multiple-sessions-per-client.md
115-
- name: Send events to Microsoft Fabric via Azure Event Hubs
115+
- name: Send MQTT events to Microsoft Fabric
116116
href: mqtt-events-fabric.md
117117
- name: MQTT Request Response messaging
118118
href: mqtt-request-response-messages.md

0 commit comments

Comments
 (0)