hyperledger / identus-cloud-agent

Identus Cloud Agent
https://identus.io/
Apache License 2.0
79 stars 21 forks source link

Revocation fails with status 404 with valid credential ID #1350

Open ndigirigijohn opened 4 weeks ago

ndigirigijohn commented 4 weeks ago

Is this a regression?

No

Description

I have been trying to revoke a prism credential using cloud agent api, I have confirmed usage of correct api key and valid credential record ID but revocation fails with an error with status 404. I tried this several times with different api key and credential combination to confirm there was an issue.

Please provide the exception or error you saw

{
    "status": 404,
    "type": "NotFound",
    "title": "NotFound",
    "detail": "Credential with id e8b1f30f-7c59-45bf-b595-0fc3f142d76e is either already revoked or does not exist",
    "instance": "error:instance:d0b0d6e2-b8f8-42cc-a93b-9cef74d00f70"
}

Please provide the environment you discovered this bug in

The issue occurred on a hosted agent running on a linux machine

Anything else?

I checked the values on the status list to confirm that the credential was indeed not revoked.

shotexa commented 3 weeks ago

Hi @ndigirigijohn, thanks for submitting an issue, can you tell us which version of the agent you have been running? did you run the latest version on the main branch or one of the released versions?

This error usually happens when a credential has either been revoked or the credential ID is invalid, did you get this error the first time you tried to revoke the credential? also, can you share how exactly did you acquire the credential ID? a.k e8b1f30f-7c59-45bf-b595-0fc3f142d76e

ndigirigijohn commented 3 weeks ago

Hello @shotexa , thank you for the response. I have pulled the latest cloud agent and tried again. I'm using agent version 1.36.1 and node version 2.4.1 as per the quick start guide. With this update, I no longer get the error above on the first revocation request. I now get a 200 status code, and the previous error only occurs when trying to revoke a credential a second time, which seems correct. However, I've now encountered a new issue. The value of the encodedList in the status list credential remains the same even after successfully revoking a credential. This suggests that the credential's revocation status might not be properly recorded. I have tried the revocation process several times, but the value never changes, even after revoking multiple different credentials. Could you please check if you can observe the same behavior on your end? Let me know if you need additional information, thank you.

shotexa commented 2 weeks ago

Hello @shotexa , thank you for the response. I have pulled the latest cloud agent and tried again. I'm using agent version 1.36.1 and node version 2.4.1 as per the quick start guide. With this update, I no longer get the error above on the first revocation request. I now get a 200 status code, and the previous error only occurs when trying to revoke a credential a second time, which seems correct. However, I've now encountered a new issue. The value of the encodedList in the status list credential remains the same even after successfully revoking a credential. This suggests that the credential's revocation status might not be properly recorded. I have tried the revocation process several times, but the value never changes, even after revoking multiple different credentials. Could you please check if you can observe the same behavior on your end? Let me know if you need additional information, thank you.

Hey @ndigirigijohn, thanks for the feedback, when you revoke a credential, the value of the encoded list should indeed change soon after the revocation took place (it is done by a background job, that fires every second), so if you are not seeing the change (there should be a slight change in the encoded status list), there might indeed be something wrong, I'll check it out.