-
Notifications
You must be signed in to change notification settings - Fork 532
Open
Description
Description:
- When a Verifier sends a proof request containing a predicate that the Holder's credential does not satisfy, the Holder agent still returns that credential in the GET /present-proof-2.0/records/{pres_ex_id}/credentials API call. This leads to confusion, as the expectation is that only matching credentials (those satisfying all restrictions, including predicates) should be returned.
Steps to Reproduce:
- Preconditions:
- ACA-Py instance running in Holder role.
- Holder already has a stored Indy credential in their wallet as shown below
- GET /credentials call should return Indy credential
{
"results": [
{
"referent": "253e2370-284c-4254-9bee-be80b96a51b2",
"schema_id": "9ZUiWwsNkk2iZZu67BRu3K:2:Driving_license:1.0",
"cred_def_id": "9ZUiWwsNkk2iZZu67BRu3K:3:CL:2926088:Driving_License",
"rev_reg_id": "9ZUiWwsNkk2iZZu67BRu3K:4:9ZUiWwsNkk2iZZu67BRu3K:3:CL:2926088:Driving_License:CL_ACCUM:5c2950a7-60ec-49c2-af3a-df8761dd8cec",
"cred_rev_id": "1",
"attrs": {
"dob_dateint": "19900101",
"first_name": "John",
"last_name": "Doe"
}
}
]
}1. Verifier sends proof request (via POST /present-proof-2.0/send-request) with:
- Requested attributes: first_name, last_name
- Predicate: dob_dateint >= 20000101 (which is not satisfied, as the stored value is 19900101)
{
"auto_remove": false,
"auto_verify": false,
"comment": "string",
"connection_id": "66c0622e-b33b-450c-9e85-0d6fb7055331",
"presentation_request": {
"indy": {
"name": "Proof request",
"non_revoked": {
"from": 1640995199,
"to": 1640995199
},
"nonce": "1",
"requested_attributes": {
"additionalProp1": {
"names": [
"first_name",
"last_name"
],
"non_revoked": {
"from": 1640995199,
"to": 1640995199
},
"restrictions": [
{
"cred_def_id": "9ZUiWwsNkk2iZZu67BRu3K:3:CL:2926088:Driving_License"
}
]
}
},
"requested_predicates": {
"additionalProp1": {
"name": "dob_dateint",
"non_revoked": {
"from": 1640995199,
"to": 1640995199
},
"p_type": ">=",
"p_value": 20000101,
"restrictions": [
{
"cred_def_id": "9ZUiWwsNkk2iZZu67BRu3K:3:CL:2926088:Driving_License"
}
]
}
}
}
},
"trace": false
}2. Holder queries matching credentials via:
curl -X GET \
'http://<aca-py-holder-host>/present-proof-2.0/records/<pres_ex_id>/credentials?count=10&start=0' \
-H 'accept: application/json' \
-H 'X-API-KEY: <api-key>'-
Expected Result:
-
No credentials should be returned for the predicate (dob_dateint >= 20000101), since the credential value is 19900101, which does not meet the predicate.
-
Actual Result:
-
The credential is returned as a matching candidate:
[
{
"cred_info": {
"referent": "253e2370-284c-4254-9bee-be80b96a51b2",
"schema_id": "9ZUiWwsNkk2iZZu67BRu3K:2:Driving_license:1.0",
"cred_def_id": "9ZUiWwsNkk2iZZu67BRu3K:3:CL:2926088:Driving_License",
"rev_reg_id": "9ZUiWwsNkk2iZZu67BRu3K:4:9ZUiWwsNkk2iZZu67BRu3K:3:CL:2926088:Driving_License:CL_ACCUM:5c2950a7-60ec-49c2-af3a-df8761dd8cec",
"cred_rev_id": "1",
"attrs": {
"first_name": "John",
"dob_dateint": "19900101",
"last_name": "Doe"
}
},
"interval": {
"from": 1640995199,
"to": 1640995199
},
"presentation_referents": [
"additionalProp1"
]
}
]- Impact:
- This behavior can mislead application logic or end-users, as it appears that a valid credential exists for the predicate — but attempting to build the presentation will ultimately fail if the proof is actually constructed and sent.
Environment
- ACA-Py version: 1.3.0
- Protocol: didexchange/1.0
- Transport: HTTP / Admin API
Metadata
Metadata
Assignees
Labels
No labels