-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-authz-config.json
137 lines (137 loc) · 3.91 KB
/
test-authz-config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"allowRemoteResourceManagement": true,
"policyEnforcementMode": "ENFORCING",
"resources": [
{
"name": "Default Resource",
"type": "urn:fairmatic_pas:resources:default",
"ownerManagedAccess": false,
"attributes": {},
"_id": "cef0afd8-7b49-41c4-9629-94ec36ff9fa9",
"uris": [
"/*"
]
},
{
"name": "Protected-Resource",
"type": "api",
"ownerManagedAccess": true,
"attributes": {},
"_id": "b937383a-0576-4381-83f0-056a9fbd5c27",
"uris": [
"/protected"
],
"scopes": [
{
"name": "protected:view"
}
],
"icon_uri": ""
}
],
"policies": [
{
"id": "23b6a304-f016-4114-8b09-8addde15fbf6",
"name": "Default Policy",
"description": "A policy that grants access only for users within this realm",
"type": "js",
"logic": "POSITIVE",
"decisionStrategy": "AFFIRMATIVE",
"config": {
"code": "// by default, grants any permission associated with this policy\n$evaluation.grant();\n"
}
},
{
"id": "e68ff710-1866-49d8-b496-73a7df88dcaf",
"name": "Protected_Resource_Policy",
"description": "protected_Resource_Policy",
"type": "role",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"roles": "[{\"id\":\"admin\",\"required\":false},{\"id\":\"uma_authorization\",\"required\":false}]"
}
},
{
"id": "ce9f9987-7cb2-4428-8b6a-a20aa822ceb2",
"name": "Test-Protected-Resource",
"description": "test the protected resource",
"type": "role",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"roles": "[{\"id\":\"fairmatic_pas/uma_protection\",\"required\":true}]"
}
},
{
"id": "2d4a5097-f1de-4116-a9ad-f3272817033f",
"name": "Default Permission",
"description": "A permission that applies to the default resource type",
"type": "resource",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"defaultResourceType": "urn:fairmatic_pas:resources:default",
"applyPolicies": "[\"Default Policy\"]"
}
},
{
"id": "eaa4160d-e468-4ff0-a1d4-29cd89bd8b45",
"name": "protected_Resource",
"description": "prrotect an api ",
"type": "resource",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"defaultResourceType": "api",
"applyPolicies": "[\"Protected_Resource_Policy\"]"
}
},
{
"id": "8548c48a-41db-4182-938d-88d9ef5af40e",
"name": "protected_ResourceN",
"description": "protected_ResourceN",
"type": "resource",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"defaultResourceType": "api",
"applyPolicies": "[\"Test-Protected-Resource\"]"
}
},
{
"id": "11ae01e6-93eb-4736-b5e8-0b6f0d5086b7",
"name": "Protected-Resource-Scope-Based",
"description": "Protected Resource Scope Based Permission",
"type": "scope",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"defaultResourceType": "api",
"applyPolicies": "[\"Test-Protected-Resource\"]",
"scopes": "[\"protected:view\"]"
}
},
{
"id": "ff6dac87-6331-4710-922c-04860eff4974",
"name": "Resource-Based-Permission-Test",
"description": "Resource-Based-Permission-Test",
"type": "resource",
"logic": "POSITIVE",
"decisionStrategy": "UNANIMOUS",
"config": {
"resources": "[\"Protected-Resource\"]",
"applyPolicies": "[\"Test-Protected-Resource\"]"
}
}
],
"scopes": [
{
"id": "6ae59f8d-b0a8-4df2-924d-94d47a889269",
"name": "protected:view",
"iconUri": "test",
"displayName": "protected-view"
}
],
"decisionStrategy": "UNANIMOUS"
}