Define Rule with Data Element and Role
Define that includes a data element and role.
What you are doing
Creating the policy rule that binds:
- A role: Who.
- A data element: What.
- Permitted operations: Protect, Reprotect, or Unprotect.
Why it matters
This binding is what makes the policy enforceable. Without rules, the policy exists but grants no access.
Tips
This rule grants the specified role permission to protect the CCN data element, while disallowing reprotect and unprotect.
CLI Code
pim create policies rules 1 --rule "1,1,1,NULL_VALUE,true,false,true"
CLI Actual Output
## Role Dataelement Mask Noaccessoperation Access
1 1 1 NULL_VALUE {'protect': True, 'reProtect': False, 'unProtect': True}
API Endpoint
POST /pim/policies/{POLICY_UID}/rules
API Code
curl -k \
-H "Authorization: Bearer ${TOKEN}" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-X POST "https://${GW_HOST}/pty/v2/pim/policies/1/rules" \
-d '{
"role": "1",
"dataElement": "1",
"mask": "1",
"noAccessOperation": "NULL_VALUE",
"permission": {
"access": {
"protect": true,
"reProtect": false,
"unProtect": true
}
}
}'
API Actual Output
{"role":"1","mask":"1","dataElement":"1","permission":{"access":{"protect":true,"reProtect":false,"unProtect":true}}}
Feedback
Was this page helpful?