hyperledger / anoncreds-rs

anoncreds-rs
https://wiki.hyperledger.org/display/anoncreds
Apache License 2.0
74 stars 55 forks source link

Relax DID validation on prover_did on a credential request #307

Closed ianco closed 10 months ago

ianco commented 10 months ago

Prover DID can be any did, for example did:peer:

"prover_did": "did:peer:2.Vz6MksjZKAGZbiZvWaXucPoxTpRa6U2QgaqvbrzPq9A2Kcwpu.SeyJpZCI6IiNkaWRjb21tLTAiLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyIja2V5LTEiXSwiciI6W10sInMiOiJodHRwOi8vaG9zdC5kb2NrZXIuaW50ZXJuYWw6ODAzMCJ9"

This currently fails validation, and should pass.

The prover_did doesn't need to be a DID at all, so we could potentially remove this validation completely.

See https://github.com/hyperledger/aries-cloudagent-python/issues/2714

swcurran commented 10 months ago

The validation is in anoncreds-rs? Ah…interesting.

TimoGlastra commented 10 months ago

The code is here: https://github.com/hyperledger/anoncreds-rs/blob/main/src/data_types/cred_request.rs

swcurran commented 10 months ago

@assigned to @andrewwhitehead -- a high priority one to get completed and into a release.