Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to fetch credential definition details from ledger using did:web #3544

Open
NB-PrasadKatkar opened this issue Feb 28, 2025 · 3 comments

Comments

@NB-PrasadKatkar
Copy link

Description
I am trying to fetch a credential definition from the ledger using the HTTP GET endpoint: /credential-definitions/{cred_def_id}

My agent is running on the latest ACA-Py release and is configured with a did:web as the public DID. When attempting to retrieve the credential definition, ACA-Py tries to resolve the public DID but fails, resulting in the following error:

indy_vdr.error.VdrError: Request failed: client request invalid: InvalidClientRequest('prasad.github.io', 1739295285303260321, "validation error [SafeRequest]: should not contain the following chars ['.'] (identifier=prasad.github.io)")

Steps to Reproduce

  1. Configure an ACA-Py agent with did:web as the public DID.
  2. Attempt to fetch a credential definition using /credential-definitions/{cred_def_id}.
  3. Observe the error when ACA-Py tries to resolve did:web.

Environment

  • ACA-Py Version: v1.2.2
  • DID Method: did:web
  • Ledger: Bcovrin test
  • Deployment: Docker

Additional Context
Any insights into resolving this issue or potential workarounds would be appreciated.

@esune
Copy link
Member

esune commented Mar 7, 2025

Might be related to #3462

@jamshale
Copy link
Contributor

You shouldn't set a did:web to the public did. It is very indy specific right now. This should be prevented. There is ongoing work to allow the public did to be different types and not interfere with did:indy operations, but it isn't going to be completed for some time.

However, it shouldn't fail to read the indy ledger because of an invalid public did so this should still be looked at. I'm not aware of why it tries to use the public did when reading the indy ledger.

@esune
Copy link
Member

esune commented Mar 12, 2025

@NB-PrasadKatkar can you provide examples of how:

  • You are creating the did:web and setting it as public
  • Which credential definition are you trying to fetch, and from which ledger? Is the ledger configured in your agent at least as a read-only ledger?

I did some quick testing using Traction Sandbox:

  • I was able to create a did:web without issues
  • When I tried to set it as public, I got an error stating there was no connection to the endorser: this should not be required for did:web
  • I connected to the BCovrin Test endorser, which sets a new public did automatically in the sandbox environment
  • I was now able to set my did:web as public (note this is not going to be resolvable):
{
  "result": {
    "did": "did:web:esune.github.io",
    "verkey": ---redacted---,
    "posture": "posted",
    "key_type": "ed25519",
    "method": "web",
    "metadata": {
      "posted": true
    }
  }
}
  • I was able to fetch credential definitions from BCovrin Test, CANdy Dev and CANdy Prod without incurring in the issue you flagged.

@jamshale 's recommendation still stands, but trying to pinpoint what might be going wrong in your case in order to determine the course of action in ACA-Py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants