Skip to content

Commit

Permalink
Merge branch 'main' into feat/3126
Browse files Browse the repository at this point in the history
  • Loading branch information
jamshale authored Aug 20, 2024
2 parents 5f4ea6e + 4460981 commit d4fd3ab
Show file tree
Hide file tree
Showing 11 changed files with 171 additions and 166 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nigthly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
tag: ["nightly-${{needs.setup_and_check_pub.outputs.date}}", nightly]
with:
tag: ${{ matrix.tag }}
platforms: "linux/amd64"
platforms: "linux/amd64,linux/arm64"
23 changes: 17 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
platforms:
description: 'Platforms - Comma separated list of the platforms to support.'
required: true
default: linux/amd64
default: linux/amd64,linux/arm64
type: string
ref:
description: 'Optional - The branch, tag or SHA to checkout.'
Expand All @@ -26,7 +26,7 @@ on:
type: string
platforms:
required: true
default: linux/amd64
default: linux/amd64,linux/arm64
type: string
ref:
required: false
Expand All @@ -35,7 +35,7 @@ on:
env:
# linux/386 platform support has been disabled pending a permanent fix for https://github.com/hyperledger/aries-cloudagent-python/issues/2124
# PLATFORMS: ${{ inputs.platforms || 'linux/amd64,linux/arm64,linux/386' }}
PLATFORMS: ${{ inputs.platforms || 'linux/amd64' }}
PLATFORMS: ${{ inputs.platforms || 'linux/amd64,linux/arm64' }}

jobs:
publish-image:
Expand Down Expand Up @@ -103,14 +103,23 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
platforms: ${{ env.PLATFORMS }}

