Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit ddce112

Browse files
author
Philipp Etschel
authored
Merge pull request #685 from bcgov/acapy-flags-md
Readme for aca-py flags
2 parents 9289889 + 1d776a6 commit ddce112

File tree

6 files changed

+169
-1
lines changed

6 files changed

+169
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ Learn how to contribute in [Contributing](CONTRIBUTING.md). You can also start b
113113

114114
Regarding release process, we do not follow a strict process yet, nevertheless we follow the guidelines described in [Publishing](PUBLISHING.md).
115115

116+
Learn what aries protocols can be controlled by the BPA in [aca-py-args](scripts/aca-py-args.md)
117+
116118
## Business Partner Agent in Action
117119
- [COP26 Presented by BC Goverment and OpenEarth Foundation](https://www.youtube.com/watch?v=q0Jml3isSh8)
118120
- [Use Case and Technical Demonstration Playlist](https://www.youtube.com/watch?v=TGiiNOoVoJs&list=PL9CV_8JBQHiooHv05idOTrR2eBAJM89LX)

docs/Quickstart.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
## What is the Business Partner Agent
2+
3+
The Business Partner Agent leverages the [aries-cloudagent-python](https://github.com/hyperledger/aries-cloudagent-python) which a python implementation of the [Hyperledger ARIES](https://www.hyperledger.org/use/aries) protocols, which define the issuance, holding, and verification of the [Hyperledger Indy Verifiable Credentials](https://www.hyperledger.org/use/hyperledger-indy) (and [W3C Verifiable Credentials](https://www.w3.org/TR/vc-data-model/)).
4+
5+
## Why do I need to know those things
6+
There are operations and concepts critical to the usage, security, and privacy that should not be overlooked. The Business Partner Agent's goal is to simplify the usage of these technologies, but is still constrained by the requirements of the infrastructure.
7+
8+
## Before you start the application
9+
10+
Configure the ledger
11+
12+
This system is build on a distributed ledger (based on indy) that holds public cryptographic keys for Digital IDentities (DID's) as well as other artifacts required to exchange Indy Credentials.
13+
14+
.env file sets the following important environment variable.
15+
16+
`ACAPY_GENESIS_URL`
17+
This is the web address the ACA-py agent will use to discover all the nodes on the Indy Ledger you wish to use.
18+
19+
Example Values:
20+
- **`http://host.docker.internal:9000/genesis`** will configure the agent that the Business Partner Agent uses to write to a VON network hosted directly on your local machine, this is great for local development/testing. That ledger can started by running `./start_infra.sh` In [local-network](../scripts/local-network)
21+
- **`http://test.bcovrin.vonx.io/genesis`** will configure the agent that the Business Partner Agent uses to write to a Sovrin ledger hosted by the BC Provincial Government that is for development purposes and is free to use.
22+
- For a production use case, you will need to pick your ledger carefully for one that meets your needs. [Sovrin MainNET](https://sovrin.org/transaction-endorsers/) is one ledger that would be appropriate in production.
23+
24+
25+
`ACAPY_SEED`
26+
27+
This is a [seed](https://en.wikipedia.org/wiki/Random_seed) value that aca-py uses to randomly generate your cryptographic keys (private and public) and DID. This SEED is the master key to your DID, if someone gained a copy of your SEED, they would be able to impersonate your DID, [identity theft is not a joke](https://youtu.be/WaaANll8h18?t=61). If you lost or overwrote your own SEED, all data stored in any previous wallet would be inaccessible as aca-py no longer has key to decrypt the wallet (however credentials that were already issues can still be verified as your public key is still on the ledger)
28+
29+
If you intend to create a new DID, then the `ACAPY_SEED` value is not important. However if you intend to start the Business Partner Agent to manage an existing DID, you would need to set the `ACAPY_SEED` appropriately.
30+
31+
## Automatically on startup
32+
33+
1) The ACA-py agent will write your DID and Public Key (VerKey) to the Hyperledger defined by `ACAPY_GENESIS_URL`.
34+
2) The ACA-py agent will provision it's wallet (encrypted database) to the Postgres instance defined in the .env file, that instance is defined and managed by the scripts in this project.
35+
36+
37+
## The Alice Faber Demo
38+
39+
The Verifiable Credential Community uses the [Alice/Faber Demo](https://kctheservant.medium.com/demonstration-of-hyperledger-aries-cloud-agent-6e476a5426b0) as the standard example. It involves an Individual 'Alice' getting a transcript/degree from the 'Faber' College and presenting that transcript to the 'Acme' Business.
40+
41+
Verifiable Credentials allow Alice to complete this trusted sharing of data without Acme and Faber needing to communicate directly.
42+
43+
To execute this demo, you will need...
44+
45+
1) Configure and start Faber College (a BPA) to use the BCovrin Test Ledger [deploy this](../scripts/docker-compose.yaml), ensure `ACAPY_GENESIS_URL=http://test.bcovrin.vonx.io/genesis`
46+
47+
2) Download a SSI Wallet to your Smartphone to act as `Alice's` personal wallet. We have used the `Trinsic Wallet` and `estatus Wallet` for our development testing, but are not affiliated or guarantee that will they operate correctly (The BPA is alpha software)
48+
49+
Steps of the Issuance Demo using Alice Faber.
50+
51+
1) Create a Schema, with whatever values seem appropriate (degree_name, graduation_date) [Demo](https://www.youtube.com/watch?v=wi6Q6WVYHbM&t=1859s)
52+
2) Create a CredDef [Demo](https://www.youtube.com/watch?v=wi6Q6WVYHbM&t=1950s)
53+
3) Create a Connection to your Personal Wallet [Demo](https://youtu.be/wi6Q6WVYHbM?t=1200)
54+
4) Issue Credential to your Personal Wallet [Demo](https://youtu.be/wi6Q6WVYHbM?t=1249)
55+
56+
57+
Steps of the Issuance Demo using Alice Faber.
58+
59+
1) Configure and deploy second BPA to act as ACME
60+
2) Import Schema by Schema ID
61+
3) Create Proof Request template
62+
4) Create Connection to Personal Wallet (same steps as Issuance)
63+
5) Make Proof Request from ACME to Alice for proof of Degree.
64+
65+
66+

