GithubHelp home page GithubHelp logo

Comments (4)

wolf4ood avatar wolf4ood commented on September 17, 2024

Hi @arnoweiss

thanks for raising this, just to check which one is working for you this one?

{
  "@id": "pol-def-id",
  "policy": {
    "@type": "odrl:Set",
    "odrl:permission": {
      "odrl:action": {
        "odrl:type": "http://www.w3.org/ns/odrl/2/use"
      },
      "odrl:constraint": {
        "odrl:and": [
          {
            "odrl:leftOperand": "cx-policy:FrameworkAgreement",
            "odrl:operator": {
              "@id": "odrl:eq"
            },
            "odrl:rightOperand": "traceability:3.0"
          },
          {
            "odrl:leftOperand": "https://w3id.org/catenax/policy/UsagePurpose",
            "odrl:operator": {
              "@id": "odrl:eq"
            },
            "odrl:rightOperand": "cx.core.qualityNotifications:1"
          }
        ]
      }
    },
    "odrl:prohibition": [],
    "odrl:obligation": []
  },
  "@context": {
    "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
    "edc": "https://w3id.org/edc/v0.0.1/ns/",
    "tx": "https://w3id.org/tractusx/v0.0.1/ns/",
    "tx-auth": "https://w3id.org/tractusx/auth/",
    "cx-policy": "https://w3id.org/catenax/policy/",
    "odrl": "http://www.w3.org/ns/odrl/2/"
  }
}

from tractusx-edc.

arnoweiss avatar arnoweiss commented on September 17, 2024

Your payload works as expected, mine doesn't. The UsagePurpose constraint has no influence on the result.

from tractusx-edc.

wolf4ood avatar wolf4ood commented on September 17, 2024

From a quick look seems that what's happening here is that your payload actually works and gets evaluated in the catalog request with permission denied,

while my payload is wrong since the expanded version will be different from your.

 "odrl:leftOperand": "cx-policy:FrameworkAgreement",
"http://www.w3.org/ns/odrl/2/leftOperand": [
   {
       "@value": "cx-policy:FrameworkAgreement"
   }
]

which will not trigger the policy evaluation function.

while yours it's directly expanded and triggers the function

if you want to use the prefix i think you should have

 "odrl:leftOperand": {
     "@id", "cx-policy:FrameworkAgreement",
 }

and should yield the same result (permission denied)

from tractusx-edc.

arnoweiss avatar arnoweiss commented on September 17, 2024

Thanks for hint

from tractusx-edc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.