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

Add support for connection-less problem reports for presentations #2597

Closed esune closed 10 months ago

esune commented 11 months ago

When receiving a problem report on a connection-less proof request, ACA-Py considers it unsupported and raises an exception (see here. This seems incorrect, and prevents the correct handling of rejected proof-requests (the verifier would not be able to know that a proof was rejected, and why).

Handling of the problem report should likely update the exchange record to "abort" it, and emit an event/webhook with relevant data for a controller to be able to reconcile it with the outgoing request.

andrewwhitehead commented 11 months ago

Comparing receive_presentation to receive_problem_report, it looks like the handler just needs to be updated to pass None as the connection_id when there's no connection record.

popkinj commented 11 months ago

Hey @esune I'm no python expert... But...

Could it be as simple as changing this to something like this:

        connection_id = (
            None
            if oob_record
            else getattr(connection_record,'connection_id',None)
            if connection_record
            else None
        )
esune commented 11 months ago

Hey @esune I'm no python expert... But...

Could it be as simple as changing this to something like this:

        connection_id = (
            None
            if oob_record
            else getattr(connection_record,'connection_id',None)
            if connection_record
            else None
        )

I think something like this should work 👍🏻