-
Notifications
You must be signed in to change notification settings - Fork 54
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
odrl:action "use" vs. "USE" #1048
Comments
question: could you try to test out 0.6.0 and verify if there's the same behavior? I tried to replicate it but I wasn't able, still getting a single (nit: the policy json is missing the |
Our project is planning to move on to the TractusX-EDC version 0.6.0 in a few weeks. When this has happened, I will this test again. And thx for hinting at the missing "@vocab" field. I will try that as well then. |
Maybe the author of the documentation (@arnoweiss) can help here. |
there's some ongoing work in that specific doc piece in #856 |
This issue is stale because it has been open for 4 weeks with no activity. |
The docs' payloads work. If you omit the About the issue itself: only |
Hi @arnoweiss , See here |
This issue is stale because it has been open for 4 weeks with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I can now officially confirm that on TX-EDC version 0.7.1, this is no longer an issue :) |
Describe the bug
According to the recently updated documentation it is now recommended to use lowercase letters when defining the "odrl:action" field within the request body of a policy definition.
https://github.com/eclipse-tractusx/tractusx-edc/blob/main/docs/usage/management-api-walkthrough/02_policies.md
I.e.
instead of
As far as I know, the previous way (using capital letters) was not in line with the odrl standard.
I am currently using the TractusX EDC Version 0.5.3. Until recently, I was creating Policy Definitions in with "USE" in capital letters.
Example:
Everything worked as expected, when "USE" was written in upper case letters.
Now I tried to switch to the lowercase syntax. But this change seems to cause troubles on the control plane.
Below, you can see the catalog item of an asset, that was registered and that references a contract policy, which was defined with the "use" keyword in lowercase:
You will notice, that the catalog entry contains the same policy definition twice. This does not happen, when my policy definition still was containing "USE" in upper case letter.
To Reproduce
Clone this project to your local system.
Then, please run
This branch is basically identical to the current main branch. It only contains some additional logging output.
Now, please follow the steps described in the https://github.com/eclipse-tractusx/puris/blob/main/local/INSTALL.md file
Please note that the docker build for the puris backend might take around 5 minutes, when running it for the very first time. Consecutive docker build should run considerably faster.
When you have completed all those steps, please visit http://localhost:3000 and trigger a data transfer. I.e. please select the "Stocks" tab on the left side. Then you shoud see a table named "Your Stocks" in the middle of the screen. Please click on the row containing the word "Semiconductor". It should be highlighted with orange color now. Then, please click on the "Update Partner Stocks" - button slightly below on the right.
Now please observe the logging output of the terminal window, where you exectuted the "docker compose up" command. When you scroll up, you should see an entry of a catalog item, containing a single policy.
Now, please use your favourite Java-IDE, open the puris project, you just cloned, and visit this file in the backend folder:
org.eclipse.tractusx.puris.backend.common.edc.logic.util.EdcRquestBodyBuilder.java
Now, please visit the buildFrameworkAgreementPolicy() - method. There is a line
Replace this line with
Repeat this for the buildBpnRestrictedPolicy(Partner partner) - method. I. e. replace "USE" with "use" there, too. (BTW: This is the policy defintion template, we are using as our access policy.)
Then, please
Now, if you repeat the steps described above for triggering "Update Partner Stocks", you should see in the logs, that the catalog entry contains a doubled policy.
Expected behavior
The control plane should not insert doubled policy data into the catalog entry.
Screenshots/Error Messages
See above
Context Information
See above
Possible Implementation
See above
The text was updated successfully, but these errors were encountered: