How to properly bind Policy Functions to a scope? #4750
Unanswered
Patrick-Pr
asked this question in
Q&A
Replies: 1 comment 2 replies
-
From a quick look i think you forgot to register the ruleBindingRegistry.bind(ODRL_USE_ACTION_ATTRIBUTE, ALL_SCOPES); as the pointed example |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
I have a question about the binding of a function which should enforce a policy to a scope.
I used the sample which can be found here as reference. Which is a bit out of date because a method and constant used are deprecated in 0.10.1 but I hoped that the methodology would still be the way to go.
Now to my issue I wrote a ServiceExtension which binds a key
https://w3id.org/edc/v0.0.1/ns/something
to thecontract.negotiation
scope and a function under the same key also to the previous mentioned scope.I can clearly see the info log with the message
Initializing PolicyFunctionsExtension!!!
therefore my assumption is that the key and function should be bound.To test this I send a request to the consumer
http://localhost:29193/management/v3/contractnegotiations
which is looking like thisIn following this I can see in the logs the negotiation process happening but there are no signs of the function I thought I bound earlier. Furthermore if I try to debug into the checking function the debugger does not pause which tells me that it is not called.
Following a snippet of the log
I also checked the
leftOperand
which value looks like thishttps://w3id.org/edc/v0.0.1/ns/something
from my understanding the key I should use during the binding have to match the value of theleftOperand
.I am currently a bit clueless on which mistake I could have made during the binding or what information on the process I am missing.
I hope you can shed some light on this for me.
Than you in advance.
Beta Was this translation helpful? Give feedback.
All reactions