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

Credential Schema VcDataModel Impl #491

Merged
merged 7 commits into from
Apr 29, 2024
Merged

Credential Schema VcDataModel Impl #491

merged 7 commits into from
Apr 29, 2024

Conversation

nitro-neal
Copy link
Contributor

Implement Credential Schema

A credential schema defines the structure and content of the data, enabling verifiers to assess if the data adheres to the established schema.

https://www.w3.org/TR/vc-data-model/#data-schemas

  • Add and export CredentialSchema type
  • Add optional field to VcCreateOptions
  • Update KYC unit test to have latest kyc cred

Copy link

changeset-bot bot commented Apr 12, 2024

🦋 Changeset detected

Latest commit: b3c0f69

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web5/credentials Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Apr 12, 2024

TBDocs Report

🛑 Errors: 0
⚠️ Warnings: 6

@web5/api

  • Project entry file: packages/api/src/index.ts

@web5/crypto

  • Project entry file: packages/crypto/src/index.ts

@web5/crypto-aws-kms

  • Project entry file: packages/crypto-aws-kms/src/index.ts
📄 File: ./packages/crypto-aws-kms/src/ecdsa.ts
⚠️ extractor:typedoc:missing-docs: EcdsaAlgorithm (Class) does not have any documentation.
📄 File: ./packages/crypto-aws-kms/src/key-manager.ts
⚠️ extractor:typedoc:missing-docs: AwsKeyManager (Class) does not have any documentation.
📄 File: ./packages/crypto-aws-kms/src/utils.ts
⚠️ extractor:typedoc:missing-docs: getKeySpec (CallSignature) does not have any documentation.
🔀 Misc.
⚠️ extractor:typedoc:invalid-link: Failed to resolve link to "@web5/crypto#Secp256k1.adjustSignatureToLowS | here" in comment for EcdsaAlgorithm.sign. You may have wanted "@web5/crypto!Secp256k1.adjustSignatureToLowS | here"

@web5/dids

  • Project entry file: packages/dids/src/index.ts

@web5/credentials

  • Project entry file: packages/credentials/src/index.ts
📄 File: ./packages/credentials/src/verifiable-credential.ts
⚠️ extractor:typedoc:missing-docs: CredentialSchema.__type.id (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CredentialSchema.__type.type (Property) does not have any documentation.

TBDocs Report Updated at 2024-04-15T21:46:28Z b3c0f69

@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2024

Codecov Report

Merging #491 (b3c0f69) into main (c8e6fa8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #491   +/-   ##
=======================================
  Coverage   90.55%   90.55%           
=======================================
  Files         112      112           
  Lines       29085    29096   +11     
  Branches     2078     2079    +1     
=======================================
+ Hits        26338    26349   +11     
  Misses       2712     2712           
  Partials       35       35           
Components Coverage Δ
agent 78.83% <ø> (ø)
api 97.89% <ø> (ø)
common 98.68% <ø> (ø)
credentials 95.25% <100.00%> (+0.04%) ⬆️
crypto 93.81% <ø> (ø)
dids 97.65% <ø> (ø)
identity-agent 96.70% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 96.70% <ø> (ø)
user-agent 96.70% <ø> (ø)

Copy link
Contributor

@KendallWeihe KendallWeihe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems simple enough, and no semver binary incompatibilities

do you think we should verify the schema during the signing functionality @nitro-neal ?

@jiyoonie9
Copy link

looks like security audit is failing @nitro-neal - something about mysql? can you look into this and either bump or remove the dep

@nitro-neal
Copy link
Contributor Author

nitro-neal commented Apr 12, 2024

there is a pr for the vuln here - TBD54566975/dwn-sql-store#25

And yup there will be a future pr about resolving the schema, and failing on verify if the schema does not match.

I think this should go in on our modular approach work to verify, some verifiers may not care about the schema so we need Verify Options to have it be optional. tracked here - #425

@jiyoonie9
Copy link

can you explain how fixing the vuln in a different repo would also address it here? is it somehow linked?

@mistermoe
Copy link
Member

Aye mysql is a transitive dependency coming from dwn-sql-store

@nitro-neal nitro-neal merged commit 8663aee into main Apr 29, 2024
9 of 10 checks passed
@nitro-neal nitro-neal deleted the cred-schema-impl branch April 29, 2024 17:09
@github-actions github-actions bot mentioned this pull request Apr 29, 2024
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.

7 participants