Multitenancy Support for OID4VC Plugin #1214
Draft
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.
Multitenancy Support for OID4VC Plugin
This PR closes #1161.
Summary of Proposed changes to Support Multitenancy:
Multitenant Support in
oid4vci_server.py
wallet_id
is provided in the request, the wallet profile is retrieved and injected into the context using thecontext.inject_or(BaseMultitenantManager)
.wallet_key
is available in the wallet record of theroot_profile
. It is used along with thewallet_id
to extract the wallet profile, which is then injected into the metadata. This logic is consistent with the approach currently used by theacapy_agent
admin server to extract the profile from the authentication token.Subpath Addition in
public_routes.py
/tenant/{wallet_id}
withwallet_id
as a path parameter for all public routes when multitenancy is enabled. Otherwise, the routes remain unchanged.Updates to
credentials_issuer_metadata
Endpointcredentials_issuer_metadata
endpoint inpublic_routes.py
to reflect the multitenancy changes.Updates to
get_cred_offer
Endpointget_cred_offer
endpoint inroutes.py
to support the multitenancy updates.Note:
These changes aim to enable multitenancy in the OID4VC plugin with minimal modifications. Feedback from the community on this proposed design would be greatly appreciated.