blob: dd06fcd9cd47313730a3eace4967aa7b8ec20682 [file] [log] [blame]
{
"name" : "Operator policy set",
"policies" : [
{
"name" : "PolicyMatcher MUST NOT match this policy during this test.",
"target" : {
"name" : "When an operator reads an asset",
"resource" : {
"name" : "Asset",
"uriTemplate" : "/assets/{asset_id}",
"attributes" : [
{ "issuer" : "https://acs.attributes.int",
"name" : "group" }
]
},
"action" : "GET",
"subject" : {
"name" : "Operator",
"attributes" : [
{ "issuer" : "https://acs.attributes.int",
"name" : "group" }
]
}
},
"conditions" : [
{ "name" : "is member of group",
"condition" : "match.any(subject.attributes('https://acs.attributes.int', 'group'), resource.attributes('https://acs.attributes.int', 'group'))" }
],
"effect" : "PERMIT"
},
{
"name" : "PolicyMatcher MUST match this policy during this test.",
"target" : {
"name" : "When an operator reads a site",
"resource" : {
"name" : "Site",
"uriTemplate" : "/sites/{site_id}"
},
"action" : "GET",
"subject" : {
"name" : "Operator",
"attributes" : [
{ "issuer" : "https://acs.attributes.int",
"name" : "site" }
]
}
},
"conditions" : [
{ "name" : "is assigned to site",
"condition" : "match.single(subject.attributes('https://acs.attributes.int', 'site'), resource.uri.placeHolder('site_id'))" }
],
"effect" : "PERMIT"
}
]
}