Skip to content

Commit 3698b2a

Browse files
committed
Merge remote-tracking branch 'origin/0.12.lts' into feat/indy-besu-cpqd
2 parents b6211a5 + a1956da commit 3698b2a

77 files changed

Lines changed: 1736 additions & 1078 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/blackformat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: Black Code Formatter Check
1818
# The version of black should be adjusted at the same time dev
1919
# dependencies are updated.
20-
uses: psf/black@24.4.0
20+
uses: psf/black@24.4.2

.github/workflows/publish.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ jobs:
5151
uses: actions/checkout@v4
5252
with:
5353
ref: ${{ inputs.ref || '' }}
54-
55-
- name: Gather image info
56-
id: info
57-
run: |
58-
echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
59-
6054
- name: Cache Docker layers
6155
uses: actions/cache@v4
6256
with:
@@ -72,15 +66,15 @@ jobs:
7266
uses: docker/login-action@v3
7367
with:
7468
registry: ghcr.io
75-
username: ${{ github.repository_owner }}
76-
password: ${{ secrets.GITHUB_TOKEN }}
69+
username: hyperledger
70+
password: ${{ secrets.HYPERLEDGER_GHCR_PAT }}
7771

7872
- name: Setup Image Metadata
7973
id: meta
8074
uses: docker/metadata-action@v5
8175
with:
8276
images: |
83-
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
77+
ghcr.io/hyperledger/aries-cloudagent-python
8478
tags: |
8579
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
8680

