From 7b936c36c3bbb8726af13648f1745ba225d549da Mon Sep 17 00:00:00 2001 From: Yurii Shynbuiev Date: Mon, 25 Mar 2024 18:51:30 +0700 Subject: [PATCH] doc(agent): add the details to the readme.md and change the port of the mock server Signed-off-by: Yurii Shynbuiev --- examples/st-oidc4vc/README.md | 16 +++++++++++++++- examples/st-oidc4vc/bootstrap/01_init_realm.hurl | 2 +- examples/st-oidc4vc/compose.yaml | 5 ++++- examples/st-oidc4vc/demo.py | 4 ++-- 4 files changed, 22 insertions(+), 5 deletions(-) mode change 100644 => 100755 examples/st-oidc4vc/demo.py diff --git a/examples/st-oidc4vc/README.md b/examples/st-oidc4vc/README.md index e72b9f0784..6401164c4b 100644 --- a/examples/st-oidc4vc/README.md +++ b/examples/st-oidc4vc/README.md @@ -2,11 +2,25 @@ ## Prerequisites -- Docker installed +- Docker installed v2.24.0 or later - Python 3 with the following packages installed - [requests](https://pypi.org/project/requests/) - [pyjwt](https://pyjwt.readthedocs.io/en/stable/) - [cryptography](https://cryptography.io/en/latest/) +- Virtual environment (optional) + +Example of the script to install the required packages in a virtual environment: +```shell +python -m venv {path-to-the-project-dir}/open-enterprise-agent/examples/st-oidc4vc/python-env +source {path-to-the-project-dir}/open-enterprise-agent/examples/st-oidc4vc/python-env/bin/activate +pip install requests pyjwt cryptography +``` + +- the latest Cloud Agent image is built and available in the local Docker registry + +```shell +sbt docker:publishLocal +``` ### 1. Spin up the agent stack with pre-configured Keycloak diff --git a/examples/st-oidc4vc/bootstrap/01_init_realm.hurl b/examples/st-oidc4vc/bootstrap/01_init_realm.hurl index 070073e780..030e264dd9 100644 --- a/examples/st-oidc4vc/bootstrap/01_init_realm.hurl +++ b/examples/st-oidc4vc/bootstrap/01_init_realm.hurl @@ -49,7 +49,7 @@ Authorization: Bearer {{ admin_access_token }} "id": "{{ alice_wallet_client_id }}", "publicClient": true, "consentRequired": true, - "redirectUris": [ "http://localhost:5000/*" ] + "redirectUris": [ "http://localhost:7777/*" ] } HTTP 201 diff --git a/examples/st-oidc4vc/compose.yaml b/examples/st-oidc4vc/compose.yaml index 9dafcda771..2f4fed03a3 100644 --- a/examples/st-oidc4vc/compose.yaml +++ b/examples/st-oidc4vc/compose.yaml @@ -1,3 +1,5 @@ +--- + configs: caddyfile_issuer: content: |- @@ -15,6 +17,7 @@ configs: reverse_proxy vault-issuer:8200 } } + services: agent-issuer: depends_on: @@ -109,7 +112,7 @@ services: mockserver: image: mockserver/mockserver:5.15.0 ports: - - 5000:1080 + - 7777:1080 node: depends_on: node-db: diff --git a/examples/st-oidc4vc/demo.py b/examples/st-oidc4vc/demo.py old mode 100644 new mode 100755 index e26a34cc26..1f7cb33438 --- a/examples/st-oidc4vc/demo.py +++ b/examples/st-oidc4vc/demo.py @@ -8,8 +8,8 @@ from cryptography.hazmat.primitives.asymmetric import ec -MOCKSERVER_URL = "http://localhost:5000" -LOGIN_REDIRECT_URL = "http://localhost:5000/cb" +MOCKSERVER_URL = "http://localhost:7777" +LOGIN_REDIRECT_URL = "http://localhost:7777/cb" AGENT_URL = "http://localhost:8080/prism-agent" CREDENTIAL_ISSUER = None