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

Did-exchange threading / connection identification #784

Open
Patrik-Stas opened this issue Mar 12, 2024 · 2 comments
Open

Did-exchange threading / connection identification #784

Patrik-Stas opened this issue Mar 12, 2024 · 2 comments

Comments

@Patrik-Stas
Copy link
Contributor

When running did-exchange test
features/0023-did-exchange.feature:27 Establish a connection with DID Exchange between two agents with an explicit invitation with a public DID
(presumably others did-exchange test too, but didn't try)

AATH is making expectation that POST /agent/command/did-exchange/send-request returns

{ "connection_id": id }

whereas however, connection_id is in fact pthid of invitation (for invitee's side of protocol). Frankly I don't know if this is pattern commonly used in other suites too, but I intuitively I would expect thid to be identifier of an aries protocol (be it nested subprotocol).
Also worthy noting that on invitee's side of protocol, it's in fact thid which is used as protocol identifier - which I think further highlights the inconsistency.

@Patrik-Stas Patrik-Stas changed the title Did-exchange Did-exchange threading / connection identification Mar 12, 2024
@swcurran
Copy link
Contributor

I suspect this is an ACA-Py-ism. ACA-Py deals with connection_ids for connections, and from there finds the rest of the details. I’m not sure of where thids come in. I suspect other backchannels support this (the issue has not been raised before), but it seems that thid kind of does make sense. Not sure what the backchannels (or ACA-Py at least) would have to maintain in order to convert thid to connection_id — or if the POST could return both values.

@nodlesh — thoughts?

@nodlesh
Copy link
Contributor

nodlesh commented Mar 12, 2024

I believe we decided on using connection_id here for compatibility across all of the Aries Frameworks. A quick look at AFJ and AFGO reveals that they seem to always provide a connection id on the oob/receive-invitation. The step before the did-exchange/send-request. I'm not sure they return a thid, a pthid or equivalent.
That said, in the And "Acme" receives the invitation step the connection id is treated conditionally. That is, it is expected that it may not exist. I guess it is always provided because the next step (the one you reference above) uses the requesters connection_id unconditionally. Maybe there was to be a conditional statement there as well but was overlooked or determined it was not needed because no framework worked that way.
This was done a long time ago now, and a more compatible way to cover this across frameworks may have emerged since then. Some investigation would be required to determine that.

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

No branches or pull requests

3 participants