feat(mso_mdoc): wallet-scoped trust registry, drop FileTrustStore#23
Closed
burdettadam wants to merge 1 commit intofeat/mso-mdoc-newfrom
Closed
feat(mso_mdoc): wallet-scoped trust registry, drop FileTrustStore#23burdettadam wants to merge 1 commit intofeat/mso-mdoc-newfrom
burdettadam wants to merge 1 commit intofeat/mso-mdoc-newfrom
Conversation
96f2c86 to
03f25f9
Compare
Trust anchors are now exclusively stored in and retrieved from the Askar wallet, making the trust registry per-wallet scoped. Sub-wallets maintain their own trust registry with their own root authority certificates. - Remove FileTrustStore (filesystem PEM directory) entirely - Remove OID4VC_MDOC_TRUST_STORE_TYPE env var and create_trust_store() - verify_credential / verify_presentation always build a fresh WalletTrustStore(profile) from the calling profile per-request, ensuring each tenant Askar partition is queried correctly - Remove TestFileTrustStore unit tests (class no longer exists) - Rewrite test_wallet_trust_store_per_request.py for always-wallet design - Remove FileTrustStore imports from test_review_issues / test_verifier - Simplify plugin __init__.py / on_startup (no trust store init at startup) Depends-on: feat/mso-mdoc-new Signed-off-by: Adam Burdett <burdettadam@gmail.com>
03f25f9 to
9a5d9d8
Compare
Collaborator
Author
|
Superseded — FileTrustStore removal folded into feat/mso-mdoc-new (PR #22) directly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a wallet-scoped trust registry for mso_mdoc credential verification.
Trust anchors are now exclusively stored in the Askar wallet, one registry per sub-wallet (tenant).
The
FileTrustStore(filesystem PEM directory) andOID4VC_MDOC_TRUST_STORE_TYPEenv var are removed.Changes
Trust Registry (wallet-scoped)
WalletTrustStore: New Askar-backed trust store; built fresh per-request from the callingprofile, ensuring each tenant's Askar partition is queried automaticallystorage/: New module withMdocStorageManagerproviding CRUD for trust anchors, signing keys, and certificates — all wallet-scopedkey_routes.py: REST endpoints:POST/GET/DELETE /mso_mdoc/trust-anchorskey_generation.py: Default EC key pair and self-signed certificate generation on startupVerifier (reimplemented)
mdoc/verifier.py: Complete reimplementation withMsoMdocCredVerifierandMsoMdocPresVerifier; verification always uses a freshWalletTrustStore(profile)— no env var togglemdoc/utils.py: PEM chain splitting (split_pem_chain) and trust anchor flattening helpersCredential Processor
cred_processor.py:MsoMdocCredProcessornow implementsCredVerifierandPresVerifier;verify_credential/verify_presentationdelegate to the new verifier classes usingWalletTrustStore(profile)Plugin Setup
__init__.py: Registerscred_verifierandpres_verifieron startup;on_startupinitializes storage and default keysRemovals
FileTrustStoreclass removed entirelyOID4VC_MDOC_TRUST_STORE_TYPEenv var removedmso/subpackage removed (replaced bymdoc/implementation)x509.pyandmdoc/exceptions.pyremoved (superseded)Test Updates
TestFileTrustStoretests (class is gone)test_wallet_trust_store_per_request.pyfor always-wallet designFileTrustStoreimports fromtest_review_issues.pyandtest_verifier.pytest_pki.py: Usejson.dumps()instead ofcbor2.dumps()for namespace valuesDesign
Each sub-wallet (tenant) has its own isolated trust anchor registry. When a verification request arrives,
WalletTrustStore(profile)is constructed from the calling profile — never a stale or shared trust store from plugin startup time. This ensures tenant isolation in multi-tenant deployments.The trust anchor CRUD routes (
key_routes.py) allow operators to manage which root CA certificates are trusted per-tenant.