docs/aries-protocol-support.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
## ACA-PY args file
2+
3+
`docker run bcgovimages/aries-cloudagent:py36-1.16-1_0.7.1 start --help`
4+
5+
6+
An option that is supported by the BPA means that it should be set as false in the 'acapy-static-args.yml' file. The BPA will receive the webhook from aca-py and handle it appropriatly, saving relevant data in the database, and displaying any 'in-progress' or 'completed' items in the UI for Users to inspect and interact with.
7+
8+
_For simplicity or demo purposes, it may be appropriate to set a supported flag to true. The BPA will still update any records appropriately, but aca-py will proceed with those protocols immediately, without interaction from the BPA, or the User._
9+
10+
Options that are 'NOT-SUPPORTED' must be left true, so aca-py can automatically proceed with the aries protocols and the BPA does not have the behaviour to proceded with those protocols, either automatically, or for the user to decide.
11+
12+
Feature should be built to allow the BPA to control protocols labelled 'NOT-SUPPORTED'
13+
14+
```
15+
docker run bcgovimages/aries-cloudagent:py36-1.16-1_0.7.1 start --help
16+
...
17+
Debug:
18+
...
19+
--auto-accept-invites
20+
Automatically accept invites without firing a webhook
21+
event or waiting for an admin request. Default: false.
22+
[env var: ACAPY_AUTO_ACCEPT_INVITES]
23+
**SUPPORTED BY BPA**
24+
25+
--auto-accept-requests
26+
Automatically accept connection requests without
27+
firing a webhook event or waiting for an admin
28+
request. Default: false. [env var:
29+
ACAPY_AUTO_ACCEPT_REQUESTS]
30+
**SUPPORTED BY BPA**
31+
32+
--auto-respond-messages
33+
Automatically respond to basic messages indicating the
34+
message was received. Default: false. [env var:
35+
ACAPY_AUTO_RESPOND_MESSAGES]
36+
**SUPPORTED BY BPA**
37+
38+
--auto-respond-credential-proposal
39+
Auto-respond to credential proposals with
40+
corresponding credential offers [env var:
41+
ACAPY_AUTO_RESPOND_CREDENTIAL_PROPOSAL]
42+
**SUPPORTED BY BPA**
43+
44+
--auto-respond-credential-offer
45+
Automatically respond to Indy credential offers with a
46+
credential request. Default: false [env var:
47+
ACAPY_AUTO_RESPOND_CREDENTIAL_OFFER]
48+
**SUPPORTED BY BPA**
49+
50+
--auto-respond-credential-request
51+
Auto-respond to credential requests with corresponding
52+
credentials [env var:
53+
ACAPY_AUTO_RESPOND_CREDENTIAL_REQUEST]
54+
**SUPPORTED BY BPA**
55+
56+
--auto-respond-presentation-proposal
57+
Auto-respond to presentation proposals with
58+
corresponding presentation requests [env var:
59+
ACAPY_AUTO_RESPOND_PRESENTATION_PROPOSAL]
60+
**NOT-SUPPORTED**
61+
62+
--auto-respond-presentation-request
63+
Automatically respond to Indy presentation requests
64+
with a constructed presentation if a corresponding
65+
credential can be retrieved for every referent in the
66+
presentation request. Default: false. [env var:
67+
ACAPY_AUTO_RESPOND_PRESENTATION_REQUEST]
68+
**SUPPORTED BY BPA**
69+
70+
--auto-store-credential
71+
Automatically store an issued credential upon receipt.
72+
Default: false. [env var: ACAPY_AUTO_STORE_CREDENTIAL]
73+
**NOT-SUPPORTED**
74+
75+
--auto-verify-presentation
76+
Automatically verify a presentation when it is
77+
received. Default: false. [env var:
78+
ACAPY_AUTO_VERIFY_PRESENTATION]
79+
**NOT-SUPPORTED**
80+
81+
...
82+
Protocol:
83+
--auto-ping-connection
84+
Automatically send a trust ping immediately after a
85+
connection response is accepted. Some agents require
86+
this before marking a connection as 'active'. Default:
87+
false. [env var: ACAPY_AUTO_PING_CONNECTION]
88+
**SUPPORTED BY BPA**
89+
...
90+
```
91+
92+
The default 'acapy-static-args.yml` can be found [here](../scripts/acapy-static-args.yml).

scripts/acapy-static-args.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ auto-respond-credential-offer: false
66
auto-respond-credential-request: false
77
auto-respond-presentation-proposal: true
88
auto-respond-presentation-request: false
9+
910
auto-store-credential: true
1011
auto-verify-presentation: true
12+
1113
auto-ping-connection: true
14+
1215
auto-provision: true
16+
1317
monitor-ping: true
1418
preserve-exchange-records: false
1519
public-invites: true

scripts/scenarios/local-network/acapy-static-args.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ auto-respond-credential-offer: false
66
auto-respond-credential-request: false
77
auto-respond-presentation-proposal: true
88
auto-respond-presentation-request: false
9+
910
auto-store-credential: true
1011
auto-verify-presentation: true
12+
1113
auto-ping-connection: true
14+
1215
auto-provision: true
16+
1317
monitor-ping: true
1418
preserve-exchange-records: false
1519
public-invites: true

scripts/scenarios/local-network/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ services:
176176
#######
177177
tails-server:
178178
build:
179-
context: https://github.com/bcgov/indy-tails-server.git#master
179+
context: https://github.com/bcgov/indy-tails-server.git#main
180180
dockerfile: docker/Dockerfile.tails-server
181181
ports:
182182
- "6543:6543"

0 commit comments

Comments
 (0)