openwallet-foundation / acapy

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
412 stars 512 forks source link

:bug: Issue Credential v1 `send-request` with `auto_remove` does not override system default #2647

Closed ff137 closed 10 months ago

ff137 commented 10 months ago

Holders can request a v1 credential on the following endpoint: "/issue-credential/records/{cred_ex_id}/send-request"

As implemented in PR #2352, this endpoint takes a V10CredentialExchangeAutoRemoveRequest request body, which just contains an auto_remove field. This field has description: "Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)"

I have tested this endpoint with both ACAPY_PRESERVE_EXCHANGE_RECORDS=false and =true, and in both cases, requesting a credential with either auto_remove=True or False has no impact on overriding the default configuration setting.

(Edit: this is for holder cred ex records. I can confirm that cred ex records for the issuer are indeed preserved/deleted when auto_remove is specified on the v1 issue_credential_automated method (not sure about other issuer methods). But this bug report is specific to holder cred ex records, when auto_remove is specified in send-request.)

It works as expected using the v2 protocol. So, I presume there is a missing implementation in the v1 CredentialManager. I can take a look to implement this functionality soon^TM, but just wanted to log the bug so long.

Edit: ACA-Py version 0.11.0

usingtechnology commented 10 months ago

This was addressed in PR #2664 - both v1 and v2 are consistent now.; this PR included a bug fix on v1 issuance not respecting the auto_remove flag.

ff137 commented 10 months ago

@usingtechnology Thanks!