File tree Expand file tree Collapse file tree 3 files changed +83
-0
lines changed
policyDefinitions/Search/return-forbidden-for-auth-failure Expand file tree Collapse file tree 3 files changed +83
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "type" : " Microsoft.Authorization/policyDefinitions" ,
3+ "name" : " e62541ee-b22d-4942-afa0-e15ecb4472da" ,
4+ "properties" : {
5+ "displayName" : " Auth failure should return 403 when in transition from api keys to RBAC authentication" ,
6+ "mode" : " All" ,
7+ "description" : " Set auth failure mode to https403 for search services in the transition state between using api keys for authentication to RBAC" ,
8+ "metadata" : {
9+ "category" : " Search" ,
10+ "version" : " 1.0.0"
11+ },
12+ "parameters" : {
13+ "effect" : {
14+ "type" : " String" ,
15+ "metadata" : {
16+ "displayName" : " Effect" ,
17+ "description" : " Enable or disable the execution of the policy"
18+ },
19+ "allowedValues" : [
20+ " Audit" ,
21+ " Disabled"
22+ ],
23+ "defaultValue" : " Audit"
24+ }
25+ },
26+ "policyRule" : {
27+ "if" : {
28+ "allOf" : [
29+ {
30+ "field" : " type" ,
31+ "equals" : " Microsoft.Search/searchServices"
32+ },
33+ {
34+ "field" : " Microsoft.Search/searchServices/disableLocalAuth" ,
35+ "notEquals" : " true"
36+ },
37+ {
38+ "field" : " Microsoft.Search/searchServices/authOptions.aadOrApiKey.aadAuthFailureMode" ,
39+ "notEquals" : " http403"
40+ }
41+ ]
42+ },
43+ "then" : {
44+ "effect" : " [parameters('effect')]"
45+ }
46+ }
47+ }
48+ }
Original file line number Diff line number Diff line change 1+ {
2+ "effect" : {
3+ "type" : " String" ,
4+ "metadata" : {
5+ "displayName" : " Effect" ,
6+ "description" : " Enable or disable the execution of the policy"
7+ },
8+ "allowedValues" : [
9+ " Audit" ,
10+ " Disabled"
11+ ],
12+ "defaultValue" : " Audit"
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ {
2+ "if" : {
3+ "allOf" : [
4+ {
5+ "field" : " type" ,
6+ "equals" : " Microsoft.Search/searchServices"
7+ },
8+ {
9+ "field" : " Microsoft.Search/searchServices/disableLocalAuth" ,
10+ "notEquals" : " true"
11+ },
12+ {
13+ "field" : " Microsoft.Search/searchServices/authOptions.aadOrApiKey.aadAuthFailureMode" ,
14+ "notEquals" : " http403"
15+ }
16+ ]
17+ },
18+ "then" : {
19+ "effect" : " [parameters('effect')]"
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments