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

Incorrect values in negotiation object #400

Closed
4 tasks done
juliapampus opened this issue Dec 10, 2021 · 2 comments · Fixed by #666
Closed
4 tasks done

Incorrect values in negotiation object #400

juliapampus opened this issue Dec 10, 2021 · 2 comments · Fixed by #666
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@juliapampus
Copy link
Contributor

juliapampus commented Dec 10, 2021

Running sample 4 and taking a look at the negotiation output, I just noticed some incorrect values. Maybe due to an error, or missing value settings that should be fixed in the core implementation. Or just due to the sample setup - then this can be ignored. Comments welcome.

A sample negotiation object, performing a request on GET /api/control/negotiation/{id}, could look as follows:

{
    "id": "44c86ae0-0b6e-412d-b75a-71a349c74275",
    "correlationId": null,
    "counterPartyId": "consumer",
    "counterPartyAddress": "http://localhost:8181/api/ids/multipart",
    "protocol": "ids-multipart",
    "type": "CONSUMER",
    "state": 1200,
    "stateCount": 1,
    "stateTimestamp": 1639144360995,
    "errorDetail": null,
    "contractAgreement": {
        "id": "1:239ae091-ba03-4c48-a11c-38ddf957e9c1",
        "providerAgentId": "null",
        "consumerAgentId": "null",
        "contractSigningDate": 0,
        "contractStartDate": 0,
        "contractEndDate": 0,
        "asset": {
            "properties": {
                "asset:prop:id": "urn:artifact:test-document"
            }
        },
        "policy": {
            "uid": "fd8549d1-c29c-4388-b5f9-904555f04ebb",
            "permissions": [
                {
                    "edctype": "dataspaceconnector:permission",
                    "uid": null,
                    "target": "test-document",
                    "action": {
                        "type": "USE",
                        "includedIn": null,
                        "constraint": null
                    },
                    "assignee": null,
                    "assigner": null,
                    "constraints": [],
                    "duties": []
                }
            ],
            "prohibitions": [],
            "obligations": [],
            "extensibleProperties": {},
            "inheritsFrom": null,
            "assigner": null,
            "assignee": null,
            "target": null,
            "@type": {
                "@policytype": "set"
            }
        }
    },
...
  • CorrelationId should not be null as the negotiation process already exists on the other connector's side.
  • Why is the counterPartyId's value consumer as the negotiation object is requested on the consumer side? It seems that something goes wrong here.
  • The providerAgentId and consumerAgentId in the ContractAgreement should be filled. I assume this is because the contract offer in the sample is filled with null values. Maybe we should add a method that checks for essential attributes and creates them during the negotiation process if missing.
  • Signing policies during contract negotiation process #667
@mspiekermann mspiekermann mentioned this issue Jan 7, 2022
15 tasks
@mspiekermann mspiekermann added this to the Milestone 2 milestone Jan 7, 2022
@DominikPinsel DominikPinsel added the good first issue Good for newcomers label Jan 24, 2022
@juliapampus
Copy link
Contributor Author

juliapampus commented Feb 8, 2022

CorrelationId should not be null as the negotiation process already exists on the other connector's side.

Currently, the correlationId is null on consumer side on purpose. If the consumer initiates the negotiation, it is sufficient that the provider knows both IDs.

@juliapampus juliapampus self-assigned this Feb 8, 2022
@juliapampus
Copy link
Contributor Author

Why is the counterPartyId's value consumer as the negotiation object is requested on the consumer side? It seems that something goes wrong here.

This was a hardcoded (and misunderstood) value. Changed the samples 4.0 accordingly.

The providerAgentId and consumerAgentId in the ContractAgreement should be filled. I assume this is because the contract offer in the sample is filled with null values. Maybe we should add a method that checks for essential attributes and creates them during the negotiation process if missing.

The providerAgentId and consumerAgentId are no ids values. There is no need for a connector to validate values that have been created by itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants