Open
Description
Description
The IRS policy store must be validated before a new policy can be created and validated in the system. This is necessary so that the system cannot be compromised or incorrect policies are used in the system due to incorrect or improper use.
The IRS policy store already receives a comprehensive policy in the ordl schema. In the next step, this should be validated against an endpoint of the policy hub and then validated.
In the future, a periodic comparison of the stored policies may also be necessary, as policy definitions can change over time. It would therefore be necessary to revalidate the overall status of the policies, which would mean a list of values.
Acceptance Criteria
- endpoint accepts one of a list of policy payloads in ordl schema
- endpoint validates policy payload against policy templates
- endpoint returns compliance or non-compliance status after validating given policy against C-X policy definitions
- in case of non-compliance policy, the requestor receives a comprehensible error message which parts of the policy is not compliant and how policy could be corrected
Additional Information
POST /api/policy-hub/validate-policy
Request body:
[
{
"content": {
"@context": [
"https://www.w3.org/ns/odrl.jsonld",
{
"cx": "https://w3id.org/catenax/v0.0.1/ns/"
}
],
"@type": "Offer",
"@id": "1",
},
{
"content": {
"@context": [
"https://www.w3.org/ns/odrl.jsonld",
{
"cx": "https://w3id.org/catenax/v0.0.1/ns/"
}
],
"@type": "Offer",
"@id": "2",
},
]
Response body:
t.b.d