-
Notifications
You must be signed in to change notification settings - Fork 515
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
Missing fields from connection record in aca-py version 0.8.1 #2217
Comments
Is this an issuer/verifier ACA-Py instance or a Mediator? |
Other questions:
Thanks! |
@swcurran , this is the BC Wallet connecting to the Person Credential issuer in the custom flow. The IDIM DID is embedded in the BC Wallet... Pre-requisites
Steps to reproduce
Expected behaviour Actual behaviour
Notes: |
@swcurran , some clarification... for each IDIM environment, a multi-use invitation was created, and provided to the BC Wallet team. Each invitation is embedded in the BC Wallet source code. |
Thanks — that helps. @cvarjao — what protocol is BC Wallet using to establish the connection? Is it 0160 Connections or 0023 DID Exchange? Just to confirm @marcos-carretero — the IDIM environment created an invitation? It did not just provide a public DID? The setting that Wade talked about above ( In either case, the message from the Wallet to the IDIM issuer should be a Thanks |
Yes. the invitations were created manually. e.g. I'm wondering if the invitation needs to be regenerated since the upgrade to 0.8.1 |
@swcurran , I think it supports both, but I am not sure. |
@swcurran , the impact is that this is delaying our upgrade from acapy 0.7.x to 0.8.1, which we understand is required for revocation to work correctly. |
Shouldn’t be needed unless the data for the IDIM agent was reset — I assume it was not. |
@swcurran, Correct, it was not reset. |
I have confirmed that with a new invitation, that IDIM Dev Acapy receives |
That’s interesting. That seems very odd…. So the workaround is to get that new invitation into the BC Wallet. But we still have to understand why the old invitation doesn’t work. Can we query the IDIM issuer to make sure that the old invitation is still there? |
@swcurran , I don't see a way to query invitations in the API docs. Is that something @WadeBarnes can do on the back end? |
Someone with access to the Swagger API for the instance might be able to query the connections to see if the old multi-use invitation still exists. If you notice, in the ACA_Py 0.7.4 example, the connection state is When you got it working with the new invitation, was the I’m also kind of interested in what the |
I’m not sure exactly what was different in the two examples in the first submission, but I tested out using a multi-use invite and if the same invite is used, the |
@swcurran , the examples are from two different issuer environments (DEV, and SIT), but the same wallet instance. The BC Wallet has 3 invitations coded into https://github.com/bcgov/bc-wallet-mobile/blob/main/app/src/store.tsx. I have access to the Swagger API console for all 3 environments, and believe that this is the corresponding invitation that is not working: |
Further, the reason the SIT connection is active and the DEV connection is not, is because the SIT connection has |
@WadeBarnes — Why was the change made to set the That might not be the problem — but could you please restart the instance without that flag set and see if it fixes the issue? |
The The issue existed prior to the change to that flag, but only since the upgrade. |
@marcos-carretero and myself just went through a round of troubleshooting. testing was done against the We identified a difference in the sequence of webhooks returned by ACA-Py to the controller: in particular the agent running on Webhook sequence for 0.7.4// 26 Apr 2023 14:17:50,500 [TRACE] https-openssl-nio-142.34.250.80-4102-exec-56 ca.bc.gov.idim.aries.api.AriesWebhooks - receiveMessage /connections:
{
"routing_state": "none",
"created_at": "2023-04-26T21:17:50.280016Z",
"invitation_key": "ChJbCM5YJS1oxSAMV5MocRypMmQZtxQjpoJXFiLvg1C9",
"invitation_mode": "once",
"connection_id": "a1fd3cad-e525-4036-a1ec-201cb4652767",
"rfc23_state": "invitation-sent",
"their_role": "invitee",
"connection_protocol": "connections/1.0",
"updated_at": "2023-04-26T21:17:50.280016Z",
"my_did": "9gcezmb3XJGoXLHqKzNK9p",
"state": "invitation",
"accept": "manual"
}
// 26 Apr 2023 14:17:50,502 [TRACE] https-openssl-nio-142.34.250.81-4102-exec-9 ca.bc.gov.idim.aries.api.AriesWebhooks - receiveMessage /connections:
{
"routing_state": "none",
"created_at": "2023-04-26T21:17:50.280016Z",
"their_did": "5TH1fkUtoKysW7bdP8o4Pd",
"invitation_key": "ChJbCM5YJS1oxSAMV5MocRypMmQZtxQjpoJXFiLvg1C9",
"their_label": "BC Wallet",
"invitation_mode": "once",
"connection_id": "a1fd3cad-e525-4036-a1ec-201cb4652767",
"rfc23_state": "request-received",
"their_role": "invitee",
"connection_protocol": "connections/1.0",
"updated_at": "2023-04-26T21:17:50.396601Z",
"my_did": "9gcezmb3XJGoXLHqKzNK9p",
"state": "request",
"accept": "manual"
}
// 26 Apr 2023 14:17:50,929 [TRACE] https-openssl-nio-142.34.250.81-4102-exec-12 ca.bc.gov.idim.aries.api.AriesWebhooks - receiveMessage /connections:
{
"routing_state": "none",
"created_at": "2023-04-26T21:17:50.280016Z",
"their_did": "5TH1fkUtoKysW7bdP8o4Pd",
"invitation_key": "ChJbCM5YJS1oxSAMV5MocRypMmQZtxQjpoJXFiLvg1C9",
"their_label": "BC Wallet",
"invitation_mode": "once",
"connection_id": "a1fd3cad-e525-4036-a1ec-201cb4652767",
"rfc23_state": "response-sent",
"their_role": "invitee",
"connection_protocol": "connections/1.0",
"updated_at": "2023-04-26T21:17:50.894927Z",
"my_did": "9gcezmb3XJGoXLHqKzNK9p",
"state": "response",
"accept": "manual"
}
// 26 Apr 2023 14:17:51,375 [TRACE] https-openssl-nio-142.34.250.80-4102-exec-59 ca.bc.gov.idim.aries.api.AriesWebhooks - receiveMessage /connections:
{
"routing_state": "none",
"created_at": "2023-04-26T21:17:50.280016Z",
"their_did": "5TH1fkUtoKysW7bdP8o4Pd",
"invitation_key": "ChJbCM5YJS1oxSAMV5MocRypMmQZtxQjpoJXFiLvg1C9",
"their_label": "BC Wallet",
"invitation_mode": "once",
"connection_id": "a1fd3cad-e525-4036-a1ec-201cb4652767",
"rfc23_state": "completed",
"their_role": "invitee",
"connection_protocol": "connections/1.0",
"updated_at": "2023-04-26T21:17:51.332508Z",
"my_did": "9gcezmb3XJGoXLHqKzNK9p",
"state": "active",
"accept": "manual"
} Webhook sequence for 0.8.1// 26 Apr 2023 14:24:03,121 [TRACE] https-openssl-nio-142.34.250.80-2102-exec-91 ca.bc.gov.idim.aries.api.AriesWebhooks - receiveMessage /connections:
{
"state": "request",
"updated_at": "2023-04-26T21:24:02.977672Z",
"connection_protocol": "connections/1.0",
"created_at": "2023-04-26T21:24:02.977672Z",
"my_did": "8LSJyVUy9yB9nWpj7Up62g",
"accept": "manual",
"invitation_key": "2eHpQFonMEhmzoaeEmALKWqdqyRWYfA6LQyjJJtgb2WT",
"routing_state": "none",
"rfc23_state": "request-received",
"their_role": "invitee",
"invitation_mode": "once",
"connection_id": "7c0a270a-fb2f-48c2-8ed8-31789fad7e10"
} I am now trying to narrow down where/what is the root cause for the difference in behaviour, however the question of whether |
@esune , I've confirmed that we discard the |
It looks like #2099 changed the state of the first webhook fired when a connection invitation is responded to: this caused a webhook with The current state seems incorrect to me, as there is no easy way to follow the state-machine and determine which webhook is being received unless ALL of them have been received and kept track of. We could revert that change, but that would cause the bug that the fix was intended for to show up again: I am going to look at how we can distinguish between the connection created for a multi-use invitation (should a connection even be created?) and the ACTUAL connection being instantiated at the time of response by the invitee. |
Tagging @reflectivedevelopment in the thread as he is the one who discovered the issue leading to the creation of #2099. |
@reflectivedevelopment — you can see the impact of the #2099 change in the web hook logging in this issue comment (expand the hidden text to see the logs). Basically, what used to be a web hook with state “invitation” now has the state “request”, does not include certain fields our controller is looking for ( The easy fix on the controller side is to differentiate between the first and second web hook events (by detecting in the first that some fields are missing), treating the event in the same way as the previously handled “invitation” event — since it is the same event. However, we were wondering if there should be an update to ACA-Py so as to accomplish the goal of #2099 without the side effect that has been created? We’re not sure another way is needed, but given your knowledge of the problem, we wanted to show you the side effect created by #2099 and get your thoughts on if a “fix” should be in ACA-Py or in the controller? Thanks |
Perhaps the fix would not be to emit a new event on 488. I'm not sure it makes sense to emit an event here when accepting a multi use invitation. We aren't creating a new invitation, we are simply cloning the invitation for continue code re-use here. So maybe something like this? Added the event=false ? I haven't tested the following change.
|
I think the proposal by @reflectivedevelopment makes sense, and results in a pretty clean solution overall - skimming quickly through the code I did not realize the event handler could be muted explicitly. Will open a PR with the fix shortly. |
Closed by #2223 |
These two messages are from BC Wallet 1.0.8 (813) on iOS against both two aca-py instances. These are the messages received by the controller.
aca-py 0.8.1
aca-py 0.7.4
Fields missing from the aca-py 0.8.1 message are
their_did
andtheir_label
.Settings for the two instances are identical, except for the fact that the
0.8.1
instance also includesACAPY_REQUESTS_THROUGH_PUBLIC_DID = true
. Based on the notes for this change; #2034The text was updated successfully, but these errors were encountered: