Skip to content

Commit

Permalink
Merge branch 'main' into multi_ledger_write
Browse files Browse the repository at this point in the history
  • Loading branch information
shaangill025 authored Jul 24, 2023
2 parents c87a1af + 7c01704 commit ab16699
Show file tree
Hide file tree
Showing 13 changed files with 511 additions and 125 deletions.
113 changes: 113 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,116 @@
# 0.9.0-rc0

## July 21, 2023

Release 0.9.0 is an important upgrade that changes (PR [\#2302]) the dependency
on the now archived Hyperledger Ursa project to its updated, improved
replacement, [AnonCreds CL-Signatures]. This important change is ONLY available
when using [Aries Askar] as the wallet type, which brings in both [Indy VDR] and
the CL-Signatures via the latest version of [CredX from the indy-shared-rs
repository]. The update is **NOT** available to those that are using the [Indy
SDK]. All new deployments of ACA-Py SHOULD use [Aries Askar]. Further, we
**strongly** recommend that all deployments using the [Indy SDK] with ACA-Py
upgrade their installation to use [Aries Askar] and the related components using
the migration scripts available. An [Indy SDK to Askar migration document] added
to the [aca-py.org] documentation site, and a deprecation warning added to the
ACA-Py startup.

[AnonCreds CL-Signatures]: https://github.com/hyperledger/anoncreds-rs
[Aries Askar]: https://github.com/hyperledger/aries-askar
[CredX from the indy-shared-rs repository]: https://github.com/hyperledger/indy-shared-rs
[Indy SDK]: https://github.com/hyperledger/indy-sdk
[Indy SDK to Askar migration document]: https://aca-py.org/main/deploying/IndySDKtoAskarMigration/
[aca-py.org]: https://aca-py.org

The second big change in this release is that we have upgraded the primary
Python version from 3.6 to 3.9 (PR [\#2247]). In this case, primary means that
Python 3.9 is used to run the unit and integration tests on all Pull Requests.
We also do nightly runs of the main branch using Python 3.10. As
of this release we have **dropped** Python 3.6, 3.7 and 3.8, and introduced new
dependencies that are not supported in those versions of Python. For those that
use the published ACA-Py container images, the upgrade should be easily handled.
If you are pulling ACA-Py into your own image, or a non-containerized
environment, this is a breaking change that you will need to address.

Please see the next section for all breaking changes, and the subsequent section
for a categorized list of all pull requests in this release.

## Breaking Changes

In addition to the breaking Python 3.6 to 3.9 upgrade, there are two other
breaking changes that may impact some deployments.

[\#2034] allows for additional flexibility in using public DIDs in invitations,
and adds a restriction that "implicit" invitations must be proactively enabled
using a flag (`--requests-through-public-did`). Previously, such requests
would always be accepted if `--auto-accept` was enabled, which could lead to
unexpected connections being established.

[\#2170] is a change to improve message handling in the face of delivery errors
when using a persistent queue implementation such as the [ACA-Py Redis Plugin].
If you are using the Redis plugin, you **MUST** upgrade to [Redis Plugin Release
0.1.0] in conjunction with deploying this ACA-Py release. For those using their
own persistent queue solution, see the PR [\#2170] comments for information
about changes you might need to make to your deployment.

[ACA-Py Redis Plugin]: https://github.com/bcgov/aries-acapy-plugin-redis-events
[Redis Plugin Release 0.1.0]: https://github.com/bcgov/aries-acapy-plugin-redis-events/releases/tag/v0.1.0

[\#2302]: https://github.com/hyperledger/aries-cloudagent-python/pull/2302
[\#2034]: https://github.com/hyperledger/aries-cloudagent-python/pull/2034
[\#2247]: https://github.com/hyperledger/aries-cloudagent-python/pull/2247
[\#2170]: https://github.com/hyperledger/aries-cloudagent-python/pull/2170

### Categorized List of Pull Requests

- DIDComm Messaging Improvements/Fixes
- BREAKING: feat: get queued outbound message in transport handle message [\#2170](https://github.com/hyperledger/aries-cloudagent-python/pull/2170) [dbluhm](https://github.com/dbluhm)
- DID Handling and Connection Establishment Updates/Fixes
- Allow any did to be public [\#2295](https://github.com/hyperledger/aries-cloudagent-python/pull/2295) [mkempa](https://github.com/mkempa)
- Feat: Added support for Ed25519Signature2020 signature type and Ed25519VerificationKey2020 [\#2241](https://github.com/hyperledger/aries-cloudagent-python/pull/2241) [dkulic](https://github.com/dkulic)
- Add Goal and Goal Code to OOB and DIDex Request [\#2294](https://github.com/hyperledger/aries-cloudagent-python/pull/2294) [usingtechnology](https://github.com/usingtechnology)
- Fix routing in set public did [\#2288](https://github.com/hyperledger/aries-cloudagent-python/pull/2288) [mkempa](https://github.com/mkempa) - Fix: Do not replace public verkey on mediator [\#2269](https://github.com/hyperledger/aries-cloudagent-python/pull/2269) [mkempa](https://github.com/mkempa) - BREAKING: Allow multi-use public invites and public invites with metadata [\#2034](https://github.com/hyperledger/aries-cloudagent-python/pull/2034) [mepeltier](https://github.com/mepeltier)
- fix: public did mediator routing keys as did keys [\#1977](https://github.com/hyperledger/aries-cloudagent-python/pull/1977) [dbluhm](https://github.com/dbluhm)
- Credential Exchange (Issue, Present) Updates
- Add revocation registry rotate to faber demo [\#2333](https://github.com/hyperledger/aries-cloudagent-python/pull/2333) [usingtechnology](https://github.com/usingtechnology)
- Update to indy-credx 1.0 [\#2302](https://github.com/hyperledger/aries-cloudagent-python/pull/2302) [andrewwhitehead](https://github.com/andrewwhitehead)
- feat(anoncreds): Implement automated setup of revocation [\#2292](https://github.com/hyperledger/aries-cloudagent-python/pull/2292) [dbluhm](https://github.com/dbluhm)
- fix: schema class can set Meta.unknown [\#1885](https://github.com/hyperledger/aries-cloudagent-python/pull/1885) [dbluhm](https://github.com/dbluhm)
- Respect auto-verify-presentation flag in present proof v1 and v2 [\#2097](https://github.com/hyperledger/aries-cloudagent-python/pull/2097) [dbluhm](https://github.com/dbluhm)
- Feature: JWT Sign and Verify Admin Endpoints with DID Support [\#2300](https://github.com/hyperledger/aries-cloudagent-python/pull/2300) [burdettadam](https://github.com/burdettadam)
- Multitenancy Updates and Fixes
- Fix: Track endorser and author roles in per-tenant settings [\#2331](https://github.com/hyperledger/aries-cloudagent-python/pull/2331) [shaangill025](https://github.com/shaangill025)
- Added base wallet provisioning details to Multitenancy.md [\#2328](https://github.com/hyperledger/aries-cloudagent-python/pull/2328) [esune](https://github.com/esune)
- Other Fixes, Demo, and Documentation Fixes
- chore: add indy deprecation warnings [\#2332](https://github.com/hyperledger/aries-cloudagent-python/pull/2332) [dbluhm](https://github.com/dbluhm)
- Fix alice/faber demo execution [\#2305](https://github.com/hyperledger/aries-cloudagent-python/pull/2305) [andrewwhitehead](https://github.com/andrewwhitehead)
- Add .indy_client folder to Askar only image. [\#2308](https://github.com/hyperledger/aries-cloudagent-python/pull/2308) [WadeBarnes](https://github.com/WadeBarnes)
- Add build step for indy-base image in run_demo [\#2299](https://github.com/hyperledger/aries-cloudagent-python/pull/2299) [usingtechnology](https://github.com/usingtechnology)
- Webhook over websocket clarification [\#2287](https://github.com/hyperledger/aries-cloudagent-python/pull/2287) [dbluhm](https://github.com/dbluhm)
- ACA-Py Deployment Upgrade Changes
- Add Explicit/Offline marking mechanism for Upgrade [\#2204](https://github.com/hyperledger/aries-cloudagent-python/pull/2204) [shaangill025](https://github.com/shaangill025)
- Plugin Handling Updates
- Feature: Add the ability to deny specific plugins from loading 0.7.4 [\#1737](https://github.com/hyperledger/aries-cloudagent-python/pull/1737) [frostyfrog](https://github.com/frostyfrog)
- Dependencies and Internal Updates
- upgrade requests to latest [\#2336](https://github.com/hyperledger/aries-cloudagent-python/pull/2336) [ff137](https://github.com/ff137)
- upgrade packaging to latest [\#2334](https://github.com/hyperledger/aries-cloudagent-python/pull/2334) [ff137](https://github.com/ff137)
- chore: update PyYAML [\#2329](https://github.com/hyperledger/aries-cloudagent-python/pull/2329) [dbluhm](https://github.com/dbluhm)
- chore(deps): Bump aiohttp from 3.8.4 to 3.8.5 in /demo/playground/scripts dependencies [\#2325](https://github.com/hyperledger/aries-cloudagent-python/pull/2325) [dependabot bot](https://github.com/dependabot bot)
- ⬆️ upgrade marshmallow to latest [\#2322](https://github.com/hyperledger/aries-cloudagent-python/pull/2322) [ff137](https://github.com/ff137)
- fix: use python 3.9 in run_docker [\#2291](https://github.com/hyperledger/aries-cloudagent-python/pull/2291) [dbluhm](https://github.com/dbluhm)
- BREAKING!: drop python 3.6 support [\#2247](https://github.com/hyperledger/aries-cloudagent-python/pull/2247) [dbluhm](https://github.com/dbluhm)
- Minor revisions to the README.md and DevReadMe.md [\#2272](https://github.com/hyperledger/aries-cloudagent-python/pull/2272) [swcurran](https://github.com/swcurran)
- ACA-Py Administrative Updates
- Updating Maintainers list to be accurate and using the TOC format [\#2258](https://github.com/hyperledger/aries-cloudagent-python/pull/2258) [swcurran](https://github.com/swcurran)
- CI/CD and Developer Tools/Productivity Updates
- Cancel in-progress workflows when PR is updated [\#2303](https://github.com/hyperledger/aries-cloudagent-python/pull/2303) [andrewwhitehead](https://github.com/andrewwhitehead)
- ci: add gha for pr-tests [\#2058](https://github.com/hyperledger/aries-cloudagent-python/pull/2058) [dbluhm](https://github.com/dbluhm)
- Add devcontainer for ACA-Py [\#2267](https://github.com/hyperledger/aries-cloudagent-python/pull/2267) [usingtechnology](https://github.com/usingtechnology)
- Docker images and GHA for publishing images help wanted [\#2076](https://github.com/hyperledger/aries-cloudagent-python/pull/2076) [dbluhm](https://github.com/dbluhm)
- ci: test additional versions of python nightly [\#2059](https://github.com/hyperledger/aries-cloudagent-python/pull/2059) [dbluhm](https://github.com/dbluhm)
- Release management pull requests
- 0.9.0-rc0 [\#2338](https://github.com/hyperledger/aries-cloudagent-python/pull/2338) [swcurran](https://github.com/swcurran)

# 0.8.2

## June 29, 2023
Expand Down
162 changes: 162 additions & 0 deletions IndySDKtoAskarMigration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Migrating from Indy SDK to Askar

The document summarizes why the [Indy SDK] is being deprecated, it's replacement
([Aries Askar] and the "shared components"), how to use [Aries Askar in a new
ACA-Py deployment](#new-aca-py-deployments), and the [migration
process](#migrating-existing-indy-sdk-aca-py-deployments-to-askar) for an ACA-Py
instance that is already deployed using the Indy SDK.

## The Time Has Come! Archiving Indy SDK

Yes, it’s time. Indy SDK needs to be archived! In this article we’ll explain why
this change is needed, why Aries Askar is a faster, better replacement, and how
to transition your Indy SDK-based ACA-Py deployment to Askar as soon as
possible.

[Indy SDK]: https://github.com/hyperledger/indy-sdk
[Aries Askar]: https://github.com/hyperledger/aries-askar

### History of Indy SDK

Indy SDK has been the basis of [Hyperledger Indy] and [Hyperledger Aries] clients
accessing Indy networks for a long time. It has done an excellent job at exactly
what you might imagine: being the SDK that enables clients to leverage the
capabilities of a Hyperledger Indy ledger.

Its continued use has been all the more remarkable given that the last published
release of the Indy SDK was in 2020. This speaks to the **quality of the
implementation** — it just kept getting used, doing what it was supposed to do,
and without major bugs, vulnerabilities or demands for new features.

However, the architecture of Indy SDK has **critical bottlenecks**. Most
notably, as load increases, Indy SDK performance drops. And with Indy-based
ecosystems flourishing and loads exponentially increasing, this means the
Aries/Indy community needed to make a change.

[Hyperledger Indy]: https://www.hyperledger.org/projects/hyperledger-indy
[Hyperledger Aries]: https://www.hyperledger.org/projects/aries

### Aries Askar and the Shared Components

The replacement for the Indy SDK is a set of **four components**, each replacing
a part of Indy SDK. (In retrospect, Indy SDK ought to have been split up this
way from the start.)

The components are:

1. **[Aries Askar]**: the replacement for the “indy-wallet” part of Indy SDK.
Askar is a key management service, handling the creation and use of private
keys managed by Aries agents. It’s also the secure storage for DIDs,
verifiable credentials, and data used by issuers of verifiable credentials
for signing. As the Aries moniker indicates, Askar is suitable for use with
any Aries agent, and for managing any keys, whether for use with Indy or any
other Verifiable Data Registry (VDR).
2. **[Indy VDR]**: the interface to publishing to and retrieving data from
Hyperledger Indy networks. Indy VDR is scoped at the appropriate level for
any client application using Hyperledger Indy networks.
3. **[CredX]**: a Rust implementation of AnonCreds that evolved from the Indy
SDK implementation. CredX is within the [indy-shared-rs] repository. It has
significant performance enhancements over the version in the Indy SDK,
particularly for Issuers.
4. **[Hyperledger AnonCreds]**: a newer implementation of AnonCreds that is
“ledger-agnostic” — it can be used with Hyperledger Indy and any other
suitable verifiable data registry.

In ACA-Py, we are currently using CredX, but will be moving to Hyperledger
AnonCreds soon.

[Indy VDR]: https://github.com/hyperledger/indy-vdr
[CredX]: https://github.com/hyperledger/indy-shared-rs
[indy-shared-rs]: https://github.com/hyperledger/indy-shared-rs
[Hyperledger AnonCreds]: https://github.com/hyperledger/anoncreds-rs

If you’re involved in the community, you’ll know we’ve been planning this
replacement for almost three years. The first release of the Aries Askar and
related components was in 2021. At the end of 2022 there was a concerted effort
to eliminate the Indy SDK by creating migration scripts, and removing the Indy
SDK from various tools in the community (the Indy CLI, the Indy Test Automation
pipeline, and so on). This step is to finish the task.

### Performance

What’s the performance and stability of the replacement? In short, it’s
**dramatically better**. Overall Aries Askar performance is faster, and as the
load increases the performance remains constant. Combined with added flexibility
and modularization, the community is very positive about the change.

## New ACA-Py Deployments

If you are new to ACA-Py, the instructions are easy. Use Aries Askar and the
shared components from the start. To do that, simply make sure that you are
using the `--wallet-type askar` configuration parameter. You will automatically
be using all of the shared components.

As of release 0.9.0, you will get a deprecation warning when you start ACA-Py
with the Indy SDK. Switch to Aries Askar to eliminate that warning.

## Migrating Existing Indy SDK ACA-Py Deployments to Askar

If you have an existing deployment, in changing the `--wallet-type`
configuration setting, your database must be migrated from the Indy SDK format
to Aries Askar format. In order to facilitate the migration, an Indy SDK to
Askar migration script has been published in the [aries-acapy-tools] repository.
There is lots of information in that repository about the migration tool and how
to use it. The following is a summary of the steps you will have to perform. Of
course, all deployments are a little (or a lot!) different, and your exact steps
will be dependent on where and how you have deployed ACA-Py.

[aries-acapy-tools]: https://github.com/hyperledger/aries-acapy-tools

Note that in these steps you will have to take your ACA-Py instance offline, so
scheduling the maintenance must be a part of your migration plan. You will also
want to script the entire process so that downtime and risk of manual mistakes
are minimized.

We hope that you have one or two test environments (e.g., Dev and Test) to run
through these steps before upgrading your production deployment. As well, it is
good if you can make a copy of your production database and test the migration
on the real (copy) database before the actual upgrade.

* Prepare a way to run the Askar Upgrade script from the [aries-acapy-tools]
repository. For example, you might want to prepare a container that you can
run in the same environment that you run ACA-Py (e.g., within Kubernetes or
OpenShift).
* Shutdown your ACA-Py instance.
* Backup the existing wallet using the usual tools you have for backing up the
database.
* If you are running in a cloud native environment such as Kubernetes, deploy
the Askar Upgrade container, and as needed, update the network policies to
allow the Askar Upgrade container to connect with the wallet database
* Run the `askar-upgrade` script. For example:

``` bash
askar-upgrade \
--strategy dbpw \
--uri postgres://<username>:<password>@<hostname>:<port>/<dbname> \
--wallet-name <wallet name> \
--wallet-key <wallet key>
```

* Switch the ACA-Py instance's `--wallet-type` configuration setting to `askar`
* Start up the ACA-Py instances.
* Trouble? Restore the initial database and revert the `--wallet-type` change
to rollback to the pre-migration state.
* Check the data.
* Test the deployment.

It is very important that the Askar Upgrade script has direct access to the
database. In our very first upgrade attempt, we ran the Upgrade Askar script
from a container running outside of our container orchestration platform
(OpenShift) using port forwarding. The script ran EXTREMELY slowly, taking
literally hours to run before we finally stopped it. Once we ran the script
inside the OpenShift environment, the script ran (for the same database) in
about 7 minutes. The entire app downtime was less than 20 minutes.

## Questions?

If you have questions, comments, or suggestions about the upgrade process,
please use the Aries Cloud Agent Python channel on [Hyperledger Discord], or
submit a [GitHub issue to the ACA-Py repository].

[Hyperledger Discord]: https://discord.gg/hyperledger
[GitHub issue to the ACA-Py repository]: https://github.com/hyperledger/aries-cloudagent-python/issues
Loading

0 comments on commit ab16699

Please sign in to comment.