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

Policy model ignores odrl:remedy property within odrl:Prohibition #3959

Closed
gkirtzou opened this issue Mar 5, 2024 · 3 comments · Fixed by #4056
Closed

Policy model ignores odrl:remedy property within odrl:Prohibition #3959

gkirtzou opened this issue Mar 5, 2024 · 3 comments · Fixed by #4056
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gkirtzou
Copy link

gkirtzou commented Mar 5, 2024

Bug Report

Describe the Bug

The policy model of Prohibition contains no connection with Duty as expected by the ODRL model.
Thus, when one creates a policy that within its prohibition has the relation odrl:remedy with a list of odrl:Duty, this information is ignored and is not stored within the db.

Expected Behavior

Being able to handle policies, such as the following one:

{
  "@context": {
    "edc": "https://w3id.org/edc/v0.0.1/ns/",
    "cc": "http://creativecommons.org/ns#",
    "dalicc": "https://dalicc.net/ns#",
    "dalicclib": "https://dalicc.net/licenselibrary/",
    "dcat": "http://www.w3.org/ns/dcat#",
    "dct": "http://purl.org/dc/terms/",
    "foaf": "http://xmlns.com/foaf/0.1/",
    "odrl": "http://www.w3.org/ns/odrl/2/",
    "osl": "http://opensource.org/licenses/",
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "scho": "http://schema.org/",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "edc:policy": {
    "@id": "dalicclib:Apache-2.0",
    "@type": "odrl:Set",
    "cc:jurisdiction": "dalicc:worldwide",
    "cc:legalcode": "http://www.apache.org/licenses/LICENSE-2.0",
    "cc:license": "dalicclib:CC-BY-4.0",
    "dct:alternative": [
      "Apache 2.0",
      "Apache License 2.0",
      "Apache License Version 2.0",
      "Apache Version 2.0",
      "A policy with remedy on Prohibition"
    ],
    "dct:publisher": "The Apache Software Foundation",
    "dct:source": "http://www.apache.org/licenses/LICENSE-2.0",
    "dct:title": {
      "@language": "en",
      "@value": "Apache License, Version 2.0"
    },
    "http://spdx.org/rdf/terms#licenseId": "Apache-2.0",
    "odrl:permission": [
      {
        "@type": "odrl:Permission",
        "odrl:action": {
          "@id": "odrl:display"
        }
      },
      {
        "@type": "odrl:Permission",
        "odrl:action": {
          "@id": "odrl:present"
        }
      },
      {
        "@type": "odrl:Permission",
        "odrl:action": {
          "@id": "odrl:reproduce"
        }
      },
      {
        "@type": "odrl:Permission",
        "odrl:action": {
          "@id": "cc:CommercialUse"
        }
      },
      {
        "@type": "odrl:Permission",
        "odrl:action": {
          "@id": "cc:DerivativeWorks"
        }
      },
      {
        "@type": "odrl:Permission",
        "odrl:action": {
          "@id": "dalicc:ModifiedWorks"
        }
      },
      {
        "@type": "odrl:Permission",
        "odrl:action": {
          "@id": "dalicc:chargeDistributionFee"
        }
      }
    ],
    "odrl:prohibition": [
      {
        "@type": "odrl:Prohibition",
        "odrl:action": {
          "@id": "dalicc:promote"
        }
      },
      {
        "@type": "odrl:Prohibition",
        "odrl:action": {
          "@id": "odrl:distribute"
        },
        "odrl:remedy": [
          {
            "@type": "odrl:Duty",
            "odrl:action": {
              "@id": "cc:Attribution"
            }
          },
          {
            "@type": "odrl:Duty",
            "odrl:action": {
              "@id": "cc:Notice"
            }
          }
        ]
      }
    ],
    "odrl:target": {
      "@type": "odrl:AssetCollection",
      "dct:type": [
        "dalicc:CreativeWork",
        "http://purl.org/dc/dcmitype/Dataset",
        "http://purl.org/dc/dcmitype/Software"
      ]
    },
    "dalicc:LiabilityLimitation": "In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.",
    "dalicc:WarrantyDisclaimer": "Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.",
    "dalicc:WarrantyOrLiabilityAcceptance": "While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.",
    "dalicc:validityType": "dalicc:perpetual"
  }
}

Observed Behavior

This is the prohibition created within the db:

  {
          "edctype": "Prohibition",
          "target": null,
          "action": {
              "type": "http://www.w3.org/ns/odrl/2/distribute",
              "includedIn": null,
              "constraint": null
          },
          "assignee": null,
          "assigner": null,
          "constraints": []
     }

Context Information

Tested on edc v0.3.1, but the problem is expected to be found in v0.5.1, as the Prohibition model hasn't change the last 10 months.
Prohibition class: https://github.com/eclipse-edc/Connector/blob/v0.3.1/spi/common/policy-model/src/main/java/org/eclipse/edc/policy/model/Prohibition.java

@github-actions github-actions bot added the triage all new issues awaiting classification label Mar 5, 2024
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale Open for x days with no activity label Mar 20, 2024
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale.

1 similar comment
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
@ndr-brt ndr-brt reopened this Mar 27, 2024
@ndr-brt ndr-brt self-assigned this Mar 27, 2024
@ndr-brt ndr-brt added this to the Milestone 15 milestone Mar 27, 2024
@ndr-brt ndr-brt added enhancement New feature or request and removed stale Open for x days with no activity triage all new issues awaiting classification labels Mar 27, 2024
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

Successfully merging a pull request may close this issue.

2 participants