aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

:bug: Receiving a public did connection invitation with `auto_accept=True` does not override system default

Open ff137 opened this issue 2 years ago • 1 comments

Scenario:

  • we have 2 tenants created on a multitenant agent
  • both agents have a published, public did
  • agent 1 creates invitation with use_public_did = True, and auto_accept = True
  • agent 2 receives invitation with auto_accept = True

If the system config has ACAPY_AUTO_ACCEPT_REQUESTS=false, then the auto_accept flag in the above receive request does not override this system default. We can confirm this by inspecting the latest webhook associated with the receive invitation:

{'state': 'request', 'created_at': .., 'my_did': 'XodUpzUzRFD9kvYpLyDPu', 'their_did': 'X5bQUzTsC4hGtvu56p9mS5', 'their_label': 'Test2', 'their_role': 'inviter', 'connection_protocol': 'connections/1.0', 'rfc23_state': 'request-sent', ... 'accept': 'manual', 'invitation_mode': 'once'}

Note the: 'accept': 'manual' at the end. This causes the connection to not complete, as would be expected with auto_accept.

Running the same scenario above again with only changing use_public_did=False, or only changing ACAPY_AUTO_ACCEPT_REQUESTS=true, then it works as expected: the connection completes with 'accept': 'auto' and 'state': 'active' (as reported in webhooks).

In summary: when the default env config is set to not auto accept requests, and a public did connection invite is being received with auto_accept, then this auto_accept argument does not override the system default as it should.

This bug does not occur for connection invites where use_public_did=False.

ACA-Py version: 0.11.0

ff137 avatar Dec 04 '23 15:12 ff137

@ff137 Hello, I did not apply the auto-accept for the receiver. So, I do not know how receiver receive the invitation request because in v0.12.1 does not have a receiving request like older version. Or we need to apply webhook to receiver's side to receive the invitation request?

darapich92 avatar Jun 08 '24 04:06 darapich92