Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 tasks
mkanal opened this issue Mar 8, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mkanal
Copy link

mkanal commented Mar 8, 2024

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
@mkanal mkanal added the enhancement New feature or request label Mar 8, 2024
@mkanal mkanal changed the title Validation endpoint for validation of policy against compliant policy templates /api/policy-hub/validate-policy Endpoint for validation of policy against compliant policy templates /api/policy-hub/validate-policy Mar 13, 2024
@mkanal
Copy link
Author

mkanal commented Mar 21, 2024

Hi @jjeroch kindly ask if there are any updates for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants