Skip to content

Commit

Permalink
fix: update the jwt to have shortform of prism did (#1461)
Browse files Browse the repository at this point in the history
Signed-off-by: mineme0110 <[email protected]>
  • Loading branch information
mineme0110 authored Nov 29, 2024
1 parent 5ece0dd commit 7365497
Show file tree
Hide file tree
Showing 11 changed files with 558 additions and 149 deletions.
48 changes: 10 additions & 38 deletions .github/workflows/performance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ concurrency:

on:
pull_request:
types:
- opened
- edited
- synchronize
push:
branches:
- "main"
Expand Down Expand Up @@ -55,7 +59,7 @@ jobs:
sed -i.bak "s/AGENT_VERSION=.*/AGENT_VERSION=${AGENT_VERSION}/" "${ENV_FILE}" && rm -f "${ENV_FILE}.bak"
cat "${ENV_FILE}"
- name: Start services for issuer
- name: Start services for issuer holder and verifier
env:
PORT: 8080
ADMIN_TOKEN: admin
Expand All @@ -64,48 +68,16 @@ jobs:
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5432
ISSUER_PORT: 8080
HOLDER_PORT: 8090
VERIFIER_PORT: 8100
NODE_REFRESH_AND_SUBMIT_PERIOD: 1s
NODE_MOVE_SCHEDULED_TO_PENDING_PERIOD: 1s
NODE_WALLET_MAX_TPS: 1000
uses: hoverkraft-tech/[email protected]
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p issuer"
up-flags: "--wait"
down-flags: "--volumes"

- name: Start services for holder
env:
PORT: 8090
ADMIN_TOKEN: admin
DEFAULT_WALLET_ENABLED: true
DEFAULT_WALLET_AUTH_API_KEY: default
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5433
uses: isbang/[email protected]
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p holder"
up-flags: "--wait"
down-flags: "--volumes"

- name: Start services for verifier
env:
PORT: 8100
ADMIN_TOKEN: admin
DEFAULT_WALLET_ENABLED: true
DEFAULT_WALLET_AUTH_API_KEY: default
API_KEY_AUTO_PROVISIONING: false
API_KEY_ENABLED: true
DOCKERHOST: "host.docker.internal"
PG_PORT: 5434
uses: isbang/[email protected]
with:
compose-file: "./infrastructure/shared/docker-compose.yml"
compose-flags: "--env-file ./infrastructure/local/.env -p verifier"
compose-file: "./infrastructure/shared/docker-compose-combined.yml"
compose-flags: "--env-file ./infrastructure/local/.env"
up-flags: "--wait"
down-flags: "--volumes"

Expand Down
44 changes: 44 additions & 0 deletions infrastructure/shared/apisix/conf/apisix-holder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins:
- name: proxy-rewrite
- name: cors

routes:
- uri: /cloud-agent/*
upstream_id: 4
plugins:
cors:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/cloud-agent/(.*)", "/$1"]
- uri: /docs/cloud-agent/api/*
upstream_id: 4
plugins:
proxy-rewrite:
regex_uri: ["^/docs/cloud-agent/api/(.*)", "/docs/$1"]
- uri: /didcomm*
upstream_id: 3
plugins:
cors:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/didcomm(.*)", "/$1"]
- uri: /apidocs/*
upstream_id: 5
plugins:
proxy-rewrite:
regex_uri: ["^/apidocs/(.*)", "/$1"]

upstreams:
- id: 3
nodes:
"cloud-agent-holder:8090": 1 # didcom and system
type: roundrobin
- id: 4
nodes:
"cloud-agent-holder:8085": 1 # tapir
type: roundrobin
- id: 5
nodes:
"swagger-ui-holder:8080": 1
type: roundrobin
#END
44 changes: 44 additions & 0 deletions infrastructure/shared/apisix/conf/apisix-issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins:
- name: proxy-rewrite
- name: cors

routes:
- uri: /cloud-agent/*
upstream_id: 4
plugins:
cors:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/cloud-agent/(.*)", "/$1"]
- uri: /docs/cloud-agent/api/*
upstream_id: 4
plugins:
proxy-rewrite:
regex_uri: ["^/docs/cloud-agent/api/(.*)", "/docs/$1"]
- uri: /didcomm*
upstream_id: 3
plugins:
cors:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/didcomm(.*)", "/$1"]
- uri: /apidocs/*
upstream_id: 5
plugins:
proxy-rewrite:
regex_uri: ["^/apidocs/(.*)", "/$1"]

upstreams:
- id: 3
nodes:
"cloud-agent-issuer:8090": 1 # didcom and system
type: roundrobin
- id: 4
nodes:
"cloud-agent-issuer:8085": 1 # tapir
type: roundrobin
- id: 5
nodes:
"swagger-ui-issuer:8080": 1
type: roundrobin
#END
44 changes: 44 additions & 0 deletions infrastructure/shared/apisix/conf/apisix-verifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins:
- name: proxy-rewrite
- name: cors

routes:
- uri: /cloud-agent/*
upstream_id: 4
plugins:
cors:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/cloud-agent/(.*)", "/$1"]
- uri: /docs/cloud-agent/api/*
upstream_id: 4
plugins:
proxy-rewrite:
regex_uri: ["^/docs/cloud-agent/api/(.*)", "/docs/$1"]
- uri: /didcomm*
upstream_id: 3
plugins:
cors:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/didcomm(.*)", "/$1"]
- uri: /apidocs/*
upstream_id: 5
plugins:
proxy-rewrite:
regex_uri: ["^/apidocs/(.*)", "/$1"]

upstreams:
- id: 3
nodes:
"cloud-agent-verifier:8090": 1 # didcom and system
type: roundrobin
- id: 4
nodes:
"cloud-agent-verifier:8085": 1 # tapir
type: roundrobin
- id: 5
nodes:
"swagger-ui-verifier:8080": 1
type: roundrobin
#END
Loading

0 comments on commit 7365497

Please sign in to comment.