-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/urlValidation
- Loading branch information
Showing
15 changed files
with
364 additions
and
44 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/python-3/.devcontainer/base.Dockerfile | ||
ARG VARIANT="3.9" | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
|
||
# Poetry | ||
ARG POETRY_VERSION="none" | ||
RUN if [ "${POETRY_VERSION}" != "none" ]; then su vscode -c "umask 0002 && pip3 install poetry==${POETRY_VERSION}"; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"name": "traction_plugins", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "..", | ||
"args": { | ||
"VARIANT": "3.9-bullseye", | ||
"POETRY_VERSION": "1.4.2" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.pythonPath": "/usr/local/bin/python", | ||
"python.linting.enabled": true, | ||
"python.linting.pylintEnabled": true, | ||
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", | ||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", | ||
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit", | ||
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", | ||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", | ||
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", | ||
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", | ||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", | ||
"python.testing.pytestArgs": [ | ||
".", | ||
"--no-cov" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.pytestPath": "pytest", | ||
"editor.defaultFormatter": null, | ||
"editor.formatOnSave": false, // enable per language | ||
"[python]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"python.formatting.provider": "black", | ||
"python.formatting.blackArgs": [], | ||
"python.venvFolders": ["~.cache/virtualenvs"] | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.pylint", | ||
"ms-python.vscode-pylance" | ||
] | ||
} | ||
}, | ||
|
||
"features": { | ||
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} | ||
}, | ||
|
||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode", | ||
|
||
"remoteEnv": { | ||
// "PATH": "${containerEnv:PATH}:${workspaceRoot}/.venv/bin" | ||
}, | ||
|
||
"mounts": ["source=${localWorkspaceFolder}/demo/configs,target=/configs,type=bind,consistency=cached"], | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
|
||
"forwardPorts": [ | ||
3000,3001,3002, | ||
8032 | ||
], | ||
|
||
"postCreateCommand": "bash ./.devcontainer/post-install.sh" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# Convenience workspace directory for later use | ||
WORKSPACE_DIR=$(pwd) | ||
|
||
# install all ACA-Py requirements | ||
python -m pip install --upgrade pip | ||
#pip3 install -r requirements.txt -r requirements.askar.txt -r requirements.bbs.txt -r requirements.dev.txt -r requirements.indy.txt | ||
|
||
# Change some Poetry settings to better deal with working in a container | ||
poetry config cache-dir ${WORKSPACE_DIR}/.cache | ||
poetry config virtualenvs.in-project true | ||
# Now install all dependencies | ||
poetry install | ||
|
||
export PATH=${PATH}:${WORKSPACE_DIR}/.venv/bin | ||
|
||
# add all the requirements to the default python | ||
poetry export --without-hashes --format=requirements.txt > requirements.txt | ||
pip install -r requirements.txt | ||
|
||
# install black for formatting | ||
pip3 install black | ||
|
||
# cleanup | ||
rm poetry.lock | ||
rm requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.cache | ||
.venv | ||
poetry.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run/Debug Plugin", | ||
"type": "python", | ||
"request": "launch", | ||
"preLaunchTask": "docker-compose-start", | ||
"module": "poetry", | ||
"justMyCode": false, | ||
"args": [ | ||
"run", | ||
"python", | ||
"-m", | ||
"aries_cloudagent", | ||
"start", | ||
"--arg-file=${workspaceRoot}/demo/configs/devcontainer.yml" | ||
] | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "docker-compose-start", | ||
"type": "shell", | ||
"command": "docker compose -f ${workspaceRoot}/demo/docker-compose.devcontainer.yml up --build -d", | ||
"isBackground": true, | ||
"problemMatcher": [ | ||
{ | ||
"pattern": [{ "regexp": ".", "file": 1, "location": 2, "message": 3, }], | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^Container demo-tenant-proxy-1$", | ||
"endsPattern": "^Container demo-traction-db-1$", | ||
} | ||
}, | ||
] | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
label: acapy-traction-plugins | ||
|
||
# Admin | ||
admin: [0.0.0.0, 3001] | ||
admin-insecure-mode: false | ||
admin-api-key: change-me | ||
jwt-secret: change-me | ||
|
||
|
||
# Transport | ||
inbound-transport: | ||
- [http, 0.0.0.0, 3000] | ||
- [ws, 0.0.0.0, 3002] | ||
outbound-transport: http | ||
endpoint: | ||
- http://host.docker.internal:3000 | ||
|
||
# webhook: http://host.docker.internal:3000 | ||
|
||
# enable-undelivered-queue: true | ||
|
||
# plugins | ||
plugin: | ||
- aries_cloudagent.messaging.jsonld | ||
- traction_innkeeper.v1_0 | ||
- basicmessage_storage.v1_0 | ||
- connection_update.v1_0 | ||
- multitenant_provider.v1_0 | ||
|
||
# block-plugin: | ||
|
||
|
||
plugin-config-value: | ||
# - multitenant_provider.manager.class_name="traction_plugins.multitenant_provider.v1_0.manager.BasicMultitokenMultitenantManager" | ||
- multitenant_provider.manager.class_name="multitenant_provider.v1_0.manager.AskarMultitokenMultitenantManager" | ||
- multitenant_provider.manager.always_check_provided_wallet_key=true | ||
- multitenant_provider.errors.on_unneeded_wallet_key=false | ||
- multitenant_provider.token_expiry.units=days | ||
- multitenant_provider.token_expiry.amount=1 | ||
- traction_innkeeper.innkeeper_wallet.tenant_id=innkeeper | ||
- traction_innkeeper.innkeeper_wallet.wallet_name=traction_innkeeper | ||
- traction_innkeeper.innkeeper_wallet.wallet_key=change-me | ||
- traction_innkeeper.innkeeper_wallet.print_key=true | ||
- traction_innkeeper.innkeeper_wallet.print_token=true | ||
- traction_innkeeper.reservation.expiry_minutes=2880 | ||
|
||
# invite: true | ||
# invite-label: ACA-Py (Traction Plugins) | ||
|
||
#config | ||
genesis-url: http://test.bcovrin.vonx.io/genesis | ||
|
||
# wallet-type: indy | ||
wallet-type: askar | ||
wallet-name: traction-wallet | ||
wallet-key: 'insecure-change-me' | ||
wallet-storage-type: postgres_storage | ||
wallet-storage-config: '{"url":"host.docker.internal:5432","max_connections":5,"wallet_scheme":"DatabasePerWallet"}' | ||
wallet-storage-creds: '{"account":"postgres","password":"postgresPass","admin_account":"postgres","admin_password":"postgresPass"}' | ||
multitenancy-config: '{"wallet-type":"askar-profile","wallet-name":"askar-wallet"}' | ||
|
||
log-level: info | ||
|
||
multitenant: true | ||
multitenant-admin: true | ||
|
||
emit-new-didcomm-prefix: true | ||
emit-new-didcomm-mime-type: true | ||
|
||
auto-accept-invites: true | ||
auto-accept-requests: true | ||
auto-respond-messages: false | ||
auto-respond-credential-proposal: true | ||
auto-respond-credential-offer: true | ||
auto-respond-credential-request: true | ||
auto-respond-presentation-proposal: true | ||
auto-respond-presentation-request: true | ||
auto-store-credential: true | ||
auto-verify-presentation: true | ||
auto-ping-connection: true | ||
auto-provision: true | ||
monitor-ping: true | ||
public-invites: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: "3.9" | ||
services: | ||
traction-db: | ||
image: "postgres:12" | ||
environment: | ||
- POSTGRES_PASSWORD=postgresPass | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- traction-wallet:/var/lib/postgresql/data | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
tenant-proxy: | ||
build: | ||
context: .. | ||
dockerfile: ./docker/Dockerfile.tenant-proxy | ||
restart: unless-stopped | ||
environment: | ||
- ACAPY_ADMIN_URL=http://host.docker.internal:3001 | ||
- ACAPY_ADMIN_URL_API_KEY=change-me | ||
ports: | ||
- 8032:8080 | ||
extra_hosts: | ||
- host.docker.internal:host-gateway | ||
|
||
volumes: | ||
traction-wallet: |
18 changes: 13 additions & 5 deletions
18
.devcontainer/devcontainer.json → ...tenant-ui/.devcontainer/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.