Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the presentation submission in the oid4vp-rs e2e test. (#8)
* wip: use ssi 0.8.1, debugging e2e test using did resolver Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: use VerificationMethodDIDResolver for DIDClient constructor Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove unused imports Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: debugging did resolver jwk not found in e2e flow Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * feat/improve-presentation-exchange-support-in-oid4vp-rs add implementation methods for Presentation Definition. WIP: Need to continue work for Presentation Submission and the rest of the structs used in the presentation exchange flow. Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> Co-authored-by: Todd Showalter <todd.showalter@spruce.id> * add getter methods for presentation definition member fields Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * fix broken links in documentation Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * update presentation submission implementation Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * fix test cases. todo: update test cases to use newly created interface for presentation exchange Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * update json schema validator to use anyhow result type Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: use latest implementation changes, update tests Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * fix verification method did resolver tests Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: remove unused imports Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add ClaimFormat type Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add regex support for string pattern matching Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * revert uuid presentation definition id type to string Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * fix: ensure negation of regex pattern match for error Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add 'other' variante to claim format type Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove commented out code Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * use ssi sub-crates instead of main ssi dependency Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add jwt_vc_json and jwt_vp_json claim formats Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: construct verifiable presentation for e2e test Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: perform validation on presentation submission Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * ensure range exclusive values are checked; fix inclusive range values Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * ensure enum values are parsed in alpha descending order This is a fix for a bug where ClaimFormat::JwtVc was being parsed when ClaimFormat::JwtVp should have been instead. The fix is to order the enum fields in alphabetical descending order, such that VP comes BEFORE VC, and so on, for the other formats. Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: verify authorized response presentation submission Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * ensure json schema validator adheres to the specification Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * ensure json schema validator adheres to the specification Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add unit tests for schema validator Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * use serde default value for constraints field if not found during deserialization Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove unused imports Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove unsed imports in test files Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * update vp token Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * rebase with main Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove unused dependencies Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add rand crate and provide random nonce method using Rng trait Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove todos and update comments, use JWKResolver instead of VerificationMethodDIDResolver Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * fix clippy warnings Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * verify jwt in validate_authorization_response presentation definition method Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * Update tests/e2e.rs Co-authored-by: Jacob <jacob.ward@spruceid.com> * update descriptor map nested path in e2e example Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove dependency patches Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add paths to example for input descriptor constraints field Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * use top level json path for jwt_vp_json Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * Update src/verifier/client.rs Co-authored-by: Jacob <jacob.ward@spruceid.com> * rebase Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * revert validation function async signature to use boxed pin future Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add helper methods Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * debug: jwt claim signing does not include public key Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * make request signer methods return a result Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * refactor presentation exchange file into smaller modules Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * fix clippy warnings Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * fix outcome error cause Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add credential format and add requested fields helper method to input descriptor Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * Update src/core/presentation_definition.rs Co-authored-by: Jacob <jacob.ward@spruceid.com> * Update src/core/presentation_definition.rs Co-authored-by: Jacob <jacob.ward@spruceid.com> * wip: add notes on required fields parsing Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * update vp token base64 encoding and check for multiple vp payloads Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * move validation to auth response impl instead of presentation definition impl Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove feature gated non-optional deps Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove cfg features Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * wip: handle groups in presentation definition, input descriptor tests Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove cfg feature tags Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * remove extraneous metadata helper methods; use UntypedObject for dereferencing Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add submission requirement check for presentation validation Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add validate method to vp token; ensure submission requirement all rule is enforced. Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * add vp token validate unencoded method. fix minor todos. Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * Update Cargo.toml Co-authored-by: Jacob <jacob.ward@spruceid.com> * fix other claim format serde Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * use Vec::is_empty versus Option::is_none for various serialization fields This commit also removes validation logic from vp token response struct. Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> * revert to use of ClaimFormatMap to pass presentation defintion test suite Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> --------- Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com> Co-authored-by: Todd Showalter <todd.showalter@spruce.id> Co-authored-by: Jacob <jacob.ward@spruceid.com>
- Loading branch information