bcgov / aries-vcr

Hyperledger Aries Verifiable Credential Registry (VCR) is a set of application level software components designed to accelerate the adoption of trustworthy entity to entity communications.
Apache License 2.0
78 stars 70 forks source link

Credential verification isn't working #791

Open ianco opened 2 months ago

ianco commented 2 months ago

in prod, the "verification" page doesn't show the "claims proven.

Tested locally and I'm getting the following error:

vcr-api-1     | ERROR 2024-07-26 08:51:15,521 log 35 139914658178624 Internal Server Error: /api/v3/credential/5424/verify/undefined
vcr-api-1     | Traceback (most recent call last):
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
vcr-api-1     |     response = get_response(request)
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
vcr-api-1     |     response = self.process_exception_by_middleware(e, request)
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
vcr-api-1     |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
vcr-api-1     |     return view_func(*args, **kwargs)
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/viewsets.py", line 114, in view
vcr-api-1     |     return self.dispatch(request, *args, **kwargs)
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 505, in dispatch
vcr-api-1     |     response = self.handle_exception(exc)
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 465, in handle_exception
vcr-api-1     |     self.raise_uncaught_exception(exc)
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
vcr-api-1     |     raise exc
vcr-api-1     |   File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 502, in dispatch
vcr-api-1     |     response = handler(request, *args, **kwargs)
vcr-api-1     |   File "/opt/app-root/src/api/v3/views/rest.py", line 253, in post_verify
vcr-api-1     |     if presentation_state["state"] == "verified":
vcr-api-1     | KeyError: 'state'
esune commented 2 months ago

Is this using the new present-proof 2.0 protocol? I wonder if some data structure changed slightly enough to require new mappings (that would be the easy option)...

ianco commented 2 months ago

It could be related to a cange to using the 2.0 protocol, I didn't really dig into it too much ...

ianco commented 3 weeks ago

Credential verification is working in production OrgBook but not locally.

Upon inspection the self-connection isn't getting created on startup (the OrgBook agent makes a connection to itself in order to ask itself for a proof).

This should happen on startup in this code: https://github.com/bcgov/aries-vcr/blob/main/server/vcr-server/app-vonx.py

... which it looks like doesn't get run any more ...