.github/workflows/pythonpublish.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@ on:
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10+
environment:
11+
name: pypi
12+
url: https://pypi.org/p/aries-cloudagent
13+
permissions:
14+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1015
steps:
1116
- uses: actions/checkout@v4
1217
- name: Set up Python
1318
uses: actions/setup-python@v5
1419
with:
15-
python-version: "3.x"
16-
- name: Install dependencies
20+
python-version: "3.9"
21+
- name: Install build and publish dependencies
1722
run: |
1823
python -m pip install --upgrade pip
1924
pip install setuptools wheel twine poetry
2025
- name: Build and publish
21-
env:
22-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2426
run: |
2527
poetry build
26-
twine upload dist/*
28+
- name: Publish package distributions to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
with:
31+
password: ${{ secrets.PYPI_HYPERLEDGER }}

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ repos:
1919
- id: ruff
2020
stages: [commit]
2121
args: [--fix, --exit-non-zero-on-fix]
22+
# Run the formatter
23+
- id: ruff-format
24+
stages: [commit]

CHANGELOG.md

Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,122 @@
11
# Aries Cloud Agent Python Changelog
22

3-
## 0.12.1rc1
3+
## 0.12.6
4+
5+
### March 13, 2025
6+
7+
This patch release addresses a bug in the handling connection reuse in multitenancy environments. This is a backport of the PR [fix: connection reuse with multi-tenancy #3543](https://github.com/openwallet-foundation/acapy/pull/3543). This fixes the issue when using multi-tenancy, calls to `POST /out-of-band/receive-invitation?use_existing_connection=true` failing with a record not found error, despite connection reuse actually being completed in the background.
8+
9+
### 0.12.6 Breaking Changes
10+
11+
There are no breaking changes in this release.
12+
13+
#### 0.12.6 Categorized List of Pull Requests
14+
15+
- Multitenancy Fixes
16+
- fix: cherry-pick fixes from main to 0.12.lts [\#3578](https://github.com/openwallet-foundation/acapy/pull/3578) [thiagoromanos](https://github.com/thiagoromanos)
17+
18+
- Release management pull requests:
19+
- 0.12.6 [\#3583](https://github.com/openwallet-foundation/acapy/pull/3583) [swcurran](https://github.com/swcurran)
20+
21+
## 0.12.5
22+
23+
### March 6, 2025
24+
25+
This patch release addresses a bug in the publishing of AnonCreds revocation entries that caused the ledger and issuer wallet to become out of sync. As a result, revoked credentials were not being correctly flagged as revoked when presented. Previously, this issue was mitigated by an automatic “sync-revocation” process, which generally resolved the problem. However, we recently identified scenarios where the presence of an Indy Endorser in the revocation publication flow caused the “sync-revocation” process to fail silently.
26+
27+
This patch resolves that issue. Once applied, if a revocation batch results in an out-of-sync state, the “sync-revocation” process will automatically run to correct it.
28+
29+
For more details, see [Issue 3546](https://github.com/openwallet-foundation/acapy/issues/3546).
30+
31+
### 0.12.5 Breaking Changes
32+
33+
There are no breaking changes in this release.
34+
35+
#### 0.12.5 Categorized List of Pull Requests
36+
37+
- AnonCreds Revocation Fixes
38+
- 0.12.lts Patch the fix_ledger_entry improvements [\#3558](https://github.com/openwallet-foundation/acapy/pull/3558) [jamshale](https://github.com/jamshale)
39+
- 0.12.lts Fix revocation accum sync when endorsement txn fails (#3547) [\#3554](https://github.com/openwallet-foundation/acapy/pull/3554) [jamshale](https://github.com/jamshale)
40+
41+
- Release management pull requests:
42+
- 0.12.5 [\#3560](https://github.com/openwallet-foundation/acapy/pull/3560) [swcurran](https://github.com/swcurran)
43+
44+
## 0.12.4
45+
46+
### January 30, 2025
47+
48+
A patch release to upgrade [Askar](https://github.com/openwallet-foundation/askar) to [0.4.3](https://github.com/openwallet-foundation/askar/releases/tag/v0.4.3) and fixes a problem with wallet names in a multitenant, single-wallet configuration.
49+
50+
Addresses the problem outlined in [#3471](https://github.com/openwallet-foundation/acapy/issues/3471) around profiles in multi-tenant/single wallet deployments. The update to Askar addresses an intermittent hang on startup, and a dependency change that can result in a substantial performance improvement in some cases. See issues: [openwallet-foundation/askar#350](https://github.com/openwallet-foundation/askar/pull/350), [openwallet-foundation/askar#351](https://github.com/openwallet-foundation/askar/pull/351), [openwallet-foundation/askar#354](https://github.com/openwallet-foundation/askar/pull/354). This [comment on one of the PRs](https://github.com/openwallet-foundation/askar/pull/350#issuecomment-2615727109) describes the scenario where a substantial performance improvement was seen as a result of the change in Askar.
51+
52+
### 0.12.4 Breaking Changes
53+
54+
There are no breaking changes in this release.
55+
56+
#### 0.12.4 Categorized List of Pull Requests
57+
58+
- Multitenant Single Wallet Configurations
59+
- 0.12 LTS: Askar upgrade and fix profile unique names [\#3475](https://github.com/openwallet-foundation/acapy/pull/3475)
60+
- Release management pull requests
61+
- 0.12.4 [\#3481](https://github.com/hyperledger/aries-cloudagent-python/pull/3481) [swcurran](https://github.com/swcurran)
62+
63+
## 0.12.3
64+
65+
### December 17, 2024
66+
67+
A patch release to add address a bug found in the Linked Data Verifiable Credential handling for multi-tenant holders. The bug was fixed in the main branch, [PR 3391 - BREAKING: VCHolder multitenant binding](https://github.com/openwallet-foundation/acapy/pull/3391), and with this release is backported to 0.12 Long Term Support branch. Prior to this release, holder credentials received into a tenant wallet were actually received into the multi-tenant admin wallet.
68+
69+
### 0.12.3 Breaking Changes
70+
71+
There are no breaking changes in this release.
72+
73+
#### 0.12.3 Categorized List of Pull Requests
74+
75+
- Multitenant LD-VC Holders
76+
- Patch PR 3391 - 0.12.lts [\#3396](https://github.com/openwallet-foundation/acapy/pull/3396)
77+
- Release management pull requests
78+
- 0.12.3 [\#3408](https://github.com/hyperledger/aries-cloudagent-python/pull/3408) [swcurran](https://github.com/swcurran)
79+
- 0.12.3rc0 [\#3406](https://github.com/hyperledger/aries-cloudagent-python/pull/3406) [swcurran](https://github.com/swcurran)
80+
81+
## 0.12.2
82+
83+
### August 2, 2024
84+
85+
A patch release to add the verification of a linkage between an inbound message and its associated connection (if any) before processing the message. Also adds some additional cleanup/fix PRs from the main branch (see list below) that might be useful for deployments currently using [Release 0.12.1](#0121) or [0.12.0](#0120).
86+
87+
### 0.12.2 Breaking Changes
88+
89+
There are no breaking changes in this release.
90+
91+
#### 0.12.2 Categorized List of Pull Requests
92+
93+
- Dependency update and release PR
94+
- [ PATCH ] 0.12.x with PR 3081 terse webhooks [\#3141](https://github.com/hyperledger/aries-cloudagent-python/pull/3141) [jamshale](https://github.com/jamshale)
95+
- Patch release 0.12.x [\#3121](https://github.com/hyperledger/aries-cloudagent-python/pull/3121) [jamshale](https://github.com/jamshale)
96+
- Release management pull requests
97+
- 0.12.2 [\#3145](https://github.com/hyperledger/aries-cloudagent-python/pull/3145) [swcurran](https://github.com/swcurran)
98+
- 0.12.2rc1 [\#3123](https://github.com/hyperledger/aries-cloudagent-python/pull/3123) [swcurran](https://github.com/swcurran)
99+
- PRs cherry-picked into [\#3121](https://github.com/hyperledger/aries-cloudagent-python/pull/3120) from the `main` branch:
100+
- fix: multiuse invites with did peer 4 [\#3112](https://github.com/hyperledger/aries-cloudagent-python/pull/3112) [dbluhm](https://github.com/dbluhm)
101+
- Check connection is ready in all connection required handlers [\#3095](https://github.com/hyperledger/aries-cloudagent-python/pull/3095) [jamshale](https://github.com/jamshale)
102+
- Add by_format to terse webhook for presentations [\#3081](https://github.com/hyperledger/aries-cloudagent-python/pull/3081) [ianco](https://github.com/ianco)
103+
- fix: respond to did:peer:1 with did:peer:4 [\#3050](https://github.com/hyperledger/aries-cloudagent-python/pull/3050) [dbluhm](https://github.com/dbluhm)
104+
- feat: soft binding for plugin flexibility [\#3010](https://github.com/hyperledger/aries-cloudagent-python/pull/3010) [dbluhm](https://github.com/dbluhm)
105+
- feat: inject profile and session [\#2997](https://github.com/hyperledger/aries-cloudagent-python/pull/2997) [dbluhm](https://github.com/dbluhm)
106+
- feat: external signature suite provider interface [\#2835](https://github.com/hyperledger/aries-cloudagent-python/pull/2835) [dbluhm](https://github.com/dbluhm)
107+
- fix(interop): overly strict validation [\#2943](https://github.com/hyperledger/aries-cloudagent-python/pull/2943) [dbluhm](https://github.com/dbluhm)
108+
109+
## 0.12.1
4110

5111
### April 26, 2024
6112

7-
Release 0.12.1rc1 is a small patch to cleanup some edge case issues in the handling of Out of Band invitations, revocation notification webhooks, and connection querying uncovered after the 0.12.0 release. Fixes and improvements were also made to the generation of ACA-Py's OpenAPI specifications.
113+
Release 0.12.1 is a small patch to cleanup some edge case issues in the handling of Out of Band invitations, revocation notification webhooks, and connection querying uncovered after the 0.12.0 release. Fixes and improvements were also made to the generation of ACA-Py's OpenAPI specifications.
8114

9-
### 0.12.1rc1 Breaking Changes
115+
### 0.12.1 Breaking Changes
10116

11117
There are no breaking changes in this release.
12118

13-
#### 0.12.1rc1 Categorized List of Pull Requests
119+
#### 0.12.1 Categorized List of Pull Requests
14120

15121
- Out of Band Invitations and Connection Establishment updates/fixes:
16122
- 🐛 Fix ServiceDecorator parsing in oob record handling [\#2910](https://github.com/hyperledger/aries-cloudagent-python/pull/2910) [ff137](https://github.com/ff137)
@@ -40,6 +146,7 @@ There are no breaking changes in this release.
40146
- Update GHA so that broken image links work on docs site - without breaking them on GitHub [\#2852](https://github.com/hyperledger/aries-cloudagent-python/pull/2852) [swcurran](https://github.com/swcurran)
41147

42148
- Dependencies and Internal Updates:
149+
- chore(deps): Bump psf/black from 24.4.0 to 24.4.2 in the all-actions group [\#2924](https://github.com/hyperledger/aries-cloudagent-python/pull/2924) [dependabot bot](https://github.com/dependabot bot)
43150
- fix: fixes a regression that requires a log file in multi-tenant mode [\#2918](https://github.com/hyperledger/aries-cloudagent-python/pull/2918) [amanji](https://github.com/amanji)
44151
- Update AnonCreds to 0.2.2 [\#2917](https://github.com/hyperledger/aries-cloudagent-python/pull/2917) [swcurran](https://github.com/swcurran)
45152
- chore(deps): Bump aiohttp from 3.9.3 to 3.9.4 dependencies python [\#2902](https://github.com/hyperledger/aries-cloudagent-python/pull/2902) [dependabot bot](https://github.com/dependabot bot)
@@ -49,6 +156,7 @@ There are no breaking changes in this release.
49156
- refactor: logging configs setup [\#2870](https://github.com/hyperledger/aries-cloudagent-python/pull/2870) [amanji](https://github.com/amanji)
50157

51158
- Release management pull requests:
159+
- 0.12.1 [\#2926](https://github.com/hyperledger/aries-cloudagent-python/pull/2926) [swcurran](https://github.com/swcurran)
52160
- 0.12.1rc1 [\#2921](https://github.com/hyperledger/aries-cloudagent-python/pull/2921) [swcurran](https://github.com/swcurran)
53161
- 0.12.1rc0 [\#2912](https://github.com/hyperledger/aries-cloudagent-python/pull/2912) [swcurran](https://github.com/swcurran)
54162

aries_cloudagent/admin/request_context.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ def __init__(
2121
self,
2222
profile: Profile,
2323
*,
24-
context: InjectionContext = None,
25-
settings: Mapping[str, object] = None,
26-
root_profile: Profile = None,
27-
metadata: dict = None
24+
context: Optional[InjectionContext] = None,
25+
settings: Optional[Mapping[str, object]] = None,
26+
root_profile: Optional[Profile] = None,
27+
metadata: Optional[dict] = None
2828
):
2929
"""Initialize an instance of AdminRequestContext."""
30-
self._context = (context or profile.context).start_scope("admin", settings)
30+
self._context = (context or profile.context).start_scope(settings)
3131
self._profile = profile
3232
self._root_profile = root_profile
3333
self._metadata = metadata
@@ -72,7 +72,7 @@ def transaction(self) -> ProfileSession:
7272
def inject(
7373
self,
7474
base_cls: Type[InjectType],
75-
settings: Mapping[str, object] = None,
75+
settings: Optional[Mapping[str, object]] = None,
7676
) -> InjectType:
7777
"""Get the provided instance of a given class identifier.
7878
@@ -89,7 +89,7 @@ def inject(
8989
def inject_or(
9090
self,
9191
base_cls: Type[InjectType],
92-
settings: Mapping[str, object] = None,
92+
settings: Optional[Mapping[str, object]] = None,
9393
default: Optional[InjectType] = None,
9494
) -> Optional[InjectType]:
9595
"""Get the provided instance of a given class identifier or default if not found.
@@ -111,7 +111,7 @@ def update_settings(self, settings: Mapping[str, object]):
111111

112112
@classmethod
113113
def test_context(
114-
cls, session_inject: dict = None, profile: Profile = None
114+
cls, session_inject: Optional[dict] = None, profile: Optional[Profile] = None
115115
) -> "AdminRequestContext":
116116
"""Quickly set up a new admin request context for tests."""
117117
ctx = AdminRequestContext(profile or IN_MEM.resolved.test_profile())

aries_cloudagent/askar/profile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
@property
5656
def name(self) -> str:
5757
"""Accessor for the profile name."""
58-
return self.opened.name
58+
return self.profile_id or self.opened.name
5959

6060
@property
6161
def store(self) -> Store:
@@ -114,11 +114,11 @@ def bind_providers(self):
114114
"aries_cloudagent.indy.credx.issuer.IndyCredxIssuer", ref(self)
115115
),
116116
)
117-
injector.bind_provider(
117+
injector.soft_bind_provider(
118118
VCHolder,
119119
ClassProvider(
120120
"aries_cloudagent.storage.vc_holder.askar.AskarVCHolder",
121-
ref(self),
121+
ClassProvider.Inject(Profile),
122122
),
123123
)
124124
if (

aries_cloudagent/askar/profile_anon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(
6262
@property
6363
def name(self) -> str:
6464
"""Accessor for the profile name."""
65-
return self.opened.name
65+
return self.profile_id or self.opened.name
6666

6767
@property
6868
def store(self) -> Store:

aries_cloudagent/config/injection_context.py

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ class InjectionContext(BaseInjector):
2121
ROOT_SCOPE = "application"
2222

2323
def __init__(
24-
self, *, settings: Mapping[str, object] = None, enforce_typing: bool = True
24+
self,
25+
*,
26+
settings: Optional[Mapping[str, object]] = None,
27+
enforce_typing: bool = True
2528
):
2629
"""Initialize a `ServiceConfig`."""
2730
self._injector = Injector(settings, enforce_typing=enforce_typing)
2831
self._scope_name = InjectionContext.ROOT_SCOPE
29-
self._scopes = []
3032

3133
@property
3234
def injector(self) -> Injector:
@@ -38,16 +40,6 @@ def injector(self, injector: Injector):
3840
"""Setter for scope-specific injector."""
3941
self._injector = injector
4042

41-
@property
42-
def scope_name(self) -> str:
43-
"""Accessor for the current scope name."""
44-
return self._scope_name
45-
46-
@scope_name.setter
47-
def scope_name(self, scope_name: str):
48-
"""Accessor for the current scope name."""
49-
self._scope_name = scope_name
50-
5143
@property
5244
def settings(self) -> Settings:
5345
"""Accessor for scope-specific settings."""
@@ -64,7 +56,7 @@ def update_settings(self, settings: Mapping[str, object]):
6456
self.injector.settings.update(settings)
6557

6658
def start_scope(
67-
self, scope_name: str, settings: Optional[Mapping[str, object]] = None
59+
self, settings: Optional[Mapping[str, object]] = None
6860
) -> "InjectionContext":
6961
"""Begin a new named scope.
7062
@@ -76,39 +68,15 @@ def start_scope(
7668
A new injection context representing the scope
7769
7870
"""
79-
if not scope_name:
80-
raise InjectionContextError("Scope name must be non-empty")
81-
if self._scope_name == scope_name:
82-
raise InjectionContextError("Cannot re-enter scope: {}".format(scope_name))
83-
for scope in self._scopes:
84-
if scope.name == scope_name:
85-
raise InjectionContextError(
86-
"Cannot re-enter scope: {}".format(scope_name)
87-
)
8871
result = self.copy()
89-
result._scopes.append(Scope(name=self.scope_name, injector=self.injector))
90-
result._scope_name = scope_name
9172
if settings:
9273
result.update_settings(settings)
9374
return result
9475

95-
def injector_for_scope(self, scope_name: str) -> Injector:
96-
"""Fetch the injector for a specific scope.
97-
98-
Args:
99-
scope_name: The unique scope identifier
100-
"""
101-
if scope_name == self.scope_name:
102-
return self.injector
103-
for scope in self._scopes:
104-
if scope.name == scope_name:
105-
return scope.injector
106-
return None
107-
10876
def inject(
10977
self,
11078
base_cls: Type[InjectType],
111-
settings: Mapping[str, object] = None,
79+
settings: Optional[Mapping[str, object]] = None,
11280
) -> InjectType:
11381
"""Get the provided instance of a given class identifier.
11482
@@ -125,7 +93,7 @@ def inject(
12593
def inject_or(
12694
self,
12795
base_cls: Type[InjectType],
128-
settings: Mapping[str, object] = None,
96+
settings: Optional[Mapping[str, object]] = None,
12997
default: Optional[InjectType] = None,
13098
) -> Optional[InjectType]:
13199
"""Get the provided instance of a given class identifier or default if not found.
@@ -145,5 +113,4 @@ def copy(self) -> "InjectionContext":
145113
"""Produce a copy of the injector instance."""
146114
result = copy.copy(self)
147115
result._injector = self.injector.copy()
148-
result._scopes = self._scopes.copy()
149116
return result

0 commit comments

Comments
 (0)