Skip to content

Commit eca91e9

Browse files
authored
Merge branch 'main' into fix/respect-auto-verify-pres-v2
2 parents 154133a + dd57c2e commit eca91e9

18 files changed

Lines changed: 437 additions & 37 deletions

File tree

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ build
66
docs
77
dist
88
test-reports
9-
.python-version
9+
.python-version
10+
docker
11+
env
File renamed without changes.
File renamed without changes.
File renamed without changes.

.github/workflows/integrationtests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
with:
1818
path: acapy
1919
#- name: run-von-network
20-
# uses: ./acapy/actions/run-von-network
20+
# uses: ./acapy/.github/actions/run-von-network
2121
#- name: run-indy-tails-server
22-
# uses: ./acapy/actions/run-indy-tails-server
22+
# uses: ./acapy/.github/actions/run-indy-tails-server
2323
- name: run-integration-tests
24-
uses: ./acapy/actions/run-integration-tests
24+
uses: ./acapy/.github/actions/run-integration-tests
2525
# to run with a specific set of tests include the following parameter:
2626
# with:
2727
# TEST_SCOPE: "-t @T001-RFC0037"

.github/workflows/publish-indy.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Publish ACA-Py Image (Indy)
2+
run-name: Publish ACA-Py ${{ inputs.tag || github.event.release.tag_name }} Image (Indy ${{ inputs.indy_version || '1.16.0' }})
3+
on:
4+
release:
5+
types: [released]
6+
7+
workflow_dispatch:
8+
inputs:
9+
indy_version:
10+
description: 'Indy SDK Version'
11+
required: true
12+
default: 1.16.0
13+
type: string
14+
tag:
15+
description: 'Image tag'
16+
required: true
17+
type: string
18+
19+
# Note:
20+
# - ACA-Py with Indy SDK image builds do not include support for the linux/arm64 platform.
21+
# - See notes below for details.
22+
23+
env:
24+
INDY_VERSION: ${{ inputs.indy_version || '1.16.0' }}
25+
26+
jobs:
27+
publish-image:
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
python-version: ['3.6', '3.9']
32+
33+
name: Publish ACA-Py Image (Indy)
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout Code
37+
uses: actions/checkout@v3
38+
39+
- name: Gather image info
40+
id: info
41+
run: |
42+
echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
43+
44+
- name: Cache Docker layers
45+
uses: actions/cache@v3
46+
with:
47+
path: /tmp/.buildx-cache
48+
key: ${{ runner.os }}-buildx-${{ github.sha }}
49+
restore-keys: |
50+
${{ runner.os }}-buildx-
51+
52+
- name: Set up Docker Buildx
53+
uses: docker/setup-buildx-action@v2
54+
55+
- name: Log in to the GitHub Container Registry
56+
uses: docker/login-action@v2
57+
with:
58+
registry: ghcr.io
59+
username: ${{ github.repository_owner }}
60+
password: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- name: Setup Image Metadata
63+
id: meta
64+
uses: docker/metadata-action@v4
65+
with:
66+
images: |
67+
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
68+
tags: |
69+
type=raw,value=py${{ matrix.python-version }}-indy-${{ env.INDY_VERSION }}-${{ inputs.tag || github.event.release.tag_name }}
70+
71+
- name: Build and Push Image to ghcr.io
72+
uses: docker/build-push-action@v3
73+
with:
74+
push: true
75+
context: .
76+
file: docker/Dockerfile.indy
77+
tags: ${{ steps.meta.outputs.tags }}
78+
labels: ${{ steps.meta.outputs.labels }}
79+
target: main
80+
build-args: |
81+
python_version=${{ matrix.python-version }}
82+
indy_version=${{ env.INDY_VERSION }}
83+
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
84+
cache-from: type=local,src=/tmp/.buildx-cache
85+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
86+
# Images do not include support for the linux/arm64 platform due to a known issue compiling the postgres plugin
87+
# - https://github.com/hyperledger/indy-sdk/issues/2445
88+
# There is a pending PR to fix this issue here; https://github.com/hyperledger/indy-sdk/pull/2453
89+
platforms: linux/amd64,linux/386
90+
91+
# Temp fix
92+
# https://github.com/docker/build-push-action/issues/252
93+
# https://github.com/moby/buildkit/issues/1896
94+
- name: Move cache
95+
run: |
96+
rm -rf /tmp/.buildx-cache
97+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

