1
{
    "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation",
    "@id": "562f4181-2109-49a9-af68-e5b3b201b292",
    "label": "Faber.Agent",
    "recipientKeys": [
      "FF2a8JnqXaTB7iwFVRajEsDf1wPE6dG2NkXGXWTaXWcC"
    ],
    "serviceEndpoint": "http://127.0.0.1:3333"
}

Above we have a invitation example and there is section marked serviceEndpoint.

Assuming this RFC is processed correctly is a POST request with the Encrypted data send to http://127.0.0.1:3333?

Basically I'm going through the Swagged example, and even the Aries documentation and I don't understand how data is SENT when the Aries RFC is processed.

2 Answers2

0

The serviceEndpoint is used to describe the service that can be used to exchange messages with the intended receiver. In the given (Aries) request, it is basically specifying the endpoint that you can use to exchange messages with this particular connection (but doesn't necessarily be the actual agent that you are trying to exchange with). How you are connecting, depends on the underlying protocol you are using, which is identified by the URI scheme of the serviceEndpoint property (here its http).

Yes, and the request is sent encrypted by your agent to the endpoint mentioned (using their public key), in simple terms.

shonjs
  • 256
  • 1
  • 6
  • This is not about the complicated encryption part. Assume I understand that. What I want to know is DUMB post request info. I can move my messages between my system but not others cause the post request keep failing. – Some Guy Trying To Do Math May 22 '20 at 13:33
  • Assuming that you mean a different machine by other system, your serviceEndpoint should be reachable by the other party in the communication, and vice versa. If it is localhost, like given in your request, it will only be available from your system. – shonjs May 22 '20 at 13:45
  • I can replace the URL with a remote server that I control, and it's the same problem In the example I'm testing it's the the Faber and Alice docker test. What I need is simple documentation on the POST process, what needs to be returned for it to be successful etc. – Some Guy Trying To Do Math May 22 '20 at 13:49
  • Ask specific question for the answer that you are seeking. Please check if [this documentation helps you](https://github.com/hyperledger/aries-cloudagent-python/blob/master/demo/AriesOpenAPIDemo.md) – shonjs May 22 '20 at 13:56
0

Aries using a bunch of non standard things when doing Post Requests you need to consider.

At the time of writing Aries uses a format called "Agent Wire Messages", currently Agent Wire Messages is just JSON, but has a different header in the post request, labeled as "application/ssi-agent-wire"

If you are using node express you need to assign a custom JSON handler (Note in future this may no longer work when additional features are added) which can be accomplished by adding...

app.use(bodyParser.json({ type: 'application/ssi-agent-wire' }));

to your Express App (Note, this may not be compatible when newer Agent Wire standards are added, please refer to the date of the post.