Skip to content

Endpoint for validation of policy against compliant policy templates /api/policy-hub/validate-policy #64

Open
@mkanal

Description

@mkanal

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions