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

Ability to rename a profile and only export a specific profile #221

Open
TimoGlastra opened this issue Feb 6, 2024 · 3 comments
Open

Ability to rename a profile and only export a specific profile #221

TimoGlastra opened this issue Feb 6, 2024 · 3 comments

Comments

@TimoGlastra
Copy link
Contributor

It would be useful if you can choose to export only a specific profile (or a subset of profiles) when calling copyTo.

In addition, I think it would also be nice if you can rename a profile. With Indy SDK import/export you could use a different wallet id after you had exported the wallet, and currently if you do export/import with Askar it will use the same profile name.

I don't think there's a way currently to update a profile name after it has been created

@TimoGlastra
Copy link
Contributor Author

cc @genaris running into some issues currently with import/export after some updates to AskarWallet as we used to use the default profile after export/import, and the profile would be different from the wallet id.

I've updated the code to always provide a profile, but this means that now after export / import and using a different wallet_id it will fail. I do think always providing a profile is good, as especially with multi-tenancy switching the wallet_id could result in some weird issues

@genaris
Copy link
Contributor

genaris commented Feb 6, 2024

Yeah these would be nice features. Actually I also ran into this issue when I wanted to do a migration from SQLite to Postgres in AFJ and I was unable to specify a different wallet id.

The copyTo is currently store-oriented (it's actually calling askar_store_copy), so if we add a parameter where we can specify the profile to copy, I guess it should set the same profile name in the target store.

BTW I think there are also 'manual' ways of copying a certain profile contents. For instance, we can scan for all items from a profile without specifying any category, and set them into a new profile from either the same or a different store. Of course this is slower, but might be useful to do a complete dump of a profile into an arbitrary format we would like to use. It would need an update to JS wrapper as I think it is still getting category as a mandatory parameter.

@jamshale
Copy link

@esune I think this is the same problem preventing me from switching multitenant wallet types. There is a private copy_profile function that I think would do what I need. I could try and take this on if we need.

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

No branches or pull requests

3 participants