- name: Setup Image Metadata (BBS)
id: meta-bbs
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-bbs
tags: |
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
- name: Build and Push extended Image to ghcr.io
uses: docker/build-push-action@v5
with:
push: true
context: .
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-bbs.outputs.tags }}
labels: ${{ steps.meta-bbs.outputs.labels }}
target: main
build-args: |
python_version=${{ matrix.python-version }}
Expand All @@ -119,7 +128,9 @@ jobs:
acapy_reqs=[askar,bbs,didcommv2]
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
platforms: ${{ env.PLATFORMS }}
# Because of BBS, only linux/amd64 is supported for the extended image
# https://github.com/hyperledger/aries-cloudagent-python/issues/2124#issuecomment-2293569659
platforms: linux/amd64

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
40 changes: 24 additions & 16 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
Full access to an organized set of all of the ACA-Py documents is available at [https://aca-py.org](https://aca-py.org).
Check it out! It's much easier to navigate than this GitHub repo for reading the documentation.

:new: ACA-Py Plugins have their own store! Visit [https://plugins.aca-py.org](https://plugins.aca-py.org) to find ready-to-use functionality to add to your ACA-Py deployment, and to learn how to build your own plugins.

## Overview

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building Verifiable Credential (VC) ecosystems. It operates in the second and third layers of the [Trust Over IP framework (PDF)](https://trustoverip.org/wp-content/uploads/2020/05/toip_050520_primer.pdf) using [DIDComm messaging](https://github.com/hyperledger/aries-rfcs/tree/main/concepts/0005-didcomm) and [Hyperledger Aries](https://www.hyperledger.org/use/aries) protocols. The "cloud" in the name means that ACA-Py runs on servers (cloud, enterprise, IoT devices, and so forth), and is not designed to run on mobile devices.
Expand Down
50 changes: 17 additions & 33 deletions docs/features/PlugIns.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Deeper Dive: Aca-Py Plug-Ins
# Deeper Dive: ACA-Py Plug-Ins

## What's in a Plug-In and How does it Work?
ACA-Py plugins enable standardized extensibility without overloading the core ACA-Py code base. Plugins may be features that you create specific to your deployment, or that you deploy from the [ACA-Py Plugins "Store"](https://plugins.aca-py.org). Visit the Plugins Store to find all of the open source plugins that have been contributed.

Plug-ins are loaded on Aca-Py startup based on the following parameters:
## What's in a Plug-In and How Does They Work?

Plug-ins are loaded on ACA-Py startup based on the following parameters:

- `--plugin` - identifies the plug-in library to load
- `--block-plugin` - identifies plug-ins (including built-ins) that are *not* to be loaded
- `--plugin-config` - identify a configuration parameter for a plug-in
- `--plugin-config-value` - identify a *value* for a plug-in configuration

The `--plug-in` parameter specifies a package that is loaded by Aca-Py at runtime, and extends Aca-Py by adding support for additional protocols and message types, and/or extending the Admin API with additional endpoints.
The `--plug-in` parameter specifies a package that is loaded by ACA-Py at runtime, and extends ACA-Py by adding support for additional protocols and message types, and/or extending the Admin API with additional endpoints.

The original plug-in design (which we will call the "old" model) explicitly included `message_types.py` `routes.py` (to add Admin API's). But functionality was added later (we'll call this the "new" model) to allow the plug-in to include a generic `setup` package that could perform arbitrary initialization. The "new" model also includes support for a `definition.py` file that can specify plug-in version information (major/minor plug-in version, as well as the minimum supported version (if another agent is running an older version of the plug-in)).

You can discover which plug-ins are installed in an aca-py instance by calling (in the "server" section) the `GET /plugins` endpoint. (Note that this will return all loaded protocols, including the built-ins. You can call the `GET /status/config` to inspect the Aca-Py configuration, which will include the configuration for the *external* plug-ins.)
You can discover which plug-ins are installed in an ACA-Py instance by calling (in the "server" section) the `GET /plugins` endpoint. (Note that this will return all loaded protocols, including the built-ins. You can call the `GET /status/config` to inspect the ACA-Py configuration, which will include the configuration for the *external* plug-ins.)

### setup method

Expand All @@ -30,21 +32,21 @@ TODO I couldn't find an implementation of a custom `setup` in any of the existin

### message_types.py

When loading a plug-in, if there is a `message_types.py` available, Aca-Py will check the following attributes to initialize the protocol(s):
When loading a plug-in, if there is a `message_types.py` available, ACA-Py will check the following attributes to initialize the protocol(s):

- `MESSAGE_TYPES` - identifies message types supported by the protocol
- `CONTROLLERS` - identifies protocol controllers

### routes.py

If `routes.py` is available, then Aca-Py will call the following functions to initialize the Admin endpoints:
If `routes.py` is available, then ACA-Py will call the following functions to initialize the Admin endpoints:

- `register()` - registers routes for the new Admin endpoints
- `register_events()` - registers an events this package will listen for/respond to

### definition.py

If `definition.py` is available, Aca-Py will read this package to determine protocol version information. An example follows (this is an example that specifies two protocol versions):
If `definition.py` is available, ACA-Py will read this package to determine protocol version information. An example follows (this is an example that specifies two protocol versions):

```json
versions = [
Expand All @@ -70,14 +72,14 @@ The attributes are:
- `minimum_minor_version` - specifies the minimum supported version (if a lower version is installed in another agent)
- `path` - specifies the sub-path within the package for this version

## Loading Aca-Py Plug-Ins at Runtime
## Loading ACA-Py Plug-Ins at Runtime

The load sequence for a plug-in (the "Startup" class depends on how Aca-Py is running - `upgrade`, `provision` or `start`):
The load sequence for a plug-in (the "Startup" class depends on how ACA-Py is running - `upgrade`, `provision` or `start`):

```mermaid
sequenceDiagram
participant Startup
Note right of Startup: Configuration is loaded on startup<br/>from aca-py config params
Note right of Startup: Configuration is loaded on startup<br/>from ACA-Py config params
Startup->>+ArgParse: configure
ArgParse->>settings: ["external_plugins"]
ArgParse->>settings: ["blocked_plugins"]
Expand Down Expand Up @@ -142,33 +144,15 @@ When developing a new plug-in:

### PIP vs Poetry Support

Most Aca-Py plug-ins provide support for installing the plug-in using [poetry](https://python-poetry.org/). It is *recommended* to include support in your package for installing using *either* pip or poetry, to provide maximum support for users of your plug-in.
Most ACA-Py plug-ins provide support for installing the plug-in using [poetry](https://python-poetry.org/). It is *recommended* to include support in your package for installing using *either* pip or poetry, to provide maximum support for users of your plug-in.

### Plug-In Demo

TBD

## Aca-Py Plug-ins

This list was originally published in [this hackmd document](https://hackmd.io/m2AZebwJRkm6sWgO64-5xQ).

| Maintainer | Name | Features | Last Update | Link |
| ----------- | -------------------------- | -------------------------------- | ----------- | ----------------------------------------------------------------------- |
| BCGov | Redis Events | Inbound/Outbound message queue | Sep 2022 | https://github.com/bcgov/aries-acapy-plugin-redis-events |
| Hyperledger | Aries Toolbox | UI for ACA-py | Aug 2022 | https://github.com/hyperledger/aries-toolbox |
| Hyperledger | Aries ACApy Plugin Toolbox | Protocol Handlers | Aug 2022 | https://github.com/hyperledger/aries-acapy-plugin-toolbox |
| Indicio | Data Transfer | Specific Data import | Aug 2022 | https://github.com/Indicio-tech/aries-acapy-plugin-data-transfer |
| Indicio | Question & Answer | Non-Aries Protocol | Aug 2022 | https://github.com/Indicio-tech/acapy-plugin-qa |
| Indicio | Acapy-plugin-pickup | Fetching Messages from Mediator | Aug 2022 | https://github.com/Indicio-tech/acapy-plugin-pickup |
| Indicio | Machine Readable GF | Governance Framework | Mar 2022 | https://github.com/Indicio-tech/mrgf |
| Indicio | Cache Redis | Cache for Scalability | Jul 2022 | https://github.com/Indicio-tech/aries-acapy-cache-redis |
| SICPA Dlab | Kafka Events | Event Bus Integration | Aug 2022 | https://github.com/sicpa-dlab/aries-acapy-plugin-kafka-events |
| SICPA Dlab | DidComm Resolver | Universal Resolver for DIDComm | Aug 2022 | https://github.com/sicpa-dlab/acapy-resolver-didcomm |
| SICPA Dlab | Universal Resolver | Multi-ledger Reading | Jul 2021 | https://github.com/sicpa-dlab/acapy-resolver-universal |
| DDX | mydata-did-protocol | | Oct 2022 | https://github.com/decentralised-dataexchange/acapy-mydata-did-protocol |
| BCGov | Basic Message Storage | Basic message storage (traction) | Dec 2022 | https://github.com/bcgov/traction/tree/develop/plugins/basicmessage_storage |
| BCGov | Multi-tenant Provider | Multi-tenant Provider (traction) | Dec 2022 | https://github.com/bcgov/traction/tree/develop/plugins/multitenant_provider |
| BCGov | Traction Innkeeper | Innkeeper (traction) | Feb 2023 | https://github.com/bcgov/traction/tree/develop/plugins/traction_innkeeper |
## ACA-Py Plug-ins Repository

Checkout the "Plugins" tab in the [ACA-Py Plugins "Store"](https://plugins.aca-py.org) to find a list of plugins that might be useful in your deployment. Instructions are included for how you can contribute your plugin to the list.

## References

Expand Down
4 changes: 2 additions & 2 deletions mkdocs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

mkdocs-material==9.5.31
mike==2.1.2
mkdocs-material==9.5.32
mike==2.1.3
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ repo_url: https://github.com/hyperledger/aries-cloudagent-python
theme:
name: material
custom_dir: overrides
logo: https://raw.githubusercontent.com/hyperledger/aries-acapy-docs/main/assets/Hyperledger_Aries_Logo_White.png
favicon: https://raw.githubusercontent.com/hyperledger/aries-cloudagent-python/main/docs/assets/aries-favicon.png
logo: https://raw.githubusercontent.com/hyperledger/aries-rfcs/main/collateral/Hyperledger_Aries_Logo_White.png
favicon: https://raw.githubusercontent.com/hyperledger/aries-rfcs/main/collateral/favicon.ico
icon:
repo: fontawesome/brands/github
palette:
Expand Down
2 changes: 1 addition & 1 deletion open-api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi" : "3.0.1",
"info" : {
"title" : "Aries Cloud Agent",
"version" : "v1.0.0rc6"
"version" : "v1.0.0"
},
"servers" : [ {
"url" : "/"
Expand Down
2 changes: 1 addition & 1 deletion open-api/swagger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger" : "2.0",
"info" : {
"version" : "v1.0.0rc6",
"version" : "v1.0.0",
"title" : "Aries Cloud Agent"
},
"tags" : [ {
Expand Down
Loading

0 comments on commit d4fd3ab

Please sign in to comment.