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

Align the implementation of the DIDCommV2 protocol in cloud and edge agents (body property must be optional) #115

Open
yshyn-iohk opened this issue Jan 27, 2025 · 1 comment
Assignees

Comments

@yshyn-iohk
Copy link
Member

yshyn-iohk commented Jan 27, 2025

UPDATE:

  1. Follow the specification recommendation for thebodyproperty: to be fully compatible with DIDComm v2.0. It’s recommended always to have this attribute when sending a message, but allow the attribute not to exist when receiving.
  2. Alight the internal properties of the body between the cloud agent and edge agents for each DIDCommV2 protocol and each message.

In the current implementation (Identus 2.14+), the body property of the messages is not optional.
It caused the inconsistencies and compatibility issues between the agents (cloud and edge)

An example of the issue is the body property in the issue-credential record.
In the cloud agent 1.40.0 the body was

{
  body: {
    comment: null,
    goad_code: null,
    more_available: null,
    replacement_id: null
  }
}

formats property was absent at all, but the edge agent TS tries to parse it as well

After refactoring the cloud-agent (circle json library was replaced with zio-json in this and this commits)

After cloud-agent 1.40.0, the body property became empty. No information is transmitted from the cloud to the edge agent:

{
  body: {}
}

At the same time, the body property is optional in the DIDCommV2 specification, and properties goal_code and replacement_id are optional as well:

body - OPTIONAL. The body attribute contains all the data and structure uniquely defined for the schema associated with the type attribute. If present, it MUST be a JSON object that conforms to [RFC 7159](https://datatracker.ietf.org/doc/html/rfc7159).

So, the cloud and edge agent must treat the body property according to the spec.

@yshyn-iohk
Copy link
Member Author

Example of the message in the cloud-agent 1.40.0

Image

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

No branches or pull requests

4 participants