Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/update aca py 0.11.0 #5

Open
wants to merge 56 commits into
base: feat/update_ACA-Py_0.11.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
8fca4c1
feat: add tails
anwalker293 Nov 20, 2023
fbbf2a5
feat: launch ACA-Py securely with API Key
anwalker293 Nov 28, 2023
27db645
feat: adding basic modules
KimEbert42 Nov 29, 2023
4cdc9c2
chore: add additional env variables to docker-compose.dev.yml
KimEbert42 Nov 29, 2023
5f02786
Merge pull request #19 from anwalker293/feat/add-tails-for-revocation
KimEbert42 Dec 1, 2023
4659482
feat: add api-key to configs/issuer.yml as env var
anwalker293 Dec 4, 2023
d936041
feat: add env var for exposed port
anwalker293 Dec 4, 2023
8728c51
feat: add env var to docker-compose
anwalker293 Dec 4, 2023
04c218f
feat: generalize INTERNAL_IP to DATABASE env var
anwalker293 Dec 4, 2023
9cbb77a
fix: transport port load balancing rules
anwalker293 Dec 5, 2023
4ca9603
feat: add quickstart guide
KimEbert42 Dec 7, 2023
dc89666
Merge pull request #24 from anwalker293/feat/make-env-var-for-exposed…
KimEbert42 Dec 7, 2023
e9f757a
Merge remote-tracking branch 'origin/main' into feature/add_demo_docker
KimEbert42 Dec 7, 2023
bcc438f
Merge branch 'feature/add_demo_docker' into feature/modules
KimEbert42 Dec 7, 2023
eaf7b99
feat: implement oob create-invitation
anwalker293 Dec 7, 2023
dd026d7
feat: grab connection from invi_msg_id
anwalker293 Dec 7, 2023
78850aa
feat: grab and implement connection_id
anwalker293 Dec 7, 2023
077975a
feat: add verification for conn_id
anwalker293 Dec 8, 2023
4f2fd80
feat: uncomment
anwalker293 Dec 8, 2023
1599634
try: params
anwalker293 Dec 8, 2023
ce4116c
feat: moving issue and other issuer functions into module
KimEbert42 Dec 8, 2023
850f36e
fix: add extra details on how to restart the services for quickstart
KimEbert42 Dec 8, 2023
0dfae82
feat: work on moving presentation request into module
KimEbert42 Dec 8, 2023
425358d
fix: add CTRL-C option to restart
KimEbert42 Dec 8, 2023
90423a8
Merge pull request #25 from reflectivedevelopment/feature/add_demo_do…
KimEbert42 Dec 8, 2023
0e9b030
fix: params
anwalker293 Dec 8, 2023
f8251a9
feat: add DEBUGGING document
anwalker293 Dec 8, 2023
fa9b4cc
feat: add clustered documentation
anwalker293 Dec 9, 2023
532512f
feat: add credential customization documentation
anwalker293 Dec 9, 2023
603b31c
fix: small fixes within NONCLUSTERED.md
anwalker293 Dec 9, 2023
e88f1b8
feat: add helpful checklist
anwalker293 Dec 9, 2023
5ef5570
feat: finish first pass on modules
KimEbert42 Dec 10, 2023
9c7ecaf
feat: add basic documentation to DEVREADME.md
KimEbert42 Dec 11, 2023
d716812
fix: increase timeouts to increase reliability
KimEbert42 Dec 11, 2023
0b604ad
Merge pull request #32 from anwalker293/feat/clustered-documentation
KimEbert42 Dec 11, 2023
bc2b66c
fix: remove debugging print statement
KimEbert42 Dec 11, 2023
7bbf220
Merge pull request #34 from reflectivedevelopment/fix/fix_timeouts
KimEbert42 Dec 11, 2023
f2e51ed
Merge pull request #33 from reflectivedevelopment/feature/modules
KimEbert42 Dec 11, 2023
f6ba0ba
Merge remote-tracking branch 'origin/main' into feat/launch-ACAPy-sec…
KimEbert42 Dec 11, 2023
4f3b6c7
fix: fix redis host and admin api key for acapy
KimEbert42 Dec 11, 2023
a02cd59
feat: add where to look section
anwalker293 Dec 11, 2023
e4915e0
Merge pull request #30 from anwalker293/feat/debugging
KimEbert42 Dec 11, 2023
43003c0
fix: resolve duplicate config options
KimEbert42 Dec 11, 2023
3bfc69e
Merge pull request #2 from reflectivedevelopment/feat/launch-ACAPy-se…
anwalker293 Dec 11, 2023
e21608e
Merge pull request #20 from anwalker293/feat/launch-ACAPy-securely
KimEbert42 Dec 11, 2023
275490d
feat: add quickstart video
anwalker293 Dec 13, 2023
fbc6c02
feat: add thumbnail
anwalker293 Dec 13, 2023
089f3ba
fix: thumbnail
anwalker293 Dec 13, 2023
0c95c17
Merge remote-tracking branch 'origin/main' into feat/implement-oob-co…
KimEbert42 Dec 15, 2023
81eccab
fix: fix verifier workflow to use verifier invitation
KimEbert42 Dec 15, 2023
6d4957a
Merge pull request #3 from reflectivedevelopment/feat/implement-oob-c…
anwalker293 Dec 15, 2023
a84960a
feat: upload thumbnail
anwalker293 Dec 15, 2023
15c5a40
fix: relative path thumbnail
anwalker293 Dec 15, 2023
0d2a3ee
Merge pull request #35 from anwalker293/feat/quickstart-demo-video
KimEbert42 Dec 15, 2023
3b635fd
Merge pull request #26 from anwalker293/feat/implement-oob-connections
KimEbert42 Dec 15, 2023
a770c70
Merge remote-tracking branch 'origin/main' into feat/update_ACA-Py_0.…
KimEbert42 Dec 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion DEVREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,44 @@ This file is intended for developers working on the internals of the framework.

## Making Changes

TODO
The general structure of the Aries Akrida project is broken into three parts.

### AFJ Agent

The AFJ agent code lives in the agent.ts file. This file can be manually run using json strings to command the agent.

The basic design goal is to have a simplified interface, where one command results in one and only one response via stdout.

### Issuer and Verifier Modules

The issuer and verifier modules are designed to allow additional modules to be written to support different issuers and verifiers to test against. They have a basic interface to fulfill, and then a modification in locustClient.py to allow selecting the new module.

Currently there is one module written for Aca-py

```
# Load modules here depending on config
if ISSUER_TYPE == 'acapy':
self.issuer = AcapyIssuer()

if VERIFIER_TYPE == 'acapy':
self.verifier = AcapyVerifier()
```

The basic interface allows for easy understanding of the requirements to fulfill to implement an issuer or verifier.

For example, in the base.py for the issuerAgent, we can see that get_invite takes no input parameters, and returns an invitation_url and connection_id. The connection_id is used for other commands, such as issuing a credential.

```
def get_invite(self):
# return {'invitation_url': , 'connection_id': }
raise NotImplementedError
```

### locustClient and tests

locustClient.py contains most of the logic for different interactions between the AFJ Agent and the Issuer and Verifier Agents.

The individual test specifications live in the other locust files. These files define the test workflow, and what core features will be used in the test.

## Debugging

Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,20 @@ See [design](./docs/DESIGN.md) for more design details.

Before starting any load testing you **SHOULD** gain written permission that includes the time, method and various systems that you wish to load test. You **MUST NOT** load test any system that you do **NOT** have permission to test.

To get started quickly on your local machine, you can try out the [Quick Start Guide](./docs/QUICKSTART.md)

For high concurrency testing, it is useful to run Locust on a VM where you can easily add more resources for bigger tests. Please read [docs/VM.md](./docs/VM.md)

### Demo

TODO - Video Demo
<a href="https://www.youtube.com/watch?v=j_zva1CQ15U">
<img width="1680" alt="thumbnail" src="./docs/images/thumbnail.png" />
</a>






### Getting Started

Expand Down
153 changes: 153 additions & 0 deletions docker-compose.demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
version: '3'
services:

load-agent:
build:
context: .
target: release
hostname: load-agent
restart: unless-stopped
user: root
tty: true
command: >
locust -f ${LOCUST_FILES}
ports:
- "8089:8089"
- "8090:8090"
- "${START_PORT}-${END_PORT}:${START_PORT}-${END_PORT}"
environment:
- NODE_ENV=${NODE_ENV}
- BROWSER=none # don't open the web browser
- MEDIATION_URL=${MEDIATION_URL}
- LOCUST_MIN_WAIT=${LOCUST_MIN_WAIT} # time between pings
- LOCUST_MAX_WAIT=${LOCUST_MAX_WAIT} # time between pings
- ISSUER_URL=${ISSUER_URL}
- ISSUER_HEADERS=${ISSUER_HEADERS}
- VERIFIER_URL=${VERIFIER_URL}
- VERIFIER_HEADERS=${VERIFIER_HEADERS}
- AGENT_IP=${AGENT_IP}
- CRED_DEF=${CRED_DEF}
- CRED_ATTR=${CRED_ATTR}
- SCHEMA=${SCHEMA}
- LEDGER=${LEDGER}
- START_PORT=${START_PORT}
- END_PORT=${END_PORT}
- MESSAGE_TO_SEND=${MESSAGE_TO_SEND}
- VERIFIED_TIMEOUT_SECONDS=${VERIFIED_TIMEOUT_SECONDS}
- WITH_MEDIATION=${WITH_MEDIATION}
- OOB_INVITE=${OOB_INVITE}
networks:
- app-network

