From 59d5e3948584b3f35f67c8015b53be72f1671977 Mon Sep 17 00:00:00 2001 From: Mahesh Rohera Date: Tue, 24 Nov 2020 16:18:51 -0800 Subject: [PATCH 1/6] Support userassigned identities for the KEK --- .../preview/2020-09-01-preview/iotdps.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json index 20b815e53811..4ba4ce4793b3 100644 --- a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json @@ -1934,6 +1934,10 @@ "items": { "$ref": "#/definitions/KeyVaultKeyProperties" } + }, + "identity": { + "description": "The identity used to access the KeyVault key.", + "$ref": "#/definitions/KEKIdentity" } } }, @@ -1947,6 +1951,16 @@ } } }, + "KEKIdentity": { + "description": "The properties of the KeyVault identity.", + "type": "object", + "properties": { + "userAssignedIdentity": { + "type": "string", + "description": "The user assigned identity." + } + } + }, "IpFilterRule": { "description": "The IP filter rules for a provisioning Service.", "type": "object", From 913c77fd69ee5f01175f9944bca5171f1eacf8ce Mon Sep 17 00:00:00 2001 From: Mahesh Rohera Date: Tue, 24 Nov 2020 19:22:26 -0800 Subject: [PATCH 2/6] Address PR comments --- .../preview/2020-09-01-preview/iotdps.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json index 4ba4ce4793b3..0e6f12fa939a 100644 --- a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json @@ -1921,23 +1921,23 @@ ] }, "EncryptionPropertiesDescription": { - "description": "The encryption properties for the IoT DPS instance.", + "description": "The customer-managed encryption key (CMK) properties for the IoT DPS instance.", "type": "object", "properties": { "keySource": { - "description": "The source of the key.", + "description": "The source of the encryption key. Typically, Microsoft.KeyVault", "type": "string" }, "keyVaultProperties": { - "description": "The properties of the KeyVault key.", + "description": "The properties of the encryption key configured in KeyVault.", "type": "array", "items": { "$ref": "#/definitions/KeyVaultKeyProperties" } }, "identity": { - "description": "The identity used to access the KeyVault key.", - "$ref": "#/definitions/KEKIdentity" + "description": "The identity used to access the encryption key in KeyVault.", + "$ref": "#/definitions/EncryptionKeyIdentity" } } }, @@ -1951,8 +1951,8 @@ } } }, - "KEKIdentity": { - "description": "The properties of the KeyVault identity.", + "EncryptionKeyIdentity": { + "description": "The properties of the identity used to access the key encryption key in KeyVault.", "type": "object", "properties": { "userAssignedIdentity": { From 8d6108cfb2479e8887a03ad6cc73b07db3a95c1e Mon Sep 17 00:00:00 2001 From: Mahesh Rohera Date: Mon, 30 Nov 2020 19:49:38 -0800 Subject: [PATCH 3/6] Update rev for breaking changes --- .../Microsoft.Devices/preview/2020-09-01-preview/iotdps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json index 0e6f12fa939a..39d7857d6bb9 100644 --- a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2020-09-01-preview", + "version": "2020-09-01-preview.1", "x-ms-code-generation-settings": { "host": "management.azure.com" }, From 46d9c90b5968b25a3f01842e34c89ecf69a96dea Mon Sep 17 00:00:00 2001 From: Mahesh Rohera Date: Thu, 3 Dec 2020 22:27:03 -0800 Subject: [PATCH 4/6] Add identity information to the DPS description --- .../preview/2020-09-01-preview/iotdps.json | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json index 39d7857d6bb9..372421cf15a4 100644 --- a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json @@ -1772,6 +1772,10 @@ "sku": { "description": "Sku info for a provisioning Service.", "$ref": "#/definitions/IotDpsSkuInfo" + }, + "identity": { + "description": "The managed identities for the IotDps instance.", + "$ref": "#/definitions/ArmIdentity" } }, "allOf": [ @@ -1920,6 +1924,44 @@ "location" ] }, + "ArmIdentity": { + "type": "object", + "properties": { + "principalId": { + "description": "Principal Id", + "type": "string", + "readOnly": true + }, + "tenantId": { + "description": "Tenant Id", + "type": "string", + "readOnly": true + }, + "identityType": { + "description": "Identity type. Only allowed values are SystemAssigned and UserAssigned. Comma separated if both for ex: SystemAssigned,UserAssigned", + "type": "string" + }, + "userAssignedIdentities": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ArmUserIdentity" + } + } + } + }, + "ArmUserIdentity": { + "type": "object", + "properties": { + "principalId": { + "type": "string", + "readOnly": true + }, + "clientId": { + "type": "string", + "readOnly": true + } + } + }, "EncryptionPropertiesDescription": { "description": "The customer-managed encryption key (CMK) properties for the IoT DPS instance.", "type": "object", From 431b62fac1d8c5f9e8c2a44c732e2b14f06be801 Mon Sep 17 00:00:00 2001 From: Mahesh Rohera Date: Thu, 3 Dec 2020 22:27:51 -0800 Subject: [PATCH 5/6] Revert back version --- .../Microsoft.Devices/preview/2020-09-01-preview/iotdps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json index 372421cf15a4..c6f1d0dc448e 100644 --- a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2020-09-01-preview.1", + "version": "2020-09-01-preview", "x-ms-code-generation-settings": { "host": "management.azure.com" }, From ecdb59aa36a5c7c844fcd6d01d7a28f4e8121f06 Mon Sep 17 00:00:00 2001 From: Mahesh Rohera Date: Thu, 3 Dec 2020 22:50:56 -0800 Subject: [PATCH 6/6] Lint warnings --- .../preview/2020-09-01-preview/iotdps.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json index c6f1d0dc448e..2c8ac1949c60 100644 --- a/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json +++ b/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/preview/2020-09-01-preview/iotdps.json @@ -1926,6 +1926,7 @@ }, "ArmIdentity": { "type": "object", + "description": "The set of ARM identities associated with the IoT DPS resource.", "properties": { "principalId": { "description": "Principal Id", @@ -1938,11 +1939,12 @@ "readOnly": true }, "identityType": { - "description": "Identity type. Only allowed values are SystemAssigned and UserAssigned. Comma separated if both for ex: SystemAssigned,UserAssigned", + "description": "Identity type. Only allowed values are SystemAssigned and UserAssigned. Comma separated if both for ex: SystemAssigned,UserAssigned.", "type": "string" }, "userAssignedIdentities": { "type": "object", + "description": "The set of UserAssigned identities associated with the IoT DPS resource.", "additionalProperties": { "$ref": "#/definitions/ArmUserIdentity" } @@ -1951,12 +1953,15 @@ }, "ArmUserIdentity": { "type": "object", + "description": "The ARM UserAssigned identity information", "properties": { "principalId": { + "description": "Principal Id", "type": "string", "readOnly": true }, "clientId": { + "description": "Client Id", "type": "string", "readOnly": true }