.github/workflows/publish.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Publish ACA-Py Image
2+
run-name: Publish ACA-Py ${{ inputs.tag || github.event.release.tag_name }} Image
3+
on:
4+
release:
5+
types: [released]
6+
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Image tag'
11+
required: true
12+
type: string
13+
14+
jobs:
15+
publish-image:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ['3.6', '3.9']
20+
21+
name: Publish ACA-Py Image
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Code
25+
uses: actions/checkout@v3
26+
27+
- name: Gather image info
28+
id: info
29+
run: |
30+
echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
31+
32+
- name: Cache Docker layers
33+
uses: actions/cache@v3
34+
with:
35+
path: /tmp/.buildx-cache
36+
key: ${{ runner.os }}-buildx-${{ github.sha }}
37+
restore-keys: |
38+
${{ runner.os }}-buildx-
39+
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v2
42+
43+
- name: Log in to the GitHub Container Registry
44+
uses: docker/login-action@v2
45+
with:
46+
registry: ghcr.io
47+
username: ${{ github.repository_owner }}
48+
password: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: Setup Image Metadata
51+
id: meta
52+
uses: docker/metadata-action@v4
53+
with:
54+
images: |
55+
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
56+
tags: |
57+
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
58+
59+
- name: Build and Push Image to ghcr.io
60+
uses: docker/build-push-action@v3
61+
with:
62+
push: true
63+
context: .
64+
file: docker/Dockerfile
65+
tags: ${{ steps.meta.outputs.tags }}
66+
labels: ${{ steps.meta.outputs.labels }}
67+
target: main
68+
build-args: |
69+
python_version=${{ matrix.python-version }}
70+
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
71+
cache-from: type=local,src=/tmp/.buildx-cache
72+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
73+
platforms: linux/amd64,linux/arm64,linux/386
74+
75+
# Temp fix
76+
# https://github.com/docker/build-push-action/issues/252
77+
# https://github.com/moby/buildkit/issues/1896
78+
- name: Move cache
79+
run: |
80+
rm -rf /tmp/.buildx-cache
81+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

