Skip to content

Latest commit

 

History

History
65 lines (54 loc) · 3.8 KB

didcomm_mediator.md

File metadata and controls

65 lines (54 loc) · 3.8 KB

Aries DIDComm Router/Mediator

The aries-framework-go project can be used as a DIDComm Router/Mediator. The agents that do not have inbound transport can register with the router. Basically, the agent asks another agent to route the messages to it by asking for permission. On successful grant, agent receives the endpoint and routing key details. These details are used in DID Exchange Invitation or DID Document Service Descriptor.

Mediator Setup

To set up the project as a mediator, configure WebSocket for inbound and outbound communication.

sdk

// add http inbound and outbound
opts = append(opts, http_inbound, http_outbound))

// add websocket inbound and outbound
inbound, err := ws.NewInbound(...)
if err != nil {
	return err
}

opts = append(opts, aries.WithInboundTransport(inbound), aries.WithOutboundTransports(ws.NewOutbound()))
framework := aries.New(aries.WithInboundTransport(inbound), aries.WithOutboundTransports(ws.NewOutbound()))

rest/docker

- ARIESD_INBOUND_HOST=http@$<http_internal>,ws@$<ws_internal>
- ARIESD_INBOUND_HOST_EXTERNAL=http@$<http_extenal_url>,ws@$<ws_extenal_url>
- ARIESD_OUTBOUND_TRANSPORT=http,ws

Edge Agents without Inbound Capability

The project supports DIDComm between two agents without inbound capability through a router. The framework needs to be initialized with Transport Return route options.

sdk

// create the framework with Transport return route and websocket outbound
framework := aries.New(aries.WithTransportReturnRoute("all"), aries.WithOutboundTransports(ws.NewOutbound())

rest/docker

- ARIESD_TRANSPORT_RETURN_ROUTE=all
- ARIESD_OUTBOUND_TRANSPORT=ws

Limitations

Currently, framework supports limited set of features.

  1. Supports only all transport route option.
  2. Supports only websocket for duplex communication. ie, websocket needs to be used as the Outbound transport while initializing the framework for agents without inbound capabilities.
  3. Aries RFC 0211: Mediator Coordination Protocol : No support for Key List Query and Key List messages - Issue #942.
  4. Aries RFC 0094: Forward Message : Uses recipient key in the to field instead of DID keyid - Issue #965.
  5. Aries RFC 0212: Pickup Protocol : No support for Message Query With Message Id List message - Issue #2351.

References