Skip to content

Commit a276ee7

Browse files
authored
Merge branch 'main' into fix/dif-claim-format-designation
2 parents 31e10a2 + 5c9ce16 commit a276ee7

54 files changed

Lines changed: 904 additions & 342 deletions

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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
name: lint
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-python@v2
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.9"
1517
- name: Black Code Formatter Check
1618
uses: psf/black@stable

.github/workflows/codeql.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')
1414

15+
permissions:
16+
security-events: write
17+
1518
steps:
1619
- name: Checkout repository
17-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
1821

1922
# Initializes the CodeQL tools for scanning.
2023
- name: Initialize CodeQL
21-
uses: github/codeql-action/init@v1
24+
uses: github/codeql-action/init@v2
2225
with:
2326
languages: python
2427

2528
- name: Perform CodeQL Analysis
26-
uses: github/codeql-action/analyze@v1
29+
uses: github/codeql-action/analyze@v2

.github/workflows/integrationtests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')
1414
steps:
1515
- name: checkout-acapy
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717
with:
1818
path: acapy
1919
#- name: run-von-network

.github/workflows/pythonpublish.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v1
12-
- name: Set up Python
13-
uses: actions/setup-python@v1
14-
with:
15-
python-version: '3.x'
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine
20-
- name: Build and publish
21-
env:
22-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24-
run: |
25-
python setup.py sdist bdist_wheel
26-
twine upload dist/*
11+
- uses: actions/checkout@v3
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: "3.x"
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

.github/workflows/tests-indy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
${{ runner.os }}-buildx-test-
3030
3131
- name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v1
32+
uses: docker/setup-buildx-action@v2
3333

3434
- name: Build test image
3535
uses: docker/build-push-action@v3

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
hooks:
1313
- id: black
1414
stages: [commit]
15-
- repo: https://gitlab.com/pycqa/flake8
15+
- repo: https://github.com/pycqa/flake8.git
1616
rev: 3.9.0
1717
hooks:
1818
- id: flake8

DIDMethods.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# DID methods in ACA-Py
2+
Decentralized Identifiers, or DIDs, are URIs that point to documents that describe cryptographic primitives and protocols used in decentralized identity management.
3+
DIDs include methods that describe where and how documents can be retrieved.
4+
DID methods support specific types of keys and may or may not require the holder to specify the DID itself.
5+
6+
ACA-Py provides a `DIDMethods` registry holding all the DID methods supported for storage in a wallet
7+
8+
> :warning: Askar and InMemory are the only wallets supporting this registry.
9+
10+
## Registering a DID method
11+
By default, ACA-Py supports `did:key` and `did:sov`.
12+
Plugins can register DID additional methods to make them available to holders.
13+
Here's a snippet adding support for `did:web` to the registry from a plugin `setup` method.
14+
15+
```python=
16+
WEB = DIDMethod(
17+
name="web",
18+
key_types=[ED25519, BLS12381G2],
19+
rotation=True,
20+
holder_defined_did=HolderDefinedDid.REQUIRED # did:web is not derived from key material but from a user-provided respository name
21+
)
22+
23+
async def setup(context: InjectionContext):
24+
methods = context.inject(DIDMethods)
25+
methods.register(WEB)
26+
```
27+
28+
## Creating a DID
29+
30+
`POST /wallet/did/create` can be provided with parameters for any registered DID method. Here's a follow-up to the
31+
`did:web` method example:
32+
33+
```json=
34+
{
35+
"method": "web",
36+
"options": {
37+
"did": "did:web:doma.in",
38+
"key_type": "ed25519"
39+
}
40+
}
41+
```
42+
43+
## Resolving DIDs
44+
45+
For specifics on how DIDs are resolved in ACA-Py, see: [DID Resolution](DIDResolution.md).

Mediation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
* `--open-mediation` - Instructs mediators to automatically grant all incoming mediation requests.
1717
* `--mediator-invitation` - Receive invitation, send mediation request and set as default mediator.
18+
* `--mediator-connections-invite` - Connect to mediator through a connection invitation. If not specified, connect using an OOB invitation.
1819
* `--default-mediator-id` - Set pre-existing mediator as default mediator.
1920
* `--clear-default-mediator` - Clear the stored default mediator.
2021

@@ -72,4 +73,4 @@ See [Aries RFC 0211: Coordinate Mediation Protocol](https://github.com/hyperledg
7273
## Using a Mediator
7374

7475
After establishing a connection with a mediator also having mediation granted, you can use that mediator id for future did_comm connections.
75-
When creating, receiving or accepting a invitation intended to be Mediated, you provide `mediation_id` with the desired mediator id. if using a single mediator for all future connections, You can set a default mediation id. If no mediation_id is provided the default mediation id will be used instead.
76+
When creating, receiving or accepting a invitation intended to be Mediated, you provide `mediation_id` with the desired mediator id. if using a single mediator for all future connections, You can set a default mediation id. If no mediation_id is provided the default mediation id will be used instead.

aries_cloudagent/admin/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ async def setup_context(request: web.Request, handler):
433433
)
434434

435435
server_routes = [
436-
web.get("/", self.redirect_handler, allow_head=False),
436+
web.get("/", self.redirect_handler, allow_head=True),
437437
web.get("/plugins", self.plugins_handler, allow_head=False),
438438
web.get("/status", self.status_handler, allow_head=False),
439439
web.get("/status/config", self.config_handler, allow_head=False),

aries_cloudagent/config/argparse.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,17 @@ def add_arguments(self, parser: ArgumentParser):
10391039
action="store_true",
10401040
env_var="ACAPY_PUBLIC_INVITES",
10411041
help=(
1042-
"Send invitations out, and receive connection requests, "
1042+
"Send invitations out using the public DID for the agent, "
1043+
"and receive connection requests solicited by invitations "
1044+
"which use the public DID. Default: false."
1045+
),
1046+
)
1047+
parser.add_argument(
1048+
"--requests-through-public-did",
1049+
action="store_true",
1050+
env_var="ACAPY_REQUESTS_THROUGH_PUBLIC_DID",
1051+
help=(
1052+
"Allow agent to receive unsolicited connection requests, "
10431053
"using the public DID for the agent. Default: false."
10441054
),
10451055
)
@@ -1134,6 +1144,13 @@ def get_settings(self, args: Namespace) -> dict:
11341144
settings["monitor_forward"] = args.monitor_forward
11351145
if args.public_invites:
11361146
settings["public_invites"] = True
1147+
if args.requests_through_public_did:
1148+
if not args.public_invites:
1149+
raise ArgsParseError(
1150+
"--public-invites is required to use "
1151+
"--requests-through-public-did"
1152+
)
1153+
settings["requests_through_public_did"] = True
11371154
if args.timing:
11381155
settings["timing.enabled"] = True
11391156
if args.timing_log:

0 commit comments

Comments
 (0)