aries-framework-go
aries-framework-go copied to clipboard
Option to enforce proof requirement for Verifiable Credential?
What I'm trying to do
I'm trying to enforce the requirement for Verifiable Credential to have embedded proofs.
Expected result
It would be nice to have an option to enforce embedded proofs.
Actual result
It seems to currently not being enforceable as of the following snippet on line 68.
proofElement, ok := jsonldDoc["proof"]
if !ok || proofElement == nil {
// do not make a check if there is no proof defined as proof presence is not mandatory
return docBytes, nil
}
@adn-misa could you please elaborate what you are trying to do here.
we enforce proof validation in verifiable credential only if it has proof.
For example you want to sign a credential then you to parse one without proof
vc, err := verifiable.ParseCredential(rawBytes)
err = vc.AddLinkedDataProof(...options..)
if we always enforce proof validation then it will fail in first line itself.
@sudeshrshetty my bad, i wasn't clear enough.
What I meant was for an option for ParseCredential
to fail when a verifiable credential does not have a proof.
It would also make a good default from a security perspective.
The first time using the ValidateCredential
API, I thought that it would fail on missing proof.
It was later when I verified the source code that I found that behaviour you mentioned on missing proofs.
From my view, I don't see a lot of use cases for verifiable credentials without proofs. I would appreciate your view of the issues.