ContainerImagesAndGithubActions.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Container Images and Github Actions
2+
3+
Aries Cloud Agent - Python is most frequently deployed using containers. From
4+
the first release of ACA-Py up through 0.7.4, much of the community has built
5+
their Aries stack using the container images graciously provided by BC Gov and
6+
hosted through their `bcgovimages` docker hub account. These images have been
7+
critical to the adoption of not only ACA-Py but also Hyperledger Aries and SSI
8+
more generally.
9+
10+
Recognizing how critical these images are to the success of ACA-Py and
11+
consistent with Hyperledger's commitment to open collaboration, container images
12+
are now built and published directly from the Aries Cloud Agent - Python project
13+
repository and made available through the [Github Packages Container
14+
Registry](https://ghcr.io).
15+
16+
17+
## Image
18+
19+
This project builds and publishes the `ghcr.io/hyperledger/aries-cloudagent-python` image.
20+
Multiple variants are available; see [Tags](#tags).
21+
22+
### Tags
23+
24+
ACA-Py is a foundation for building decentralized identity applications; to this
25+
end, there are multiple variants of ACA-Py built to suit the needs of a variety
26+
of environments and workflows. There are currently two main variants:
27+
28+
- "Standard" - The default configuration of ACA-Py, including:
29+
- Aries Askar for secure storage
30+
- Indy VDR for Indy ledger communication
31+
- Indy Shared Libraries for AnonCreds
32+
- "Indy" - The legacy configuration of ACA-Py, including:
33+
- Indy SDK Wallet for secure storage
34+
- Indy SDK Ledger for Indy ledger communication
35+
- Indy SDK for AnonCreds
36+
37+
These two image variants are largely distinguished by providers for Indy Network
38+
and AnonCreds support. The Standard variant is recommended for new projects.
39+
Migration from an Indy based image (whether the new Indy image variant or the
40+
original BC Gov images) to the Standard image is outside of the scope of this
41+
document.
42+
43+
The ACA-Py images built by this project are tagged to indicate which of the
44+
above variants it is. Other tags may also be generated for use by developers.
45+
46+
Below is a table of all generated images and their tags:
47+
48+
Tag | Variant | Example | Description |
49+
------------------------|----------|--------------------------|-------------------------------------------------------------------------------------------------|
50+
py3.6-X.Y.Z | Standard | py3.6-0.7.4 | Standard image variant built on Python 3.6 for ACA-Py version X.Y.Z |
51+
py3.7-X.Y.Z | Standard | py3.7-0.7.4 | Standard image variant built on Python 3.7 for ACA-Py version X.Y.Z |
52+
py3.8-X.Y.Z | Standard | py3.8-0.7.4 | Standard image variant built on Python 3.8 for ACA-Py version X.Y.Z |
53+
py3.9-X.Y.Z | Standard | py3.9-0.7.4 | Standard image variant built on Python 3.9 for ACA-Py version X.Y.Z |
54+
py3.10-X.Y.Z | Standard | py3.10-0.7.4 | Standard image variant built on Python 3.10 for ACA-Py version X.Y.Z |
55+
py3.7-indy-A.B.C-X.Y.Z | Indy | py3.7-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.7 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |
56+
py3.8-indy-A.B.C-X.Y.Z | Indy | py3.8-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.8 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |
57+
py3.9-indy-A.B.C-X.Y.Z | Indy | py3.9-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.9 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |
58+
py3.10-indy-A.B.C-X.Y.Z | Indy | py3.10-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.10 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |
59+
60+
### Image Comparison
61+
62+
There are several key differences that should be noted between the two image
63+
variants and between the BC Gov ACA-Py images.
64+
65+
- Standard Image
66+
- Based on slim variant of Debian
67+
- Does **NOT** include `libindy`
68+
- Default user is `aries`
69+
- Uses container's system python environment rather than `pyenv`
70+
- Askar and Indy Shared libraries are installed as dependencies of ACA-Py through pip from pre-compiled binaries included in the python wrappers
71+
- Built from repo contents
72+
- Indy Image
73+
- Based on slim variant of Debian
74+
- Built from multi-stage build step (`indy-base` in the Dockerfile) which includes Indy dependencies; this could be replaced with an explicit `indy-python` image from the Indy SDK repo
75+
- Includes `libindy` but does **NOT** include the Indy CLI
76+
- Default user is `indy`
77+
- Uses container's system python environment rather than `pyenv`
78+
- Askar and Indy Shared libraries are installed as dependencies of ACA-Py through pip from pre-compiled binaries included in the python wrappers
79+
- Built from repo contents
80+
- Includes Indy postgres storage plugin
81+
- `bcgovimages/aries-cloudagent`
82+
- (Usually) based on Ubuntu
83+
- Based on `von-image`
84+
- Default user is `indy`
85+
- Includes `libindy` and Indy CLI
86+
- Uses `pyenv`
87+
- Askar and Indy Shared libraries built from source
88+
- Built from ACA-Py python package uploaded to PyPI
89+
- Includes Indy postgres storage plugin
90+
91+
## Github Actions
92+
93+
- Tests (`.github/workflows/tests.yml`) - A reusable workflow that runs tests
94+
for the Standard ACA-Py variant for a given python version.
95+
- Tests (Indy) (`.github/workflows/tests-indy.yml`) - A reusable workflow that
96+
runs tests for the Indy ACA-Py variant for a given python and indy version.
97+
- PR Tests (`.github/workflows/pr-tests.yml`) - Run on pull requests; runs tests
98+
for the Standard and Indy ACA-Py variants for a "default" python version.
99+
Check this workflow for the current default python and Indy versions in use.
100+
- Nightly Tests (`.github/workflows/nightly-tests.yml`) - Run nightly; runs
101+
tests for the Standard and Indy ACA-Py variants for all currently supported
102+
python versions. Check this workflow for the set of currently supported
103+
versions and Indy version(s) in use.
104+
- Publish (`.github/workflows/publish.yml`) - Run on new release published or
105+
when manually triggered; builds and pushes the Standard ACA-Py variant to the
106+
Github Container Registry.
107+
- Publish (Indy) (`.github/workflows/publish-indy.yml`) - Run on new release
108+
published or when manually triggered; builds and pushes the Indy ACA-Py
109+
variant to the Github Container Registry.
110+
- Integration Tests (`.github/workflows/integrationtests.yml`) - Run on pull
111+
requests (to the hyperledger fork only); runs BDD integration tests.
112+
- Black Format (`.github/workflows/blackformat.yml`) - Run on pull requests;
113+
checks formatting of files modified by the PR.
114+
- CodeQL (`.github/workflows/codeql.yml`) - Run on pull requests; performs
115+
CodeQL analysis.
116+
- Python Publish (`.github/workflows/pythonpublish.yml`) - Run on release
117+
created; publishes ACA-Py python package to PyPI.
118+
- PIP Audit (`.github/workflows/pipaudit.yml`) - Run when manually triggered;
119+
performs pip audit.

aries_cloudagent/protocols/present_proof/dif/pres_exch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ class Meta:
837837
fmt = fields.Str(
838838
description="Format",
839839
required=False,
840-
default="ldp_vp",
840+
default="ldp_vc",
841841
data_key="format",
842842
)
843843
path = fields.Str(

aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ async def merge(
13771377
if f"{cred_id}-{cred_id}" not in dict_of_descriptors:
13781378
descriptor_map = InputDescriptorMapping(
13791379
id=desc_id,
1380-
fmt="ldp_vp",
1380+
fmt="ldp_vc",
13811381
path=(f"$.verifiableCredential[{dict_of_creds[cred_id]}]"),
13821382
)
13831383
descriptors.append(descriptor_map)

0 commit comments

Comments
 (0)