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

CWALL-254: Added vc validation against the schema #243

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

sksadjad
Copy link
Contributor

IMPORTANT NOTE
the examples that I see from ebsi, all have some discrepancies. so I've added an option to dictate whether we want to check the vc against it's schema or not:

export type VerifyCredentialToAcceptArgs = {
  mappedCredential: MappedCredentialToAccept
  hasher?: Hasher
  verifyAgainstSchema?: boolean // newly added value
  context: RequiredContext
}

…g the vc against the schema plus some bugfixes. also made checking vc against the schema optional
@sksadjad sksadjad changed the title Added vc validation against the schema SPRIND-254: Added vc validation against the schema Sep 23, 2024
@sksadjad sksadjad changed the title SPRIND-254: Added vc validation against the schema CWALL-254: Added vc validation against the schema Sep 23, 2024
@nklomp
Copy link
Contributor

nklomp commented Sep 23, 2024

The logic should be the other way around. Just like how we handle expiration and credential status. When the object is present, it means the issuer values the respective feature of the VCDM. So when they issue with a schema, we should always validate, unless an option was set to not validate. So something like noSchemaValidation makes more sense. Or even nicer an enum named SchemaValidation, with values, ALWAYS, NEVER, WHEN_PRESENT. That allows you to configure from a wallet or RP perspective whether you always need schema's, whether you will not verify schema's or only when the issuer added schema's

@nklomp nklomp changed the base branch from feature/from-funke to develop October 28, 2024 01:57
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

Successfully merging this pull request may close these issues.

2 participants