Custom Policy Evaluation Function Not Triggered in EDC MVD Setup #489
Unanswered
Zhipeng-lin1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm experimenting with how
PolicyEnforcement
works in EDC (using the MVD base project) by creating a custom policy evaluation function tied to a new constraint (ParticipantCredential
). Here's a breakdown of what I’ve done:🔧 Modifications in
PolicyEvaluationExtension.java
I removed unnecessary default bindings and replaced them with my own:
🧩 Adjustments in DcpPatchExtension.java
I registered my trusted issuers and set the default scope mapping:
🧠 Custom Evaluation Function
I implemented a custom evaluation function as follows:
📜 Verifiable Credential (VC) Sample
Here's an example of the ParticipantCredential I used:
❗ Problem
After defining assets, a policy, and a contract definition using this constraint key, the evaluation function is never triggered. I confirmed this by running the project locally in IntelliJ with breakpoints.
Assets:
Policy:
Contract Definition:
Even when the consumer does not have the ParticipantCredential VC seeded into the Identity Hub, the asset still appears in the catalog and no evaluation occurs.
Questions
Beta Was this translation helpful? Give feedback.
All reactions