Skip to content

Commit 35d065e

Browse files
giromm2msGideon Rommchlahav
authored andcommitted
Added new SecureScore API to Microsoft.Security (Azure#8235)
* Set theme jekyll-theme-midnight * Adding new APIs for secure score * Updated files * updated md file * Working on 1 path at a time * Fix type to ref * more fixes * removed ref type * AutoRest fixes * more fixes * Internal PR * fixed some static validation issues * Fixed some more auto-rest issues * Fixed example + organizing readonly attribute * Run prettier on files * Changed initiativeId to policySetDefinitionId in the sample files * Changed assessmentsMetadata to assessmentsDefinition * Added scope in defintions example and adjust enum value of BuiltIn * Added missing fields and align examples * Renamed fields in example files * Changed return value * Added control definitions per subscription scope * Added definition property (optional, in case of $expand) * prettier updated files * prettier again ... * PR comments * Renamed enum * Fixed some errors * Remove "secureScoreName" parameter from example * Changed operationId from GetSecureScores_Single to SecureScores_Get * prettifying the code * Updated based on PR comments * Fix casing issues in example files name * Fixing sample files and remove some enum options * Updated readme.md file * Remove trailing whitespace * Update specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/secureScore.json Co-Authored-By: Chen Lahav <[email protected]> * Update specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/secureScore.json Co-Authored-By: Chen Lahav <[email protected]> * Update specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/secureScore.json Co-Authored-By: Chen Lahav <[email protected]> * Update specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/secureScore.json Co-Authored-By: Chen Lahav <[email protected]> * Update specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/secureScore.json Co-Authored-By: Chen Lahav <[email protected]> * Update specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/secureScores/GetSecureScoresSingle_example.json Co-Authored-By: Chen Lahav <[email protected]> * Fixed PR comments * Fix definitions renaming * Fix examples * Trying to fix model validation * Changed example type * Updating from master (Resolving conflicts) * Converting all EOL to CRLF + remove trailing blanks * Removed Scope paths, updated examples * Replaced scope with sub id in example * updated secureScoresControls id in examples * example files ids and type fixes Co-authored-by: Gideon Romm <[email protected]> Co-authored-by: Chen Lahav <[email protected]>
1 parent f7b68f4 commit 35d065e

File tree

10 files changed

+1064
-1
lines changed

10 files changed

+1064
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-01-01-preview"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/a9909064-42b4-4d34-8143-275477afe18b",
11+
"name": "a9909064-42b4-4d34-8143-275477afe18b",
12+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
13+
"properties": {
14+
"source": {
15+
"sourceType": "BuiltIn"
16+
},
17+
"displayName": "Protect applications against DDoS attacks",
18+
"description": "This control contains recommendations regarding DDoS attack prevention",
19+
"maxScore": 2,
20+
"assessmentDefinitions": [
21+
{
22+
"id": "/providers/Microsoft.Security/assessmentMetadata/e3de1cc0-f4dd-3b34-e496-8b5381ba2d70"
23+
}
24+
]
25+
}
26+
},
27+
{
28+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/a000c66f-6da2-4f9d-826d-2364347d2588",
29+
"name": "a000c66f-6da2-4f9d-826d-2364347d2588",
30+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
31+
"properties": {
32+
"source": {
33+
"sourceType": "BuiltIn"
34+
},
35+
"displayName": "Apply adaptive application control",
36+
"description": "This control contains recommendations regarding enable of adaptive application control",
37+
"maxScore": 3,
38+
"assessmentDefinitions": [
39+
{
40+
"id": "/providers/Microsoft.Security/assessmentMetadata/35f45c95-27cf-4e52-891f-8390d1de5828"
41+
},
42+
{
43+
"id": "/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"
44+
},
45+
{
46+
"id": "/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"
47+
},
48+
{
49+
"id": "/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"
50+
}
51+
]
52+
}
53+
}
54+
]
55+
}
56+
}
57+
}
58+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/a9909064-42b4-4d34-8143-275477afe18b",
12+
"name": "a9909064-42b4-4d34-8143-275477afe18b",
13+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
14+
"properties": {
15+
"source": {
16+
"sourceType": "BuiltIn"
17+
},
18+
"displayName": "Protect applications against DDoS attacks",
19+
"description": "This control contains recommendations regarding DDoS attack prevention",
20+
"maxScore": 2,
21+
"assessmentDefinitions": [
22+
{
23+
"id": "/providers/Microsoft.Security/assessmentMetadata/e3de1cc0-f4dd-3b34-e496-8b5381ba2d70"
24+
}
25+
]
26+
}
27+
},
28+
{
29+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
30+
"name": "34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
31+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
32+
"properties": {
33+
"source": {
34+
"sourceType": "BuiltIn"
35+
},
36+
"displayName": "Enable MFA",
37+
"description": "This control contains recommendations regarding MFA",
38+
"maxScore": 10,
39+
"assessmentDefinitions": [
40+
{
41+
"id": "/providers/Microsoft.Security/assessmentMetadata/151e82c5-5341-a74b-1eb0-bc38d2c84bb5"
42+
},
43+
{
44+
"id": "/providers/Microsoft.Security/assessmentMetadata/57e98606-6b1e-6193-0e3d-fe621387c16b"
45+
},
46+
{
47+
"id": "/providers/Microsoft.Security/assessmentMetadata/94290b00-4d0c-d7b4-7cea-064a9554e681"
48+
}
49+
]
50+
}
51+
},
52+
{
53+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/a000c66f-6da2-4f9d-826d-2364347d2588",
54+
"name": "a000c66f-6da2-4f9d-826d-2364347d2588",
55+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
56+
"properties": {
57+
"source": {
58+
"sourceType": "BuiltIn"
59+
},
60+
"displayName": "Apply adaptive application control",
61+
"description": "This control contains recommendations regarding enable of adaptive application control",
62+
"maxScore": 3,
63+
"assessmentDefinitions": [
64+
{
65+
"id": "/providers/Microsoft.Security/assessmentMetadata/35f45c95-27cf-4e52-891f-8390d1de5828"
66+
},
67+
{
68+
"id": "/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"
69+
},
70+
{
71+
"id": "/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"
72+
},
73+
{
74+
"id": "/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"
75+
}
76+
]
77+
}
78+
}
79+
]
80+
}
81+
}
82+
}
83+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"secureScoreName": "ascScore"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/secureScores/ascScore",
11+
"name": "ascScore",
12+
"type": "Microsoft.Security/secureScores",
13+
"properties": {
14+
"displayName": "Asc Score",
15+
"score": {
16+
"max": 13,
17+
"current": 3
18+
}
19+
}
20+
}
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"secureScoreName": "ascScore",
6+
"$expand": "definition"
7+
},
8+
"responses": {
9+
"200": {
10+
"parameters": {
11+
"secureScoreName": "ascScore"
12+
},
13+
"body": {
14+
"value": [
15+
{
16+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/SecureScoreControls/a9909064-42b4-4d34-8143-275477afe18b",
17+
"name": "a9909064-42b4-4d34-8143-275477afe18b",
18+
"type": "Microsoft.Security/secureScoreControls",
19+
"properties": {
20+
"displayName": "Protect applications against DDoS attacks",
21+
"healthyResourceCount": 0,
22+
"unhealthyResourceCount": 0,
23+
"notApplicableResourceCount": 10,
24+
"score": {
25+
"max": 0,
26+
"current": 0
27+
},
28+
"definition": {
29+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/a9909064-42b4-4d34-8143-275477afe18b",
30+
"name": "a9909064-42b4-4d34-8143-275477afe18b",
31+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
32+
"properties": {
33+
"source": {
34+
"sourceType": "BuiltIn"
35+
},
36+
"displayName": "Protect applications against DDoS attacks",
37+
"description": "This control contains recommendations regarding DDoS attack prevention",
38+
"maxScore": 2,
39+
"assessmentDefinitions": [
40+
{
41+
"id": "/providers/Microsoft.Security/assessmentMetadata/e3de1cc0-f4dd-3b34-e496-8b5381ba2d70"
42+
}
43+
]
44+
}
45+
}
46+
}
47+
},
48+
{
49+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/SecureScoreControls/34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
50+
"name": "34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
51+
"type": "Microsoft.Security/SecureScoreControls",
52+
"properties": {
53+
"displayName": "Enable MFA",
54+
"healthyResourceCount": 0,
55+
"unhealthyResourceCount": 1,
56+
"notApplicableResourceCount": 0,
57+
"score": {
58+
"max": 10,
59+
"current": 0
60+
},
61+
"definition": {
62+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
63+
"name": "34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
64+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
65+
"properties": {
66+
"source": {
67+
"sourceType": "BuiltIn"
68+
},
69+
"displayName": "Enable MFA",
70+
"description": "This control contains recommendations regarding MFA",
71+
"maxScore": 10,
72+
"assessmentDefinitions": [
73+
{
74+
"id": "/providers/Microsoft.Security/assessmentMetadata/151e82c5-5341-a74b-1eb0-bc38d2c84bb5"
75+
},
76+
{
77+
"id": "/providers/Microsoft.Security/assessmentMetadata/57e98606-6b1e-6193-0e3d-fe621387c16b"
78+
},
79+
{
80+
"id": "/providers/Microsoft.Security/assessmentMetadata/94290b00-4d0c-d7b4-7cea-064a9554e681"
81+
}
82+
]
83+
}
84+
}
85+
}
86+
},
87+
{
88+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/SecureScoreControls/a000c66f-6da2-4f9d-826d-2364347d2588",
89+
"name": "a000c66f-6da2-4f9d-826d-2364347d2588",
90+
"type": "Microsoft.Security/SecureScoreControls",
91+
"properties": {
92+
"displayName": "Apply adaptive application control",
93+
"healthyResourceCount": 20,
94+
"unhealthyResourceCount": 0,
95+
"notApplicableResourceCount": 10,
96+
"score": {
97+
"max": 3,
98+
"current": 3
99+
},
100+
"definition": {
101+
"id": "/providers/Microsoft.Security/SecureScoreControlDefinitions/a000c66f-6da2-4f9d-826d-2364347d2588",
102+
"name": "a000c66f-6da2-4f9d-826d-2364347d2588",
103+
"type": "Microsoft.Security/SecureScoreControlDefinitions",
104+
"properties": {
105+
"source": {
106+
"sourceType": "BuiltIn"
107+
},
108+
"displayName": "Apply adaptive application control",
109+
"description": "This control contains recommendations regarding enable of adaptive application control",
110+
"maxScore": 3,
111+
"assessmentDefinitions": [
112+
{
113+
"id": "/providers/Microsoft.Security/assessmentMetadata/35f45c95-27cf-4e52-891f-8390d1de5828"
114+
},
115+
{
116+
"id": "/providers/Microsoft.Security/assessmentMetadata/d1db3318-01ff-16de-29eb-28b344515626"
117+
},
118+
{
119+
"id": "/providers/Microsoft.Security/assessmentMetadata/e7ee30c4-bac9-2966-54bd-2023a4282872"
120+
},
121+
{
122+
"id": "/providers/Microsoft.Security/assessmentMetadata/8e2b96ff-3de2-289b-b5c1-3b9921a3441e"
123+
}
124+
]
125+
}
126+
}
127+
}
128+
}
129+
]
130+
}
131+
}
132+
}
133+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"secureScoreName": "ascScore"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/SecureScoreControls/a9909064-42b4-4d34-8143-275477afe18b",
13+
"name": "a9909064-42b4-4d34-8143-275477afe18b",
14+
"type": "Microsoft.Security/SecureScoreControls",
15+
"properties": {
16+
"displayName": "Protect applications against DDoS attacks",
17+
"healthyResourceCount": 0,
18+
"unhealthyResourceCount": 0,
19+
"notApplicableResourceCount": 10,
20+
"score": {
21+
"max": 0,
22+
"current": 0
23+
}
24+
}
25+
},
26+
{
27+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/SecureScoreControls/34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
28+
"name": "34a42fb3-e6db-409c-b56b-7b1db6b8aee0",
29+
"type": "Microsoft.Security/SecureScoreControls",
30+
"properties": {
31+
"displayName": "Enable MFA",
32+
"healthyResourceCount": 0,
33+
"unhealthyResourceCount": 1,
34+
"notApplicableResourceCount": 0,
35+
"score": {
36+
"max": 10,
37+
"current": 0
38+
}
39+
}
40+
},
41+
{
42+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/SecureScoreControls/a000c66f-6da2-4f9d-826d-2364347d2588",
43+
"name": "a000c66f-6da2-4f9d-826d-2364347d2588",
44+
"type": "Microsoft.Security/SecureScoreControls",
45+
"properties": {
46+
"displayName": "Apply adaptive application control",
47+
"healthyResourceCount": 20,
48+
"unhealthyResourceCount": 0,
49+
"notApplicableResourceCount": 10,
50+
"score": {
51+
"max": 3,
52+
"current": 3
53+
}
54+
}
55+
}
56+
]
57+
}
58+
}
59+
}
60+
}

0 commit comments

Comments
 (0)