Skip to content

Commit bf24032

Browse files
authored
Update configuration guide for CGV and NF secrets
Clarified ARM template requirements for CGV and NF regarding secret handling, including updated examples and notes on secure object usage.
1 parent 03d148b commit bf24032

1 file changed

Lines changed: 67 additions & 13 deletions

File tree

articles/operator-service-manager/configuration-guide.md

Lines changed: 67 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,23 @@ This example shows the rendered CGV resource created after the CGV deployment co
9595
Other than separating secrets into a unique CGS, no special requirements exist for CGS secret support.
9696

9797
## CGV with secrets
98-
Consider the following Azure Resource Manager (ARM) template requirements to properly obscure secret values throughout the entire CGV resource lifecycle.
98+
Consider the following Azure Resource Manager (ARM) template requirements when creating a CGV to properly obscure secret values throughout the entire CGV resource lifecycle.
9999

100-
* Use `configurationType: 'Secret'` in the template under resource properties.
100+
* Use `"type": "secureObject"` in the template for type of the `secretCgvContent` parameter
101+
* This configuration obscures the CGV play of the secrets as template parameters.
102+
103+
```json
104+
"parameters": {
105+
"secretCgvContent": {
106+
"type": "SecureObject"
107+
}
108+
}
109+
```
110+
111+
> [!NOTE]
112+
> * Do not hydrate `secretCgvContent` using the loadJsonContent() function in bicep as this will expose the data using insecure variables.
113+
114+
* Use `configurationType: 'Secret'` and `"secretDeploymentValues": "[string(parameters('secretCgvContent'))]"` in the template under CGV resource properties.
101115
* Once a CGV is deployed, this configuration prevents displaying the secret data via most Azure methods.
102116

103117
```json
@@ -110,17 +124,6 @@ Consider the following Azure Resource Manager (ARM) template requirements to pro
110124
}
111125
```
112126

113-
* Use `"type": "secureObject"` in the template under parameter type
114-
* This configuration obscures the display of the secrets as template parameters.
115-
116-
```json
117-
"parameters": {
118-
"secretCgvContent": {
119-
"type": "SecureObject"
120-
}
121-
}
122-
```
123-
124127
* Use a template reference to Azure Key Vault (AKV) in place of the plain-text secret.
125128
* This configuration obscures the display of the secrets as template variables.
126129

@@ -136,6 +139,57 @@ This example shows how to include an AKV reference to a secret named `secretName
136139
}
137140
```
138141

142+
## NF with secrets
143+
Consider the following Azure Resource Manager (ARM) template requirements when creating a NF to properly obscure secret values throughout the entire NF resource lifecycle.
144+
145+
* Use `"type": "secureObject"` in the template for type of the `secretValues` and `config` parameter
146+
* This configuration obscures the display of the secrets as template parameters.
147+
148+
```json
149+
"parameters": {
150+
"siteSpecificValues": {
151+
"type": "object"
152+
},
153+
"secretValues": {
154+
"type": "secureObject"
155+
},
156+
"nfValues": {
157+
"type": "object"
158+
},
159+
"config": {
160+
"type": "secureObject",
161+
"defaultValue": "[union(parameters('nfValues'),parameters('siteSpecificValues'), parameters('secretValues'))]"
162+
}
163+
}
164+
```
165+
166+
* Use `configurationType: 'Secret'` and `"secretDeploymentValues": "[string(parameters('secretCgvContent'))]"` in the template under CGV resource properties.
167+
* Once a CGV is deployed, this configuration prevents displaying the secret data via most Azure methods.
168+
169+
```json
170+
"properties": {
171+
"configurationType": "Secret",
172+
"secretDeploymentValues": "[string(parameters('config'))]"
173+
}
174+
```
175+
176+
> [!NOTE]
177+
> * Do not hydrate `secretCgvContent` using the loadJsonContent() function in bicep as this will expose the data using insecure variables.
178+
179+
* Use `configurationType: 'Secret'` and `"secretDeploymentValues": "[string(parameters('secretCgvContent'))]"` in the template under CGV resource properties.
180+
* Once a CGV is deployed, this configuration prevents displaying the secret data via most Azure methods.
181+
182+
```json
183+
{
184+
"type": "Microsoft.HybridNetwork/configurationGroupValues",
185+
"properties": {
186+
"configurationType": "Secret"
187+
"secretDeploymentValues": "[string(parameters('secretCgvContent'))]"
188+
}
189+
}
190+
```
191+
192+
139193
> [!NOTE]
140194
> * ARM templates only support Azure Key Vault for secret reference substitution.
141195
> * Consider restricting access to the role based access control (RBAC) scope `Microsoft.Resources/deployments/exportTemplate/action` to only admin roles.

0 commit comments

Comments
 (0)