Skip to content

Commit 0d75bb9

Browse files
Merge pull request #287187 from hhunter-ms/hh-294307
[Dapr/ACA][SFI] Remove 'connection-string' secrets from Dapr components
2 parents 4ed1d20 + 787426a commit 0d75bb9

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

articles/container-apps/dapr-components.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: hhunter-ms
66
ms.service: azure-container-apps
77
ms.custom: build-2023
88
ms.topic: conceptual
9-
ms.date: 08/02/2024
9+
ms.date: 09/23/2024
1010
---
1111

1212
# Dapr components in Azure Container Apps
@@ -154,15 +154,23 @@ scopes:
154154

155155
#### Referencing Dapr secret store components
156156

157-
Once you [create a Dapr secret store using one of the previous approaches](#creating-a-dapr-secret-store-component), you can reference that secret store from other Dapr components in the same environment. In the following example, the `secretStoreComponent` field is populated with the name of the secret store specified in the previous examples, where the `sb-root-connectionstring` is stored.
157+
Once you [create a Dapr secret store using one of the previous approaches](#creating-a-dapr-secret-store-component), you can reference that secret store from other Dapr components in the same environment. The following example demonstrates using Entra ID authentication.
158158

159159
```yaml
160160
componentType: pubsub.azure.servicebus.queue
161161
version: v1
162-
secretStoreComponent: "my-secret-store"
162+
secretStoreComponent: "[your_secret_store_name]"
163163
metadata:
164-
- name: connectionString
165-
secretRef: sb-root-connectionstring
164+
- name: namespaceName
165+
# Required when using Azure Authentication.
166+
# Must be a fully-qualified domain name
167+
value: "[your_servicebus_namespace.servicebus.windows.net]"
168+
- name: azureTenantId
169+
value: "[your_tenant_id]"
170+
- name: azureClientId
171+
value: "[your_client_id]"
172+
- name: azureClientSecret
173+
secretRef: azClientSecret
166174
scopes:
167175
- publisher-app
168176
- subscriber-app
@@ -184,8 +192,16 @@ componentType: pubsub.azure.servicebus.queue
184192
version: v1
185193
secretStoreComponent: "my-secret-store"
186194
metadata:
187-
- name: connectionString
188-
secretRef: sb-root-connectionstring
195+
- name: namespaceName
196+
# Required when using Azure Authentication.
197+
# Must be a fully-qualified domain name
198+
value: "[your_servicebus_namespace.servicebus.windows.net]"
199+
- name: azureTenantId
200+
value: "[your_tenant_id]"
201+
- name: azureClientId
202+
value: "[your_client_id]"
203+
- name: azureClientSecret
204+
secretRef: azClientSecret
189205
scopes:
190206
- publisher-app
191207
- subscriber-app
@@ -204,8 +220,16 @@ resource daprComponent 'daprComponents@2022-03-01' = {
204220
secretStoreComponent: 'my-secret-store'
205221
metadata: [
206222
{
207-
name: 'connectionString'
208-
secretRef: 'sb-root-connectionstring'
223+
name: 'namespaceName'
224+
// Required when using Azure Authentication.
225+
// Must be a fully-qualified domain name
226+
value: '[your_servicebus_namespace.servicebus.windows.net]'
227+
name: 'azureTenantId'
228+
value: '[your_tenant_id]'
229+
name: 'azureClientId'
230+
value: '[your_client_id]'
231+
name: 'azureClientSecret'
232+
secretRef: 'azClientSecret'
209233
}
210234
]
211235
scopes: [
@@ -232,8 +256,14 @@ This resource defines a Dapr component called `dapr-pubsub` via ARM.
232256
"secretScoreComponent": "my-secret-store",
233257
"metadata": [
234258
{
235-
"name": "connectionString",
236-
"secretRef": "sb-root-connectionstring"
259+
"name": "namespaceName",
260+
"value": "[your_servicebus_namespace.servicebus.windows.net]",
261+
"name": "azureTenantId",
262+
"value": "[your_tenant_id]",
263+
"name": "azureClientId",
264+
"value": "[your_client_id]",
265+
"name": "azureClientSecret",
266+
"secretRef": "azClientSecret"
237267
}
238268
],
239269
"scopes": ["publisher-app", "subscriber-app"]

0 commit comments

Comments
 (0)