# Issuer
issuer:
#image: ghcr.io/hyperledger/aries-cloudagent-python:py3.9-0.8.0-rc0
image: acapy-cache-redis
build:
context: ./instance-configs/acapy-agent
dockerfile: ./docker/Dockerfile
volumes:
- ./instance-configs/acapy-agent/configs:/home/indy/configs:ro,z
ports:
- "8150:8150"
- "8151:8151"
environment:
ACAPY_ADMIN_API_KEY: ""
ACAPY_ADMIN_INSECURE_MODE: true
ACAPY_WALLET_STORAGE_CONFIG: '{"url":"issuer-db:5432","max_connections":5}'
ACAPY_GENESIS_URL: ${ACAPY_GENESIS_URL}
ACAPY_WALLET_STORAGE_CREDS: '{"account":"test","password":"test","admin_account":"test","admin_password":"test"}'
#entrypoint: python -m cProfile -m aries_cloudagent
command: >
start
--arg-file ./configs/issuer.yml
--endpoint http://issuer:8151
--genesis-url ${ACAPY_GENESIS_URL}
--log-level debug
--plugin-config-value redis_cache.connection="redis://redis-host:6379/0"
--plugin-config-value redis_cache.max_connections=90
healthcheck:
test: curl -s -o /dev/null -w '%{http_code}' "http://localhost:8150/status/live" | grep "200" > /dev/null
start_period: 30s
interval: 7s
timeout: 5s
retries: 5
networks:
- app-network

# databases to support aca-py
issuer-db:
image: postgres:14.3
hostname: issuer-db
restart: unless-stopped
ports: # Uncomment to access postgres outside of containers
- "5432:5432"
environment:
PGDATA: /var/lib/postgresql/data/pgdata
env_file:
- ./instance-configs/database/sample.env
volumes:
- issuer-db:/var/lib/postgresql/data
networks:
- app-network

redis-host:
image: "redis:alpine"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
ports:
- "6379:6379"
environment:
- REDIS_REPLICATION_MODE=master
env_file:
- ./instance-configs/database/sample.env
networks:
- app-network

# Mediator Services
mediator:
build:
dockerfile: ./Dockerfile
context: ./instance-configs/mediator
hostname: mediator
restart: unless-stopped
environment:
- ACAPY_ENDPOINT=[http://${MEDIATOR_DNS}:3000,ws://${MEDIATOR_DNS}:3000]
- ACAPY_WALLET_STORAGE_CONFIG={"url":"mediator-db:5432","wallet_scheme":"DatabasePerWallet"}
- ACAPY_WALLET_STORAGE_CREDS={"account":"insertStringHere","password":"insertStringHere","admin_account":"insertStringHere","admin_password":"insertStringHere"}
- ACAPY_WALLET_KEY=testing
volumes:
- ./instance-configs/mediator/wait-for-it:/home/indy/wait-for-it:z
command: >
sh -c "./wait-for-it/wait-for-it.sh mediator-db:5432 -s -t 60 -- aca-py start --auto-provision --arg-file ./configs/start.yml"
ports:
- "3000:3000"
depends_on:
- "mediator-db"
networks:
- app-network

# DB Service
mediator-db:
image: postgres:10
hostname: mediator-db
restart: always
# ports: # Uncomment to access postgres outside of containers
# - "5432:5432"
environment:
POSTGRES_USER: insertStringHere
POSTGRES_PASSWORD: insertStringHere
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- mediator-db:/var/lib/postgresql/data
networks:
- app-network

#Docker Networks
networks:
app-network:
driver: bridge

volumes:
issuer-db:
mediator-db:
3 changes: 3 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ services:
- LOCUST_MAX_WAIT=${LOCUST_MAX_WAIT} # time between pings
- ISSUER_URL=${ISSUER_URL}
- ISSUER_HEADERS=${ISSUER_HEADERS}
- VERIFIER_URL=${VERIFIER_URL}
- VERIFIER_HEADERS=${VERIFIER_HEADERS}
- AGENT_IP=${AGENT_IP}
- CRED_DEF=${CRED_DEF}
- CRED_ATTR=${CRED_ATTR}
Expand All @@ -32,6 +34,7 @@ services:
- MESSAGE_TO_SEND=${MESSAGE_TO_SEND}
- VERIFIED_TIMEOUT_SECONDS=${VERIFIED_TIMEOUT_SECONDS}
- WITH_MEDIATION=${WITH_MEDIATION}
- OOB_INVITE=${OOB_INVITE}
volumes:
- ./load-agent:/load-agent:rw
networks:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ services:
- LOCUST_MAX_WAIT=${LOCUST_MAX_WAIT} # time between pings
- ISSUER_URL=${ISSUER_URL}
- ISSUER_HEADERS=${ISSUER_HEADERS}
- VERIFIER_URL=${VERIFIER_URL}
- VERIFIER_HEADERS=${VERIFIER_HEADERS}
- AGENT_IP=${AGENT_IP}
- CRED_DEF=${CRED_DEF}
- CRED_ATTR=${CRED_ATTR}
Expand All @@ -33,6 +35,7 @@ services:
- MESSAGE_TO_SEND=${MESSAGE_TO_SEND}
- VERIFIED_TIMEOUT_SECONDS=${VERIFIED_TIMEOUT_SECONDS}
- WITH_MEDIATION=${WITH_MEDIATION}
- OOB_INVITE=${OOB_INVITE}
networks:
- app-network

Expand Down
Loading