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

Conversation

pradeepp88
Copy link
Contributor

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.

Signed-off-by: Pradeep Kumar Prakasam <pradeep.prakasam@ontario.ca>
@dbluhm
Copy link
Contributor

dbluhm commented Nov 20, 2024

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

Signed-off-by: Micah Peltier <micah6_8@yahoo.com>
Signed-off-by: Micah Peltier <micah6_8@yahoo.com>
@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
@mepeltier
Copy link
Contributor

@pradeepp88 I know you're planning on presenting to the ACA-PUG here soon, but in the meantime, is there anything else that's needed here? Anything we can help with?

Signed-off-by: Pradeep Kumar Prakasam <pradeep.prakasam@ontario.ca>
@pradeepp88 pradeepp88 force-pushed the feature/oid4vc-multitenancy-support branch from 269fef2 to 2ff7707 Compare December 7, 2024 21:34
@pradeepp88 pradeepp88 marked this pull request as ready for review December 7, 2024 21:35
@pradeepp88
Copy link
Contributor Author

pradeepp88 commented Dec 9, 2024

@mepeltier - I have updated the unit tests for the public routes to ensure all tests pass without modifying the profile and AdminRequestContext in the test cases. Additionally, I have checked the linting and marked the PR as ready for review.

As discussed, I will provide a demo during tomorrow's meeting. Please review the changes and share your feedback.

Copy link
Contributor

@mepeltier mepeltier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me

@swcurran swcurran merged commit a85b656 into openwallet-foundation:main Dec 10, 2024
6 checks passed
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
4 participants