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
@@ -45,7 +45,10 @@ We now recommend that you use at least three CGS/CGV sets, organizing parameters
45
45
* Security-specific parameters
46
46
* Examples include passwords and certificates.
47
47
* Uses CGS/CGV with secrets.
48
-
* Store values in Azure Key Vault to obscure during deployments.
48
+
* Store values in Azure Key Vault (AKV) to obscure during deployments.
49
+
50
+
> [!NOTE]
51
+
> * When using secrets, consider restricting access to the role based access control (RBAC) scope `Microsoft.Resources/deployments/exportTemplate/action`.
49
52
50
53
## CGS without secrets
51
54
@@ -91,15 +94,15 @@ This example shows the rendered CGV resource created after the CGV deployment co
91
94
}
92
95
```
93
96
94
-
## CGS with secrets
95
-
Other than separating secrets into a unique CGS, no special requirements exist for CGS secret support.
97
+
## CGV with secrets without AKV
96
98
97
-
## CGV with secrets
98
-
Consider the following Azure Resource Manager (ARM) template requirements to properly obscure secret values throughout the entire CGV resource lifecycle.
99
+
Where AKV isn't being used, consider the following Azure Resource Manager (ARM) template requirements to properly obscure secret values throughout CGV resource lifecycle.
100
+
101
+
* To contain all secrets, define an object parameter with `"type": "secureObject"`.
102
+
* Before a CGV is deployed, this configuration obscures the display of secrets as template parameters.
103
+
104
+
This example shows how to define an object parameter `secretCgvContent`.
99
105
100
-
* Use `configurationType: 'Secret'` in the template under resource properties.
101
-
* Once a CGV is deployed, this configuration prevents displaying the secret data via most Azure methods.
102
-
103
106
```json
104
107
"parameters": {
105
108
"secretCgvContent": {
@@ -108,9 +111,14 @@ Consider the following Azure Resource Manager (ARM) template requirements to pro
108
111
}
109
112
```
110
113
111
-
* Use `"type": "secureObject"` in the template under parameter type
112
-
* This configuration obscures the display of the secrets as template parameters.
113
-
114
+
> [!NOTE]
115
+
> * Don't hydrate `secretCgvContent` using the bicep loadJsonContent() function as it forces the use of insecure variables.
116
+
117
+
* Under CGV resource properties, use `configurationType: 'Secret'` and `"secretConfigurationValue": "[string(parameters('secretCgvContent'))]"`.
118
+
* Once a CGV is deployed, this configuration prevents displaying the secret data via most Azure user interfaces.
119
+
120
+
This example shows how to pass all secrets in the object `secretCgvContent` to the CGV resource.
@@ -121,25 +129,103 @@ Consider the following Azure Resource Manager (ARM) template requirements to pro
121
129
}
122
130
```
123
131
124
-
* Use a template reference to Azure Key Vault (AKV) in place of the plain-text secret.
125
-
* This configuration obscures the display of the secrets as template variables.
132
+
## CGV with secrets with AKV
126
133
127
-
> [!NOTE]
128
-
> * ARM templates only support Azure Key Vault for secret reference substitution.
134
+
Where AKV is being used, consider the following Azure Resource Manager (ARM) template requirements to properly obscure secret values throughout CGV resource lifecycle.
135
+
136
+
* Define a string `parameter` for each secret and one object `variable` to collect all secret values.
137
+
* The object variable contains only a reference to the parameter string and exposes no secrets.
129
138
130
-
This example shows how to include an AKV reference to a secret named `secretName` in an ARM template.
139
+
This example shows how to define a parameter `secretPassword` contained within the object variable `secretVal.configurationValue`.
131
140
132
141
```json
133
-
"password": {
142
+
"parameters": {
143
+
"secretPassword": {
144
+
"type": "string"
145
+
}
146
+
}
147
+
"variables": {
148
+
"configurationValue": {
149
+
"secretVal": {
150
+
"elastic_passwd": "secretPassword"
151
+
}
152
+
}
153
+
}
154
+
```
155
+
156
+
* Use a template reference to AKV in place of the plain-text secret.
157
+
* Before the CGV is deployed, this configuration obscures the display of the secrets as template variables.
158
+
159
+
This example shows how to hydrate the secret `secretPassword` using AKV secret and key.
Consider the following Azure Resource Manager (ARM) template requirements to properly obscure secret values throughout network function (NF) resource lifecycle.
192
+
193
+
* Use `"type": "secureObject"` in the template for the `secretValues` and `config` parameter
194
+
* This configuration obscures the display of the secrets as template parameters.
To further secure resources, consider restricting access to the role based access control (RBAC) scope `Microsoft.Resources/deployments/exportTemplate/action` to only roles that absolutely need to this access.
214
+
> [!NOTE]
215
+
> * Don't hydrate `secretCgvContent` using the bicep loadJsonContent() function as it forces the use of insecure variables.
216
+
217
+
* Under networkFunctions resource properties, use `configurationType: 'Secret'` and `"secretDeploymentValues": "[string(parameters('config'))]"`.
218
+
* Once a network function is deployed, this configuration prevents displaying the secret data via most Azure user interfaces.
@@ -159,7 +245,7 @@ For the CGS meta-schema, Azure Operator Service Manager implements support for J
159
245
* For string types, keyword support isn't limited or filtered. See [string](https://json-schema.org/understanding-json-schema/reference/string) in the JSON Schema reference.
160
246
* For numeric types, keyword support isn't limited or filtered. See [Numeric types](https://json-schema.org/understanding-json-schema/reference/numeric) in the JSON Schema reference.
161
247
162
-
## Optional and required fields
248
+
### Optional and required fields
163
249
164
250
You declare a property as optional by including a `required` keyword, which omits the optional property. If you don't specify the `required` keyword, all properties are considered required. You need at least one required property type to support an optional property type.
165
251
@@ -180,11 +266,11 @@ You declare a property as optional by including a `required` keyword, which omit
180
266
}
181
267
```
182
268
183
-
## Default values in JSON Schema
269
+
### Default values in JSON Schema
184
270
185
271
For optional properties, Azure Operator Service Manager implements a custom method of handling default values. When a default value is defined in CGS meta-schema, Azure Operator Service Manager uses that value where the property is missing or undefined in the input CGV data. Azure Operator Service Manager validator logic essentially hydrates the CGV value with the default value when the operator doesn't provide a value.
186
272
187
-
### How to define defaults
273
+
#### How to define defaults
188
274
189
275
Defaults must be specified either inside properties or inside items of an array. The following example demonstrates defaults with integer and string property types:
190
276
@@ -204,7 +290,7 @@ Defaults must be specified either inside properties or inside items of an array.
204
290
}
205
291
```
206
292
207
-
### Rules for defining defaults
293
+
#### Rules for defining defaults
208
294
209
295
The following rules are applied when you're validating a default value. Consider these rules when you're using default values to ensure expected outcomes.
0 commit comments