agera-edc / DataSpaceConnector

DataspaceConnector project
Apache License 2.0
1 stars 0 forks source link

PolicyDefinition Is Created With Random ID #324

Closed Izzzu closed 2 years ago

Izzzu commented 2 years ago

Upstream issue https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/issues/1698

Bug Report

Describe the Bug

When creating a new policy using the DataManagementAPI (POST /policydefinitions), the policy is created with a random ID instead of the ID provided.

Expected Behavior

The ID provided in the payload should be used to create the policy definition.

Observed Behavior

A new random ID is generated, the ID provided in the payload is not used.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new policy using the /policydefinitions API and provide a policy ID in the payload.
  2. Get all policies using the /policydefinitions GET API.
  3. A new policy definition is created, which contains a different ID than the one provided in step 1.

Context Information

Tested using the EDC openAPI definition and Postman as well as via the MVD DataDashboard on MVD instance: http://mvd145-company1-mvd.northeurope.azurecontainer.io/.

Izzzu commented 2 years ago

Closing this bug as the issue was in the malformed payload that was sent from the UI to the EDC API.