2017-04-20 13:41:43 +00:00
|
|
|
{
|
|
|
|
"realm": "servlet-policy-enforcer-authz",
|
|
|
|
"enabled": true,
|
|
|
|
"requiredCredentials": [
|
|
|
|
"password"
|
|
|
|
],
|
|
|
|
"users": [
|
|
|
|
{
|
|
|
|
"username": "alice",
|
|
|
|
"enabled": true,
|
|
|
|
"credentials": [
|
|
|
|
{
|
|
|
|
"type": "password",
|
|
|
|
"value": "alice"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"realmRoles": [
|
|
|
|
"uma_authorization"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"username": "jdoe",
|
|
|
|
"enabled": true,
|
|
|
|
"credentials": [
|
|
|
|
{
|
|
|
|
"type": "password",
|
|
|
|
"value": "jdoe"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"realmRoles": [
|
|
|
|
"uma_authorization"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"username": "service-account-servlet-policy-enforcer",
|
|
|
|
"enabled": true,
|
|
|
|
"serviceAccountClientId": "servlet-policy-enforcer",
|
|
|
|
"clientRoles": {
|
|
|
|
"servlet-policy-enforcer": [
|
|
|
|
"uma_protection"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"clients": [
|
|
|
|
{
|
|
|
|
"clientId": "servlet-policy-enforcer",
|
|
|
|
"secret": "secret",
|
|
|
|
"authorizationServicesEnabled": true,
|
|
|
|
"enabled": true,
|
|
|
|
"redirectUris": [
|
|
|
|
"/servlet-policy-enforcer/*"
|
|
|
|
],
|
|
|
|
"baseUrl": "/servlet-policy-enforcer",
|
|
|
|
"adminUrl": "/servlet-policy-enforcer",
|
|
|
|
"directAccessGrantsEnabled": true,
|
|
|
|
"authorizationSettings": {
|
|
|
|
"allowRemoteResourceManagement": false,
|
|
|
|
"policyEnforcementMode": "ENFORCING",
|
|
|
|
"resources": [
|
|
|
|
{
|
|
|
|
"name": "Welcome Resource",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": ""
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 1",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": ""
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 2",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": "/resource/resource-a"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 3",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": "/resource/resource-b/test"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 4",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": "/resource-c"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 5",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": "/resource/d/resource-d"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 6",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": ""
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 7",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": ""
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
2018-02-22 18:41:27 +00:00
|
|
|
"name": "Pattern 8"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
2018-02-22 18:41:27 +00:00
|
|
|
"name": "Pattern 9"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
2018-02-22 18:41:27 +00:00
|
|
|
"name": "Pattern 10"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
2018-02-22 18:41:27 +00:00
|
|
|
"name": "Pattern 11"
|
2017-04-26 06:32:40 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 12",
|
2018-02-22 18:41:27 +00:00
|
|
|
"uri": "/realm_uri"
|
2018-03-09 19:39:33 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 13",
|
|
|
|
"uri": "/keycloak-6623/*"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 14",
|
|
|
|
"uri": "/keycloak-6623/sub-resource/*"
|
2018-04-25 21:16:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 15",
|
|
|
|
"type": "pattern-15",
|
|
|
|
"uri": "/keycloak-7148/{id}"
|
2018-07-03 07:56:25 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 16",
|
|
|
|
"uris": ["/keycloak-7269/sub-resource1", "/keycloak-7269/sub-resource2/*", "/keycloak-7269/sub-resource1/{test-pattern}/specialSuffix"]
|
2018-11-15 10:10:30 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 17",
|
|
|
|
"uris": ["/keycloak-8823/resource/{version}/subresource/{id}/{other}"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 17 Entities",
|
|
|
|
"uris": ["/keycloak-8823/resource/{version}/subresource/{id}/entities"]
|
2017-04-20 13:41:43 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"policies": [
|
|
|
|
{
|
|
|
|
"name": "Default Policy",
|
2022-04-20 12:25:16 +00:00
|
|
|
"type": "script-scripts/default-policy.js",
|
2017-04-20 13:41:43 +00:00
|
|
|
"logic": "POSITIVE",
|
2022-04-20 12:25:16 +00:00
|
|
|
"decisionStrategy": "AFFIRMATIVE"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Deny Policy",
|
2022-04-20 12:25:16 +00:00
|
|
|
"type": "script-scripts/default-policy.js",
|
2017-04-20 13:41:43 +00:00
|
|
|
"logic": "NEGATIVE",
|
2022-04-20 12:25:16 +00:00
|
|
|
"decisionStrategy": "UNANIMOUS"
|
2017-04-20 13:41:43 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 3 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "AFFIRMATIVE",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 3\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 2 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "AFFIRMATIVE",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 2\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 4 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 4\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 5 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 5\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 7 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "AFFIRMATIVE",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 7\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 8 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 8\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 9 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 9\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 6 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "AFFIRMATIVE",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 6\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Welcome Resource Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Welcome Resource\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 1 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 1\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 10 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 10\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 11 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 11\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
2017-04-26 06:32:40 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 12 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 12\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
2018-03-09 19:39:33 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 13 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 13\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 14 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 14\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
2018-04-25 21:16:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 15 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"defaultResourceType": "pattern-15",
|
|
|
|
"default": "true",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
2018-07-03 07:56:25 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 16 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 16\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
2018-11-15 10:10:30 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 17 Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 17\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Pattern 17 Entities Permission",
|
|
|
|
"type": "resource",
|
|
|
|
"logic": "POSITIVE",
|
|
|
|
"decisionStrategy": "UNANIMOUS",
|
|
|
|
"config": {
|
|
|
|
"resources": "[\"Pattern 17 Entities\"]",
|
|
|
|
"applyPolicies": "[\"Default Policy\"]"
|
|
|
|
}
|
2017-04-20 13:41:43 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"scopes": []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|