openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
412 stars 512 forks source link

Presentation ack not coming in AIP 1.0 Connectionless verification #2361

Closed dheerajbudhiraja closed 10 months ago

dheerajbudhiraja commented 1 year ago

@TimoGlastra - I see we are retuning if there is no connection or job record from Ace-Py side:

https://github.com/hyperledger/aries-cloudagent-python/blob/main/aries_cloudagent/protocols/present_proof/v1_0/manager.py#L487C23-L487C23

On AFJ side - Http outbound transport send message --> fetch request is aborting after 15secs timeout and No presentation ack its received.

https://github.com/hyperledger/aries-framework-javascript/blob/main/packages/core/src/transport/HttpOutboundTransport.ts#L52

Is this expected behaviour?

Can we send presentation ack based on "~service" decorator that we are appending in presentation from ACA-py side?

swcurran commented 10 months ago

This is the expected behaviour. When connectionless is used, the holder may not provide information for the verifier to respond. Since there is no DIDComm connection, it is assumed there is some other mechanism (eg. browser session) to notify the holder entity that if the presentation was accepted or failed.

TimoGlastra commented 10 months ago

This is the expected behaviour

I wouldn't necessarily say it's expected. In AFJ we support sending/receiving the presentation message in connectionless exchanges, and I think ACA-Py also supports it for v2 of the protocol.

dheerajbudhiraja commented 10 months ago

@swcurran - We have service-endpoint to tell other party that where to send reply. Like Holder knows where to send presentation proof using this, Issuer can also use this to send back acknowledgement without going through complete 4 step connection process.

But the main problem is here we are not even sending 200 OK response on http session, resulting into HTTP Abort error on AFJ side.

@TimoGlastra - Problem here we are facing in react native environment (using AFJ), while issuer is Aca-Py, there is no way to know when to reliably when to update mobile screens. HttpOutbound waits for 15 secs then goes to catch block logging:

'Request was aborted due to timeout. Not throwing error due to return routing on sent message'

If Aca-Py had sent even 200 Ok on http session, then AFJ Http Outbound doesn't have to unnecessarily wait for 15 secs.

TimoGlastra commented 10 months ago

Which version of ACA-Py are you using? Since 0.8.0 it should close the socket on the server side if there is no response: https://github.com/hyperledger/aries-cloudagent-python/pull/1853

dheerajbudhiraja commented 10 months ago

Which version of ACA-Py are you using? Since 0.8.0 it should close the socket on the server side if there is no response: #1853

Ok, We were still using 0.7.4 version planning to migrate soon to latest version directly, I looked at code of latest ACA-Py but it seemed same, so I raised issue, I will test once on latest code. Thanks!

swcurran commented 10 months ago

Thanks @TimoGlastra. Sorry for the bad info, @dheerajbudhiraja