|
18 | 18 | },
|
19 | 19 | "testApplicationOid": {
|
20 | 20 | "type": "string",
|
21 |
| - "defaultValue": "b3653439-8136-4cd5-aac3-2a9460871ca6", |
22 | 21 | "metadata": {
|
23 | 22 | "description": "The client OID to grant access to test resources."
|
24 | 23 | }
|
|
66 | 65 | "description": "Whether to enable deployment of Managed HSM. The default is false."
|
67 | 66 | }
|
68 | 67 | },
|
69 |
| - "keyVaultDomainSuffix": { |
70 |
| - "type": "string", |
71 |
| - "defaultValue": ".vault.azure.net", |
72 |
| - "metadata": { |
73 |
| - "description": "Domain suffix for sovereign clouds, requies the preceeding '.'. The default uses the public Azure Cloud (.vault.azure.net)" |
74 |
| - } |
75 |
| - }, |
76 | 68 | "keyVaultSku": {
|
77 | 69 | "type": "string",
|
78 | 70 | "defaultValue": "premium",
|
79 | 71 | "metadata": {
|
80 | 72 | "description": "Key Vault SKU to deploy. The default is 'premium'"
|
81 | 73 | }
|
82 | 74 | },
|
83 |
| - "attestationUri": { |
| 75 | + "attestationImage": { |
84 | 76 | "type": "string",
|
85 |
| - "defaultValue": "https://skrattestation.azurewebsites.net/", |
| 77 | + "defaultValue": "keyvault-mock-attestation:latest", |
86 | 78 | "metadata": {
|
87 |
| - "description": "Test attestation service for Secure Key Release." |
| 79 | + "description": "The container image name and tag to use for the attestation mock service." |
88 | 80 | }
|
89 |
| - }, |
90 |
| - "storageEndpointSuffix": { |
91 |
| - "type": "string", |
92 |
| - "defaultValue": "core.windows.net", |
93 |
| - "metadata": { |
94 |
| - "description": "The url suffix to use when accessing the storage data plane." |
95 |
| - } |
96 | 81 | }
|
97 | 82 | },
|
98 | 83 | "variables": {
|
| 84 | + "attestationFarm": "[concat(parameters('baseName'), 'farm')]", |
| 85 | + "attestationSite": "[concat(parameters('baseName'), 'site')]", |
| 86 | + "attestationUri": "[concat('DOCKER|azsdkengsys.azurecr.io/', parameters('attestationImage'))]", |
99 | 87 | "kvApiVersion": "2019-09-01",
|
100 |
| - "azureKeyVaultUrl": "[format('https://{0}{1}', parameters('baseName'), parameters('keyVaultDomainSuffix'))]", |
| 88 | + "kvName": "[parameters('baseName')]", |
| 89 | + "kvAdminDefinitionId": "00482a5a-887f-4fb3-b363-3b7fe8e74483", |
| 90 | + "kvAdminAssignmentName": "[guid(resourceGroup().id, variables('kvAdminDefinitionId'), parameters('testApplicationOid'))]", |
101 | 91 | "hsmApiVersion": "2021-04-01-preview",
|
102 | 92 | "hsmName": "[concat(parameters('baseName'), 'hsm')]",
|
103 | 93 | "mgmtApiVersion": "2019-04-01",
|
|
122 | 112 | {
|
123 | 113 | "type": "Microsoft.KeyVault/vaults",
|
124 | 114 | "apiVersion": "[variables('kvApiVersion')]",
|
125 |
| - "name": "[parameters('baseName')]", |
| 115 | + "name": "[variables('kvName')]", |
126 | 116 | "location": "[parameters('location')]",
|
127 | 117 | "properties": {
|
128 | 118 | "sku": {
|
129 | 119 | "family": "A",
|
130 | 120 | "name": "[parameters('keyVaultSku')]"
|
131 | 121 | },
|
132 | 122 | "tenantId": "[parameters('tenantId')]",
|
133 |
| - "accessPolicies": [ |
134 |
| - { |
135 |
| - "tenantId": "[parameters('tenantId')]", |
136 |
| - "objectId": "[parameters('testApplicationOid')]", |
137 |
| - "permissions": { |
138 |
| - "keys": [ |
139 |
| - "get", |
140 |
| - "list", |
141 |
| - "update", |
142 |
| - "create", |
143 |
| - "import", |
144 |
| - "delete", |
145 |
| - "recover", |
146 |
| - "backup", |
147 |
| - "restore", |
148 |
| - "decrypt", |
149 |
| - "encrypt", |
150 |
| - "unwrapKey", |
151 |
| - "wrapKey", |
152 |
| - "verify", |
153 |
| - "sign", |
154 |
| - "purge", |
155 |
| - "rotate", |
156 |
| - "release" |
157 |
| - ], |
158 |
| - "secrets": [ |
159 |
| - "get", |
160 |
| - "list", |
161 |
| - "set", |
162 |
| - "delete", |
163 |
| - "recover", |
164 |
| - "backup", |
165 |
| - "restore", |
166 |
| - "purge" |
167 |
| - ], |
168 |
| - "certificates": [ |
169 |
| - "get", |
170 |
| - "list", |
171 |
| - "update", |
172 |
| - "create", |
173 |
| - "import", |
174 |
| - "delete", |
175 |
| - "recover", |
176 |
| - "backup", |
177 |
| - "restore", |
178 |
| - "managecontacts", |
179 |
| - "manageissuers", |
180 |
| - "getissuers", |
181 |
| - "listissuers", |
182 |
| - "setissuers", |
183 |
| - "deleteissuers", |
184 |
| - "purge" |
185 |
| - ] |
186 |
| - } |
187 |
| - } |
188 |
| - ], |
189 | 123 | "enabledForDeployment": false,
|
190 | 124 | "enabledForDiskEncryption": false,
|
191 | 125 | "enabledForTemplateDeployment": false,
|
192 |
| - "enableSoftDelete": true |
| 126 | + "enableSoftDelete": true, |
| 127 | + "enableRbacAuthorization": true, |
| 128 | + "softDeleteRetentionInDays": 7 |
| 129 | + } |
| 130 | + }, |
| 131 | + { |
| 132 | + "type": "Microsoft.Authorization/roleAssignments", |
| 133 | + "apiVersion": "2020-04-01-preview", |
| 134 | + "name": "[variables('kvAdminAssignmentName')]", |
| 135 | + "properties": { |
| 136 | + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('kvAdminDefinitionId'))]", |
| 137 | + "principalId": "[parameters('testApplicationOid')]", |
| 138 | + "scope": "[resourceGroup().id]" |
193 | 139 | }
|
194 | 140 | },
|
195 | 141 | {
|
|
207 | 153 | "initialAdminObjectIds": "[union(array(parameters('testApplicationOid')), array(parameters('provisionerApplicationOid')))]",
|
208 | 154 | "enablePurgeProtection": false,
|
209 | 155 | "enableSoftDelete": true,
|
| 156 | + "softDeleteRetentionInDays": 7, |
210 | 157 | "publicNetworkAccess": "Enabled",
|
211 |
| - "networkAcls": "[variables('networkAcls')]", |
212 |
| - "softDeleteRetentionInDays": 7 |
| 158 | + "networkAcls": "[variables('networkAcls')]" |
213 | 159 | }
|
214 | 160 | },
|
215 | 161 | {
|
|
260 | 206 | "properties": {
|
261 | 207 | "publicAccess": "None"
|
262 | 208 | }
|
| 209 | + }, |
| 210 | + { |
| 211 | + |
| 212 | + "type": "Microsoft.Web/serverfarms", |
| 213 | + "apiVersion": "2020-12-01", |
| 214 | + "name": "[variables('attestationFarm')]", |
| 215 | + "condition": "[parameters('enableHsm')]", |
| 216 | + "location": "[parameters('location')]", |
| 217 | + "kind": "linux", |
| 218 | + "sku": { |
| 219 | + "name": "B1" |
| 220 | + }, |
| 221 | + "properties": { |
| 222 | + "reserved": true |
| 223 | + } |
| 224 | + }, |
| 225 | + { |
| 226 | + |
| 227 | + "type": "Microsoft.Web/sites", |
| 228 | + "apiVersion": "2020-12-01", |
| 229 | + "name": "[variables('attestationSite')]", |
| 230 | + "condition": "[parameters('enableHsm')]", |
| 231 | + "dependsOn": [ |
| 232 | + "[resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]" |
| 233 | + ], |
| 234 | + "location": "[parameters('location')]", |
| 235 | + "properties": { |
| 236 | + "httpsOnly": true, |
| 237 | + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]", |
| 238 | + "siteConfig": { |
| 239 | + "name": "[variables('attestationSite')]", |
| 240 | + "alwaysOn": true, |
| 241 | + "linuxFxVersion": "[variables('attestationUri')]", |
| 242 | + "appSettings": [ |
| 243 | + { |
| 244 | + "name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE", |
| 245 | + "value": "false" |
| 246 | + } |
| 247 | + ] |
| 248 | + } |
| 249 | + } |
263 | 250 | }
|
264 | 251 | ],
|
265 | 252 | "outputs": {
|
266 | 253 | "AZURE_KEYVAULT_URL": {
|
267 | 254 | "type": "string",
|
268 |
| - "value": "[variables('azureKeyVaultUrl')]" |
| 255 | + "value": "[reference(variables('kvName')).vaultUri]" |
269 | 256 | },
|
270 | 257 | "AZURE_MANAGEDHSM_URL": {
|
271 | 258 | "type": "string",
|
|
280 | 267 | "type": "string",
|
281 | 268 | "value": "[parameters('testApplicationOid')]"
|
282 | 269 | },
|
283 |
| - "KEYVAULT_STORAGE_ENDPOINT_SUFFIX": { |
284 |
| - "type": "string", |
285 |
| - "value": "[parameters('storageEndpointSuffix')]" |
286 |
| - }, |
287 | 270 | "BLOB_STORAGE_ACCOUNT_NAME": {
|
288 | 271 | "type": "string",
|
289 | 272 | "value": "[variables('primaryAccountName')]"
|
|
296 | 279 | "type": "string",
|
297 | 280 | "value": "[variables('blobContainerName')]"
|
298 | 281 | },
|
299 |
| - "AZURE_KEYVAULT_ATTESTATION_URI": { |
| 282 | + "AZURE_KEYVAULT_ATTESTATION_URL": { |
300 | 283 | "type": "string",
|
301 | 284 | "condition": "[parameters('enableHsm')]",
|
302 |
| - "value": "[parameters('attestationUri')]" |
| 285 | + "value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]" |
303 | 286 | }
|
304 | 287 | }
|
305 | 288 | }
|
0 commit comments