Skip to content

Commit 2af831f

Browse files
committed
Proxy all API endpoints to the dev container
Signed-off-by: Federico Busetti <[email protected]>
1 parent e1d4919 commit 2af831f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

auth_volumes/oathkeeper/access-rules.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,14 @@
7373
config:
7474
to: http://127.0.0.1:8080/login
7575

76-
# Dev container access to protected /hello endpoint
76+
# Dev container access to protected /api/* endpoints, to the dev container
7777
- id: "http_app:protected"
7878
upstream:
7979
preserve_host: true
8080
url: "http://dev:8000"
81+
strip_path: /api
8182
match:
82-
url: "http://127.0.0.1:8080/hello<{,/,/**}>"
83+
url: "http://127.0.0.1:8080/<{,api/,api/**,openapi.json}>"
8384
methods:
8485
- GET
8586
authenticators:

docs/zero_trust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ subgraph dn["Internal Docker Network (intranet)"]
5050
OO-->|"Proxies /auth/login, /auth/registration, /dashboard, ... to"|SA
5151
SA-->|Talks to|OK
5252
OO-->|Validates auth sessions using|OK
53-
OO-->|"Proxies /hello to"|DEV
53+
OO-->|"Proxies /api/* requests (authenticated only)"|DEV
5454
OK[Ory Kratos]
5555
OO["Reverse Proxy (Ory Oathkeeper)"]
5656
SA["SecureApp (Ory Kratos SelfService UI Node Example)"]

0 commit comments

Comments
 (0)