-
Notifications
You must be signed in to change notification settings - Fork 516
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
Upgrade script for credx to anoncreds wallet #2776
Comments
Given this is more of a migration process, is a migration tool needed to migrate the wallet and records?
Do we need to make any assumptions? Given you're migrating the wallet type from |
I agree with what @WadeBarnes says — that we are being explicit about the transition we are running, independent of versions. As I understand it, a controller has two sets of API endpoints available, a new set that will use aries-anoncreds, and the other uses the “old” endpoints. A controller can use the new API endpoints and it automagically uses the new data structure. A controller with existing data from using the old endpoints that wants to switch to ONLY use the new API endpoints must run the upgrade to convert all of the relevant records to the new data structure and from then on must only use the new endpoints with those records. Presumably, the most impacted data is the revocation data for credential types being issued by the controller. Is that correct? And if so, I don’t think the version comes into play. |
Also given the explicit transition, any endpoints that are incompatible should automatically be disabled; they should return a descriptive not supported error when called, and be disabled or not displayed at all in the swagger interface. IMO |
Yes the upgrade is a separate tool I had forgotten about that. I need to review it but I'll update the main description in this issue. |
Yes we already do that, protocols are loaded based on the wallet type (askar vs askar-anoncreds) which only enables the appropriate endpoints. |
No it's all or nothing, either askar or askar-anoncreds. Converting from askar to askar-anoncreds will convert all records in the wallet and it will be a one-way conversion. |
There are no version-specific changes since |
FYI I've updated the main description to cover the upgrade details for a single wallet (no multitenancy, no multi-wallet-per-database), @swcurran @WadeBarnes @dbluhm can you take a look and see if I've missed anything? I have another ticket that I'll describe what's required for multi-whatevers. |
Closing this issue, I'll create a new one |
Update the aca-py upgrade process to support a version upgrade to anoncreds.
This ticket describes the overall task to create a script to upgrade an aca-py wallet from askar format to askar-anoncreds (to use with anoncred-rs). The specific wallet records to be updated are identified in issues #2384, #2385, #2386, #2389. This ticket covers the single-wallet scenario (one database, one wallet), the ticket to add support for multi-tenancy (and any multi-database-per-wallet scenarios) is issue #2785.
There is an existing script to upgrade from an Indy SDK wallet to Askar, located in the repository https://github.com/hyperledger/aries-acapy-tools. There is also a document describing this upgrade process here: https://github.com/hyperledger/aries-cloudagent-python/blob/main/docs/deploying/IndySDKtoAskarMigration.md
For the new askar to askar-anoncreds, it is recommended to:
indy-to-askar-wallet-upgrade
)AskarToAnoncredsRSMigration.md
to describe the new upgrade processSince Indy SDK is deprecated (and most aca-py users have likely already upgraded to Askar) it is preferable to keep the scripts and code separate between the two upgrade scripts. (If someone is still using Indy SDK they will need to first upgrade to Askar, and then from Askar to Askar-anoncreds.) Any documentation should also be separate (i.e. two separate README.md files, not one file that covers both upgrade types).
Regarding aca-py versions, the upgrade script should be developed and tested against the latest aca-py version (users should upgrade to the latest aca-py version before doing the wallet upgrade). Occasionally aca-py releases introduce wallet schema changes (usually just additional meta-data added to records) and theoretically this shouldn't affect the upgrade process, however if any wallet changes are introduced this assumption needs to be reviewed.
The upgrade itself should follow the same prerequisites/assumptions/etc that the existing indy sdk to askar script follows:
Ideally, users should also:
The askar to askar-anoncreds script should handle the same scenarios as the indy to askar script, and should use the same parameters, with the exception of some of the multitenancy logic (covered in another ticket):
--strategy dbpw
(database per wallet)The difference between Askar and Askar-anoncreds wallet is the format of some records, so the upgrade process just needs to read these records (in Askar format) and then write them back (in Askar-Anoncreds) format. (I.e. we don't need to replicate a lot of the logic in the existing indy-to-askar upgrade dealing with creating profiles etc.) The record types to upgrade are:
The text was updated successfully, but these errors were encountered: