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

[DPP] [BUG] EDC 0.7.3 incompatibility because of "@id" policy definition #380

Closed
matbmoser opened this issue Jul 17, 2024 · 2 comments · Fixed by #382
Closed

[DPP] [BUG] EDC 0.7.3 incompatibility because of "@id" policy definition #380

matbmoser opened this issue Jul 17, 2024 · 2 comments · Fixed by #382
Assignees
Labels
bug Something isn't working
Milestone

Comments

@matbmoser
Copy link
Contributor

Current Behavior

When the catalog is called in the new EDC 0.7.3 the policies are configured in a different way as mentioned in this ticket:
eclipse-edc/Connector#4179

This affects our digital product pass policy parsing logic.

Expected Behavior

Change the structure of the backend and frontend to support only DID Documents, with the "@id" at the left operand.

Fix in frontend here, to get the value by "@id":

// Parse the left operand
let rawLeftOperand = jsonUtil.get("odrl:leftOperand", constraint, ".", null);
leftOperand = rawLeftOperand;
// If is not a string convert the object or array to string
if (typeof rawLeftOperand !== "string") {
leftOperand = jsonUtil.toJsonString(rawLeftOperand)
}

Fix in the backend here, to parse as DidDocument like the operator:

/** ATTRIBUTES **/
@JsonProperty("odrl:leftOperand")
@JsonAlias({"leftOperand","odrl:leftOperand"})
String leftOperand;

@matbmoser matbmoser added the bug Something isn't working label Jul 17, 2024
@matbmoser matbmoser added this to the v4.0.0 milestone Jul 17, 2024
@matbmoser matbmoser self-assigned this Jul 17, 2024
@matbmoser
Copy link
Contributor Author

I believe I have solved the problem ;)

@matbmoser
Copy link
Contributor Author

image

Will be included in v4.0.0-rc2

@saudkhan116 saudkhan116 linked a pull request Jul 17, 2024 that will close this issue
@saudkhan116 saudkhan116 modified the milestones: v4.0.0-rc1, v4.0.0-rc2 Jul 19, 2024
@github-project-automation github-project-automation bot moved this from Planning to Done in Digital Product Pass Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants