You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: daprdocs/content/en/developing-applications/integrations/Azure/azure-authentication/authenticating-azure.md
+28-14Lines changed: 28 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,16 +120,23 @@ In order to federate trust, you must be running Dapr Sentry with JWT issuing and
120
120
121
121
```yaml
122
122
jwt:
123
+
# Enable JWT token issuance by Sentry
123
124
enabled: true
124
-
issuer: <my-issuer-domain>
125
-
audiences:
126
-
- "api://AzureADTokenExchange"
125
+
# Issuer value for JWT tokens
126
+
issuer: "<your-issuer-domain>"
127
127
128
128
oidc:
129
-
httpPort: 9082# any none zero port
129
+
enabled: true
130
+
server:
131
+
# Port for the OIDC HTTP server
132
+
port: 9080
130
133
tls:
131
-
certFile: /path/to/tls/cert.pem
132
-
keyFile: /path/to/tls/key.pem
134
+
# Enable TLS for the OIDC HTTP server
135
+
enabled: true
136
+
# TLS certificate file for the OIDC HTTP server
137
+
certFile: "<path-to-tls-cert.pem>"
138
+
# TLS certificate file for the OIDC HTTP server
139
+
keyFile: "<path-to-tls-key.pem>"
133
140
```
134
141
135
142
This will expose the following endpoints on your Dapr Sentry installation on the provided OIDC HTTP port:
@@ -138,18 +145,23 @@ This will expose the following endpoints on your Dapr Sentry installation on the
138
145
/jwks.json
139
146
```
140
147
141
-
In order for Microsoft Entra ID to be able to access those endpoints, you must expose them on a public address. You must ensure that the domain that you are serving these endpoints via is the same as the issuer you provided or added to the list of supported OIDC domains via the helm value `oidc.domains`.
148
+
You will also need to provide the Dapr runtime configuration to request a JWT token with the Azure audience `api://AzureADTokenExchange`.
149
+
When running in standalone, this can be provided using the flag `--jwt-audiences=api://AzureADTokenExchange`.
150
+
When running in Kubernetes, this can be provided by decorating the application Kubernetes manifest with the annotations `"dapr.io/jwt-audiences": "api://AzureADTokenExchange"`.
151
+
This will ensure Sentry issues a JWT token with the correct audience, which is required for Microsoft Entra ID to validate the token.
152
+
153
+
In order for Microsoft Entra ID to be able to access the OIDC endpoints, you must expose them on a public address. You must ensure that the domain that you are serving these endpoints via is the same as the issuer you provided when configuration Dapr Sentry.
142
154
143
155
You can now create your federated credential in Microsoft Entra ID.
az ad app federated-credential create --id $APP_ID --parameters ./creds.json
159
171
```
160
172
161
-
Now that you have a federated credential for you Microsoft Entra ID Application Registration, you can assign the desired roles to it's service principal.
173
+
Now that you have a federated credential for your Microsoft Entra ID Application Registration, you can assign the desired roles to it's service principal.
162
174
163
-
An example of assigning "Storage Blob Data Owner" role is below
175
+
An example of assigning "Storage Blob Data Owner" role is below.
164
176
```shell
165
177
az role assignment create --assignee-object-id $APP_ID --assignee-principal-type ServicePrincipal --role "Storage Blob Data Owner" --scope "/subscriptions/$SUBSCRIPTION/resourceGroups/$GROUP/providers/Microsoft.Storage/storageAccounts/$ACCOUNT_NAME"
166
178
```
@@ -171,7 +183,7 @@ CLIENT_ID=$(az ad app show --id $APP_ID --query appId --output tsv)
171
183
TENANT_ID=$(az account show --query tenantId --output tsv)
172
184
```
173
185
174
-
Then you can create your Azure Dapr Component and simply provide those value:
186
+
Then you can create your Azure Dapr Component and simply provide these value:
175
187
```yaml
176
188
apiVersion: dapr.io/v1alpha1
177
189
kind: Component
@@ -191,6 +203,8 @@ spec:
191
203
value: $CONTAINER_NAME
192
204
```
193
205
206
+
The Dapr runtime will use these details to authenticate with Microsoft Entra ID, using the Dapr Sentry issued JWT token to exchange for an access token to access the Azure resource.
207
+
194
208
#### Authenticating using Azure CLI credentials (development-only)
195
209
196
210
> **Important:** This authentication method is recommended for **development only**.
0 commit comments