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

[Task] Test functionality introduced in #1148 more thoroughly. #1149

Open
9 tasks
olivereanderson opened this issue Mar 28, 2023 · 0 comments
Open
9 tasks

Comments

@olivereanderson
Copy link
Contributor

olivereanderson commented Mar 28, 2023

Description

The JWT-based CredentialValidator in #1148 needs more tests. Currently the validate method has only been tested with the default options (in identity_storage) and most of the single purpose methods that have been ported from the old validator have not been tested at all.

I would suggest to:

  1. Introduce some more unit tests in the module itself. Note that since it allows users to pass a custom JwsSignatureVerifier signature verification can easily be mocked and it will be easy to test all the other (composed) functionality.
  2. Extensively test signature verification in identity_storage using the JwkStorageDocumentExt trait to produce signatures.
  3. If official test vectors exist for the VC-JWT test suite it would be ideal to port those as well.

Furthermore it would also be good to test JwkStorageDocumentExt::sign_bytes and CoreDocument::verify_jws with more configuration options and make sure that the errors are also exercised in tests.

Motivation

The functionality we ship should be thoroughly tested.

Resources

Follow up task of #1148 and sub-task of #1103.

To-do list

Create a task-specific to-do list. Please link PRs that match the TODO list item behind the item after it has been submitted.

  • Item one
  • Item two
  • Item three

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • The feature or fix is implemented in Rust and across all bindings whereas possible.
  • The feature or fix has sufficient testing coverage
  • All tests and examples build and run locally as expected
  • Every piece of code has been document according to the documentation guidelines.
  • If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
  • If the feature is not currently documented, a documentation task Issue has been opened to address this.
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

2 participants