From cfaab9e0b7d58070755a0f3510cf10f8c1b9fb07 Mon Sep 17 00:00:00 2001 From: iverly Date: Mon, 27 Nov 2023 14:17:44 +0100 Subject: [PATCH] feat: add http-dump for dev needs Signed-off-by: iverly --- config/oathkeeper/rules/dev.yaml | 32 ++++++++++++++++++++++++++++++++ docker-compose.dev.yaml | 6 ++++++ 2 files changed, 38 insertions(+) diff --git a/config/oathkeeper/rules/dev.yaml b/config/oathkeeper/rules/dev.yaml index a5e67d8..b0c774b 100644 --- a/config/oathkeeper/rules/dev.yaml +++ b/config/oathkeeper/rules/dev.yaml @@ -113,6 +113,38 @@ mutators: - handler: noop +- id: "dev:http-dump:anonymous" + upstream: + preserve_host: true + url: "http://http-dump:3000" + match: + url: "http://http-dump.dev.nx-next-nest-prisma-ory-template.127.0.0.1.sslip.io/anonymous" + methods: + - GET + authenticators: + - handler: anonymous + authorizer: + handler: allow + mutators: + - handler: noop + +- id: "dev:http-dump:protected" + upstream: + preserve_host: true + url: "http://http-dump:3000" + match: + url: "http://http-dump.dev.nx-next-nest-prisma-ory-template.127.0.0.1.sslip.io/protected" + methods: + - GET + authenticators: + - handler: cookie_session + authorizer: + handler: allow + mutators: + - handler: id_token + errors: + - handler: redirect + - id: "dev:api-swagger:anonymous" upstream: preserve_host: true diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml index 38675fc..fcff333 100644 --- a/docker-compose.dev.yaml +++ b/docker-compose.dev.yaml @@ -77,6 +77,12 @@ services: volumes: - keto_init_dev_data:/tmp + # http dump + http-dump: + image: nomadscafe.sakuracr.jp/http-dump-request + container_name: dev-http-dump + restart: unless-stopped + # database postgres: container_name: dev-postgres