hyperledger / aries-vcx

aries-vcx is set of crates to work with DIDs, DID Documents, DIDComm, Verifiable Credentials and Hyperledger Aries.
https://didcomm.org
Apache License 2.0
125 stars 83 forks source link

[AATH] AATH RFC0023 & RFC0793 Inconsistency #1252

Open gmulhearn opened 4 months ago

gmulhearn commented 4 months ago

The AATH results for RFC0023 & RFC0793 are inconsistent, there is likely a race condition going on where the agent is in the wrong state.

ACApy (Requester) <-> Aries-VCX (Responder)

0023

./manage run -d acapy-main -b aries-vcx -t @RFC0023 -t ~@wip

common errors:

    And "Bob" sends a response to "Acme"                                                             # features/steps/0023-did-exchange.py:383 0.013s
      Assertion Failed: resp_status 400 is not 200; Error: send_did_exchange_response >> Expected to find DidExchange request message in buffer, found nothing.

    When "Bob" sends a response to "Acme"                                                            # features/steps/0023-did-exchange.py:383 0.009s
      Assertion Failed: resp_status 500 is not 200; Error: AgentError: No object found with specified ID: Object did:sov:GX2YYyPmizh3eaZiPJpSJd not found in in-memory store out-of-band

    And "Acme" receives the response                                                                                          # features/steps/0023-did-exchange.py:430 2.605s
      Traceback (most recent call last):
        File "/usr/local/lib/python3.7/site-packages/behave/model.py", line 1329, in run
          match.run(runner.context)
        File "/usr/local/lib/python3.7/site-packages/behave/matchers.py", line 98, in run
          self.func(context, *args, **kwargs)
        File "features/steps/0023-did-exchange.py", line 440, in step_impl
          requester_url, "did-exchange", requester_connection_id, "completed"
      AssertionError

      Captured stdout:

0793

./manage run -d acapy-main -b aries-vcx -t @RFC0793 -t ~@wip

common errors:

      From http://0.0.0.0:9020 Expected state ['completed', 'N/A'] but received request-sent , with a response status of 200

Aries VCX (Requester) <-> ACApy (Responder)

0023

we don't really test for this, as aries-vcx cannot handle unqualified DIDs in invitations/DIDExchange DIDDoc attachments

0793

./manage run -d aries-vcx -b acapy-main -t @RFC0793 -t ~@wip

consistent results. low success due to supported DID methods

Aries VCX <-> Aries VCX

0023

consistently positive results, except for T005 which fails bcus:

2024-07-05 13:58:51 [2024-07-05T03:58:51Z ERROR aries_vcx_backchannel::controllers::didcomm] Error sending complete: AgentError { message: "GenericDidExchange; err: \"Error: Attachment has no JWS signature attached. Cannot verify.\\n\"", kind: GenericAriesVcxError }

(see #1245)

theories

I think there's something suspicious going on with timing across multiple tests, where sometimes the VCX backchannel will use the wrong connection.