traction icon indicating copy to clipboard operation
traction copied to clipboard

All tenants are being created in the same database/schema

Open esune opened this issue 1 year ago • 3 comments

The Traction ACA-Py agent is started with the setting "wallet_scheme":"DatabasePerWallet" in the wallet storage configuration: this is expected to cause each tenant to be created and live in their own database in the wallet. However, it appears that all tenants are actually being created inside the same multitenant_sub_wallet database at this time.

Unsure on whether this issue is in Traction or ACA-Py, we should audit the problem and follow-up in the appropriate repository to find a solution.

esune avatar Jul 11 '24 00:07 esune

FYI this is what the ACA-Py status/config reads (using x-api-key) when fetched (dev env in this case but same for all)

image

loneil avatar Jul 11 '24 18:07 loneil

So. I've confirmed that this is an issue with the multitenant_provider plugin. https://github.com/hyperledger/aries-acapy-plugins/tree/main/multitenant_provider. I don't think there's any configuration or anything that will fix it. It's a bug in the plugin that needs to be fixed.

If I use the plugin in base aca-py and create wallets it starts putting them in multitenant_sub_wallet which I believe is a hardcoded default in aca-py.

Without the plugin everything works as expected.

jamshale avatar Jul 11 '24 22:07 jamshale

Changing the plugin config for the multitenant_provider to use the other multitenant manager class will fix the issue for new tenants. https://github.com/bcgov/traction/blob/main/charts/traction/values.yaml#L226.

This should be changed to BasicMultitokenMultitenantManager

jamshale avatar Jul 12 '24 18:07 jamshale