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

Extend the structure of how the IRS can handle Policies #249

Closed
2 tasks
jzbmw opened this issue Nov 2, 2023 · 4 comments
Closed
2 tasks

Extend the structure of how the IRS can handle Policies #249

jzbmw opened this issue Nov 2, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request linked_to_feature Issue is linked to a feature policy_store Issues regarding the IRS policy store. spill_over Issues which are not finished yet

Comments

@jzbmw
Copy link
Contributor

jzbmw commented Nov 2, 2023

As IRS Consumer,
I want to add policies the same way as EDC handles those ,
so that there is no structural change within the overall architecture of where the Services acts.

LOP

  • @jzbmw should we use json-ld as the EDC uses that. This might increase the complexity. Odrl: Prefix would not be used if we do not use json-ld . Alternative, we could use the term odrl:action as a string attribute and ignoring the namespace :odrl

Hints / Details

Example:

{
	info: xy,
	ttl: xx,
	policy_use_for_use_case:[xys,ggg,ggg,]
	payload  {
		...policy payload... as it is  
	}
}

Example:

{
  "@context": {
      "odrl": http://www.w3.org/ns/odrl/2/
  },
  "@type": "PolicyDefinitionRequestDto",
  "@id": "ap-bpn-and-up-member-trace-idtrace-up",
  "policy": {
      "@type": "Policy",
      "odrl:permission": [
          {
              "odrl:action": "USE",
              "odrl:constraint": {
                  "@type": "LogicalConstraint",
                  "odrl:and": [
                      {
                          "@type": "Constraint",
                          "odrl:leftOperand": "Membership",
                          "odrl:operator": {
                              "@id": "odrl:eq"
                          },
                          "odrl:rightOperand": "active"
                      },
                      {
                          "@type": "Constraint",
                          "odrl:leftOperand": "FrameworkAgreement.traceability",
                          "odrl:operator": {
                              "@id": "odrl:eq"
                          },
                         "odrl:rightOperand": "active"
                      },
                      {
                          "@type": "Constraint",
                          "odrl:leftOperand": "PURPOSE",
                          "odrl:operator": {
                             "@id": "odrl:eq"
                          },
                          "odrl:rightOperand": "ID 3.1 Trace"
                      }
                  ]
              }
          }
      ]
  }
} 

Outcome / Acceptance Criteria

Outcome

  • ...

Acceptance Criteria

  • EDC policy schema is used for importing policies into Policy store
  • it shall be additionally possible to add a policy in the schema described above

Out of Scope

  • ...
@jzbmw jzbmw added this to IRS Nov 2, 2023
@jzbmw jzbmw moved this to inbox in IRS Nov 2, 2023
@jzbmw jzbmw added the enhancement New feature or request label Nov 2, 2023
@jzbmw jzbmw added the policy_store Issues regarding the IRS policy store. label Nov 27, 2023
@mkanal mkanal added the DISCUSSION_NEEDED This ticket needs discussion within teammembers label Dec 14, 2023
@jzbmw
Copy link
Contributor Author

jzbmw commented Dec 20, 2023

built uppon json-ld

@jzbmw jzbmw moved this from inbox to backlog in IRS Dec 20, 2023
@jzbmw jzbmw removed the DISCUSSION_NEEDED This ticket needs discussion within teammembers label Dec 20, 2023
@mkanal mkanal moved this from backlog to next in IRS Jan 9, 2024
@mkanal mkanal moved this from next to wip in IRS Jan 11, 2024
@mkanal mkanal self-assigned this Jan 11, 2024
@mkanal mkanal moved this from wip to next in IRS Jan 11, 2024
@mkanal mkanal assigned dsmf and unassigned dsmf and mkanal Jan 11, 2024
@mkanal mkanal added the linked_to_feature Issue is linked to a feature label Jan 15, 2024
@ds-psosnowski ds-psosnowski self-assigned this Jan 16, 2024
@ds-psosnowski ds-psosnowski moved this from next to wip in IRS Jan 16, 2024
@jzbmw jzbmw added the spill_over Issues which are not finished yet label Jan 22, 2024
@ds-psosnowski ds-psosnowski moved this from wip to review in IRS Jan 31, 2024
@ds-psosnowski
Copy link
Contributor

@ds-alexander-bulgakov ready for QA

@ds-alexander-bulgakov ds-alexander-bulgakov self-assigned this Feb 1, 2024
@ds-alexander-bulgakov
Copy link
Contributor

ds-alexander-bulgakov commented Feb 5, 2024

@ds-psosnowski as already discussed could you please adjust the insomnia-collection with new JSON-body for the POST-Request?
Creation and update of policy with new structure is working as expected. IRS-jobs are can be requested and are working as expected with new created policy. Tested with creation of this policy:
{ "validUntil": "2025-02-06T23:59:59.999Z", "payload": { "@context": { "odrl": "http://www.w3.org/ns/odrl/2/" }, "@id": "policy-test-AB_2", "policy": { "odrl:permission": [ { "odrl:action": "USE", "odrl:constraint": { "odrl:and": [ { "odrl:leftOperand": "PURPOSE", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "ID 3.0 Trace" }, { "odrl:leftOperand": "PURPOSE", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "ID 3.1 Trace" }, { "odrl:leftOperand": "PURPOSE", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "R2_Traceability" }, { "odrl:leftOperand": "PURPOSE", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "active" }, { "odrl:leftOperand": "Membership", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "active" } ], "odrl:or": [ { "odrl:leftOperand": "Membership", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "active" }, { "odrl:leftOperand": "PURPOSE", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "ID 3.0 Trace" }, { "odrl:leftOperand": "PURPOSE", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "R2_Traceability" }, { "odrl:leftOperand": "PURPOSE", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "ID 3.1 Trace" }, { "odrl:leftOperand": "FrameworkAgreement.traceability", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "active" } ] } } ] } } }
The createdOn information for created police is not given however. Could you please check this as well?
Thank you!

@jzbmw jzbmw moved this from review to done in IRS Feb 5, 2024
@jzbmw jzbmw closed this as completed Feb 5, 2024
@ds-alexander-bulgakov
Copy link
Contributor

Insomnia collection has been extended and previously described issue with missing createdOn has been fixed, see e.g.:
image
Ticket is done and was accepted in PO-review already.

@ds-alexander-bulgakov ds-alexander-bulgakov removed their assignment Feb 6, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
…structure

feat(irs):[#249] extend policies structure
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 7, 2024
…structure

Feature/#249 policy controller enchancements
ds-jhartmann pushed a commit that referenced this issue Apr 15, 2024
- fix Get all policies
- add Get policies for BPN
- fix Create policy body ("payload" with single policy instead of array named "policies"), see #249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request linked_to_feature Issue is linked to a feature policy_store Issues regarding the IRS policy store. spill_over Issues which are not finished yet
Projects
Status: done
Development

No branches or pull requests

5 participants