Skip to content

Commit 7c0fb2c

Browse files
committed
Update helm values
Signed-off-by: Jonathan Collinge <jonathancollinge@live.com>
1 parent 946f988 commit 7c0fb2c

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

daprdocs/content/en/developing-applications/integrations/Azure/azure-authentication/authenticating-azure.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,23 @@ In order to federate trust, you must be running Dapr Sentry with JWT issuing and
120120

121121
```yaml
122122
jwt:
123+
# Enable JWT token issuance by Sentry
123124
enabled: true
124-
issuer: <my-issuer-domain>
125-
audiences:
126-
- "api://AzureADTokenExchange"
125+
# Issuer value for JWT tokens
126+
issuer: "<your-issuer-domain>"
127127

128128
oidc:
129-
httpPort: 9082 # any none zero port
129+
enabled: true
130+
server:
131+
# Port for the OIDC HTTP server
132+
port: 9080
130133
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>"
133140
```
134141
135142
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
138145
/jwks.json
139146
```
140147

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.
142154

143155
You can now create your federated credential in Microsoft Entra ID.
144156

145157
```shell
146158
cat > creds.json <<EOF
147159
{
148-
"name": "DaprSpiffe",
149-
"issuer": "https://<my-issuer-domain>",
160+
"name": "DaprAppIDSpiffe",
161+
"issuer": "https://<your-issuer-domain>",
150162
"subject": spiffe://public/ns/<dapr-app-id-namespace>/<dapr-app-id>",
151-
"audiences": ["api://AzureADTokenExchange"],
152-
"description": "Credential for Dapr App ID"
163+
"audiences": ["api://AzureADTokenExchange"],
164+
"description": "Credential for Dapr App ID"
153165
}
154166
EOF
155167

@@ -158,9 +170,9 @@ az ad sp create --id $APP_ID
158170
az ad app federated-credential create --id $APP_ID --parameters ./creds.json
159171
```
160172

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.
162174

163-
An example of assigning "Storage Blob Data Owner" role is below
175+
An example of assigning "Storage Blob Data Owner" role is below.
164176
```shell
165177
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"
166178
```
@@ -171,7 +183,7 @@ CLIENT_ID=$(az ad app show --id $APP_ID --query appId --output tsv)
171183
TENANT_ID=$(az account show --query tenantId --output tsv)
172184
```
173185

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:
175187
```yaml
176188
apiVersion: dapr.io/v1alpha1
177189
kind: Component
@@ -191,6 +203,8 @@ spec:
191203
value: $CONTAINER_NAME
192204
```
193205
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+
194208
#### Authenticating using Azure CLI credentials (development-only)
195209
196210
> **Important:** This authentication method is recommended for **development only**.

0 commit comments

Comments
 (0)