From 7ef6c7036bb5bbdb2655b60eb6c19695050797dd Mon Sep 17 00:00:00 2001 From: ramoka178 <57157576+ramoka178@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:57:51 -0700 Subject: [PATCH] MGRP S360 Vuln (#22832) * Add blockchain to latest profile * Add additional types * Fix Swagger issues * Solve validation --------- Co-authored-by: Mark Cowlishaw --- .../examples/DeleteManagementGroup.json | 3 +++ .../examples/ListHierarchySettings.json | 2 +- .../examples/ListManagementGroups.json | 2 +- .../2020-05-01/examples/ListOperations.json | 23 ++++++++++++++++ .../stable/2020-05-01/management.json | 11 +++++--- ...etAllSubscriptionsFromManagementGroup.json | 4 +-- .../examples/ListHierarchySettings.json | 2 +- .../examples/ListManagementGroups.json | 2 +- .../stable/2020-10-01/management.json | 26 +++---------------- .../AddManagementGroupSubscription.json | 4 +-- ...etAllSubscriptionsFromManagementGroup.json | 4 +-- .../stable/2021-04-01/management.json | 20 +------------- 12 files changed, 46 insertions(+), 57 deletions(-) create mode 100644 specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListOperations.json diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/DeleteManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/DeleteManagementGroup.json index 8c4dd0f49c..26afc66e1f 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/DeleteManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/DeleteManagementGroup.json @@ -11,6 +11,9 @@ "type": "Microsoft.Management/managementGroups", "name": "GroupToDelete", "status": "NotStarted" + }, + "headers": { + "azure-asyncoperation": "https://management.azure.com/providers/Microsoft.Management/operationResults/delete/asyncOperation/status/managementGroups/GroupToDelete?api-version=2020-05-01" } }, "204": {} diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListHierarchySettings.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListHierarchySettings.json index feb1fbbd26..d2a671a732 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListHierarchySettings.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListHierarchySettings.json @@ -18,7 +18,7 @@ } } ], - "nextLink": null + "@nextLink": null } } } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListManagementGroups.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListManagementGroups.json index d855dc9f2a..05edff6d68 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListManagementGroups.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListManagementGroups.json @@ -26,7 +26,7 @@ } } ], - "nextLink": null + "@nextLink": null } } } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListOperations.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListOperations.json new file mode 100644 index 0000000000..f3e4f5af36 --- /dev/null +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/examples/ListOperations.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2020-05-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "display": { + "provider": "aaaaaaaaaaaaaaaaaaaaa", + "resource": "aaaaaaaaaaaaa", + "operation": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "description": "aaaaaaaaaaaaaaaaaaaaaa" + } + } + ], + "nextLink": "aaaaaaaaaaaaaaaaaaa" + } + } + } +} diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/management.json index 9b17bfba4f..f2e63e799a 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/management.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-05-01/management.json @@ -81,7 +81,7 @@ } }, "x-ms-pageable": { - "nextLinkName": "nextLink" + "nextLinkName": "@nextLink" }, "x-ms-examples": { "ListManagementGroups": { @@ -712,6 +712,11 @@ }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Operations": { + "$ref": "./examples/ListOperations.json" + } } } }, @@ -1059,7 +1064,7 @@ "$ref": "#/definitions/ManagementGroupInfo" } }, - "nextLink": { + "@nextLink": { "description": "The URL to use for getting the next set of results.", "type": "string", "readOnly": true @@ -1431,7 +1436,7 @@ "$ref": "#/definitions/HierarchySettingsInfo" } }, - "nextLink": { + "@nextLink": { "description": "The URL to use for getting the next set of results.", "type": "string", "readOnly": true diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/GetAllSubscriptionsFromManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/GetAllSubscriptionsFromManagementGroup.json index 5f72aeeeeb..c7f222b003 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/GetAllSubscriptionsFromManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/GetAllSubscriptionsFromManagementGroup.json @@ -14,9 +14,7 @@ "properties": { "displayName": "S5", "parent": { - "id": "/providers/Microsoft.Management/managementGroups/Group", - "name": "name", - "displayName": "displayName" + "id": "/providers/Microsoft.Management/managementGroups/Group" }, "state": "Active", "tenant": "e751ac82-623b-4913-8d74-22637c832373" diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListHierarchySettings.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListHierarchySettings.json index 05aa8a9e39..66c9377436 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListHierarchySettings.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListHierarchySettings.json @@ -18,7 +18,7 @@ } } ], - "nextLink": null + "@nextLink": null } } } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListManagementGroups.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListManagementGroups.json index 707b791f87..cfaa77bb35 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListManagementGroups.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/examples/ListManagementGroups.json @@ -26,7 +26,7 @@ } } ], - "nextLink": null + "@nextLink": null } } } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/management.json index 2f1c71e114..7b41f52b9c 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/management.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2020-10-01/management.json @@ -81,7 +81,7 @@ } }, "x-ms-pageable": { - "nextLinkName": "nextLink" + "nextLinkName": "@nextLink" }, "x-ms-examples": { "ListManagementGroups": { @@ -1070,7 +1070,7 @@ "$ref": "#/definitions/ManagementGroupInfo" } }, - "nextLink": { + "@nextLink": { "description": "The URL to use for getting the next set of results.", "type": "string", "readOnly": true @@ -1173,7 +1173,7 @@ }, "parent": { "title": "Parent", - "$ref": "#/definitions/ParentGroupBagInfo", + "$ref": "#/definitions/DescendantParentGroupInfo", "x-nullable": true }, "state": { @@ -1450,7 +1450,7 @@ "$ref": "#/definitions/HierarchySettingsInfo" } }, - "nextLink": { + "@nextLink": { "description": "The URL to use for getting the next set of results.", "type": "string", "readOnly": true @@ -1579,24 +1579,6 @@ } } }, - "ParentGroupBagInfo": { - "description": "The ID, name and displayName of the parent management group.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" - }, - "name": { - "type": "string", - "description": "The name of the parent management group. For example, 00000000-0000-0000-0000-000000000000" - }, - "displayName": { - "type": "string", - "description": "The friendly name of the parent management group." - } - } - }, "EntityListResult": { "description": "Describes the result of the request to view entities.", "properties": { diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/AddManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/AddManagementGroupSubscription.json index 56f591f117..1e62ffcd9c 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/AddManagementGroupSubscription.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/AddManagementGroupSubscription.json @@ -14,9 +14,7 @@ "properties": { "displayName": "Group", "parent": { - "id": "/providers/Microsoft.Management/managementGroups/Group", - "name": "name", - "displayName": "displayName" + "id": "/providers/Microsoft.Management/managementGroups/Group" }, "state": "Active", "tenant": "e751ac82-623b-4913-8d74-22637c832373" diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetAllSubscriptionsFromManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetAllSubscriptionsFromManagementGroup.json index 711fb0738a..ef5c1c9161 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetAllSubscriptionsFromManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetAllSubscriptionsFromManagementGroup.json @@ -14,9 +14,7 @@ "properties": { "displayName": "S5", "parent": { - "id": "/providers/Microsoft.Management/managementGroups/Group", - "name": "name", - "displayName": "displayName" + "id": "/providers/Microsoft.Management/managementGroups/Group" }, "state": "Active", "tenant": "e751ac82-623b-4913-8d74-22637c832373" diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/management.json index 3bdcb8d6d7..cf453e8672 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/management.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/management.json @@ -1176,7 +1176,7 @@ }, "parent": { "title": "Parent", - "$ref": "#/definitions/ParentGroupBagInfo", + "$ref": "#/definitions/DescendantParentGroupInfo", "x-nullable": true }, "state": { @@ -1608,24 +1608,6 @@ } } }, - "ParentGroupBagInfo": { - "description": "The ID, name and displayName of the parent management group.", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" - }, - "name": { - "type": "string", - "description": "The name of the parent management group. For example, 00000000-0000-0000-0000-000000000000" - }, - "displayName": { - "type": "string", - "description": "The friendly name of the parent management group." - } - } - }, "EntityListResult": { "description": "Describes the result of the request to view entities.", "properties": {