Is it possible to test the policy-referring-connector-extension with my own connector-setup? #322
Unanswered
Julian-Marco
asked this question in
Q&A
Replies: 1 comment 3 replies
-
The "referring connector" policy does not validate any asset properties, as they are insecure and freely settable on the provider side. The "referring connector" policy validates a claim value in the DAT returned by the DAPS for the requesting connector. This requires you to have a DAPS, meaning, you need to have a fully secured and running data space. That means, there is currently no good way to integration test the extension in a local development environment with two connectors, unless you can set up a DAPS locally, set up DNS locally, that the DAPS needs, etc. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So far, I integrated the policy-referring-connector-module into my own EDC-repository (currently working on milestone-6 with a couple of other extensions). I'd like to test the extension locally by starting up two localhost-connectors on the ports 8181, 8182, 8282 and 9191, 9192, 9292 respectively. Both connectors contain the policy-referring-connector-module. My provider-connector receives the policy by curling its policydefinitions-endpoint:
curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" -d @policy/contractpolicy.json "http://localhost:8182/api/v1/data/policydefinitions"
The contractpolicy.json looks like this:
The contractoffer.json matches the policy accordingly (as it is needed anyway). I start the negotiation by using the following command:
curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" -d @policy/policy-01-contract-negotiation/contractoffer.json "http://localhost:9192/api/v1/data/contractnegotiations"
Unfortunately, no matter what value I insert here,
my consumer always receives the following error message:
DEBUG 2023-05-10T10:31:05.5155777 ContractRejectionHandler: Received contract rejection to message null. Negotiation process: 127dbd1e-ac64-4eb3-b9c1-894f0f142f40. Rejection Reason: "Policy use-restricted not fulfilled"^^http://www.w3.org/2001/XMLSchema#string
I was told that I'd need the basic connector url, so I tried it with http://localhost:9191, http://localhost:9192 and http://localhost:9292, but the outcome is always the same. The relevant part of the config.properties of the consumer looks like this:
From my understanding, the whole setup should work with localhost-connectors, but maybe I'm wrong here. Even then, would deploying and exposing the connectors help anyway? Or does it only work when using the whole sovity-setup in general?
Beta Was this translation helpful? Give feedback.
All reactions