hyperledger / aries-cloudagent-python

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
405 stars 510 forks source link

Is it possible to migrate wallet strategy DatabasePerWallet -> MultiWalletSingleTable? #3219

Closed alterkim closed 1 week ago

alterkim commented 3 weeks ago

Hi all,

I was using acapy version 0.7.5 and wallet type indy with multitenancy mode. Now, I want to upgrade the acapy version, but I have to change wallet type to askar. Even I was using multitenancy mode, my wallet storage is using DatabasePerWallet strategy. Before I migrate to askar, I want to change DatabasePerWallet strategy to MultiWalletSingleTable. I would like to ask if this is possible.

Thank you for reading!

swcurran commented 3 weeks ago

Comments, @jamshale ? :-).

jamshale commented 3 weeks ago

Edit I don't think it's possible to change the wallet type with indy wallets before changing to askar.

But, If you haven't upgraded already this should be straightforward using the aries-acapy-tools acapy_wallet_upgrade script. Particularly the mwst-as-profiles option. This will change wallet types and multitenant structure in one migration.

If you have more questions, then @dbluhm might have better answers as he was on the team that produced the script.

alterkim commented 3 weeks ago

Thank you for your answers. I also want to use mwst-as-profiles option, but now my system is working as dbpw with multi-tenancy. So that's why I want to migrate dbpw as mwst in indy wallets then migrate with mwst-as-profiles option.

But if this is not possible, I think migrating as dbpw askar can be best. If you have better way, please leave a comment anytime. Thanks :)

jamshale commented 3 weeks ago

Oh. I didn't realize the option didn't work for indy multi-tenant multi-wallets. I actually didn't realize that was an option for indy wallets at all. I joined the project after askar wallets were the common wallet types.

I'd say this isn't possible currently. I have been working on tools to convert multi-tenant wallet types for askar, but the only option available currently in multi-tenant single wallet to multi-tenant multi-wallet. The opposite of what you were looking for. I think there is going to be more complexity for your case and haven't put effort into this as it's not what our use case needed.

If this is something you really need... You could possibly work on updating the acapy_wallet_upgrade tool for your case, or migrating to the askar wallet type multi-wallet for now and then working on a new tool for askar multi-tenant multi-wallet to multi-tenant single wallet. I did want to do this but there's no timeline for completing it.

jamshale commented 1 week ago

I'm going to close this as the only option is to create a tool in aries-acapy-tools repo. Now that I have more understanding of mutiltenant wallets, I do think it's possible to create the from multi-wallet to single-wallet but I don't have plans to work on anytime soon.