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

Multitenancy Support for OID4VC Plugin #1214

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pradeepp88
Copy link

Multitenancy Support for OID4VC Plugin

This PR closes #1161.

Summary of Proposed changes to Support Multitenancy:

  1. Multitenant Support in oid4vci_server.py

    • If multitenancy is enabled and a wallet_id is provided in the request, the wallet profile is retrieved and injected into the context using the context.inject_or(BaseMultitenantManager).
    • The wallet_key is available in the wallet record of the root_profile. It is used along with the wallet_id to extract the wallet profile, which is then injected into the metadata. This logic is consistent with the approach currently used by the acapy_agent admin server to extract the profile from the authentication token.
  2. Subpath Addition in public_routes.py

    • Introduce a subpath /tenant/{wallet_id} with wallet_id as a path parameter for all public routes when multitenancy is enabled. Otherwise, the routes remain unchanged.
  3. Updates to credentials_issuer_metadata Endpoint

    • Modify the credentials_issuer_metadata endpoint in public_routes.py to reflect the multitenancy changes.
  4. Updates to get_cred_offer Endpoint

    • Adjust the get_cred_offer endpoint in routes.py to support the multitenancy updates.

Note:

  • Updates to test cases are currently in progress and are not included in this draft.

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.

@dbluhm
Copy link
Contributor

dbluhm commented Nov 20, 2024

Tagging @mepeltier in for a first round of reviews. Thanks @pradeepp88!

@mepeltier
Copy link
Contributor

Some fixes have been added here: pradeepp88#1
Other than that, it looks good to me

…upport

OID4VC Multitenancy Fixes and Demo Changes
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.

Multitenancy support for OID4VC plugin
3 participants