forked from baron/baron-sso
fix: gateway oidc rewrite and abstract rules
This commit is contained in:
@@ -31,12 +31,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "${BACKEND_PORT:-3000}:3000"
|
- "${BACKEND_PORT:-3000}:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
- infra_check
|
||||||
condition: service_healthy
|
|
||||||
redis:
|
|
||||||
condition: service_started
|
|
||||||
clickhouse:
|
|
||||||
condition: service_started
|
|
||||||
networks:
|
networks:
|
||||||
- baron_net
|
- baron_net
|
||||||
- ory-net
|
- ory-net
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": "public-health",
|
"id": "public-health",
|
||||||
"description": "공개 헬스체크 (STAGE 도메인)",
|
"description": "공개 헬스체크",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/health",
|
"url": "<.*>://<.*>/health",
|
||||||
"methods": ["GET"]
|
"methods": ["GET"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -15,9 +15,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "public-preflight",
|
"id": "public-preflight",
|
||||||
"description": "CORS preflight (STAGE 도메인)",
|
"description": "CORS preflight",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/api/v1/<.*>",
|
"url": "<.*>://<.*>/api/v1/<.*>",
|
||||||
"methods": ["OPTIONS"]
|
"methods": ["OPTIONS"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "public-auth",
|
"id": "public-auth",
|
||||||
"description": "인증/회원가입 등 공개 엔드포인트 (STAGE 도메인)",
|
"description": "인증/회원가입 등 공개 엔드포인트",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/api/v1/auth/<.*>",
|
"url": "<.*>://<.*>/api/v1/auth/<.*>",
|
||||||
"methods": ["GET", "POST", "OPTIONS"]
|
"methods": ["GET", "POST", "OPTIONS"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"id": "backend-command",
|
"id": "backend-command",
|
||||||
"description": "Command 요청은 Backend로 전달 (Audit 강제)",
|
"description": "Command 요청은 Backend로 전달 (Audit 강제)",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/api/v1/<.*>",
|
"url": "<.*>://<.*>/api/v1/<.*>",
|
||||||
"methods": ["POST", "PUT", "PATCH", "DELETE"]
|
"methods": ["POST", "PUT", "PATCH", "DELETE"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"id": "backend-query",
|
"id": "backend-query",
|
||||||
"description": "Backend Query (admin/dev 포함)",
|
"description": "Backend Query (admin/dev 포함)",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/api/v1/<.*>",
|
"url": "<.*>://<.*>/api/v1/<.*>",
|
||||||
"methods": ["GET"]
|
"methods": ["GET"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
"id": "hydra-well-known",
|
"id": "hydra-well-known",
|
||||||
"description": "Hydra OIDC Discovery & JWKS",
|
"description": "Hydra OIDC Discovery & JWKS",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/.well-known/<.*>",
|
"url": "<.*>://<.*>/.well-known/<.*>",
|
||||||
"methods": ["GET", "OPTIONS"]
|
"methods": ["GET", "OPTIONS"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
"id": "hydra-oauth2",
|
"id": "hydra-oauth2",
|
||||||
"description": "Hydra OAuth2 Endpoints",
|
"description": "Hydra OAuth2 Endpoints",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/oauth2/<.*>",
|
"url": "<.*>://<.*>/oauth2/<.*>",
|
||||||
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
|
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
"id": "hydra-userinfo",
|
"id": "hydra-userinfo",
|
||||||
"description": "Hydra Userinfo",
|
"description": "Hydra Userinfo",
|
||||||
"match": {
|
"match": {
|
||||||
"url": "<.*>://sso-test.hmac.kr/userinfo",
|
"url": "<.*>://<.*>/userinfo",
|
||||||
"methods": ["GET", "POST", "OPTIONS"]
|
"methods": ["GET", "POST", "OPTIONS"]
|
||||||
},
|
},
|
||||||
"upstream": {
|
"upstream": {
|
||||||
@@ -111,4 +111,4 @@
|
|||||||
"authorizer": { "handler": "allow" },
|
"authorizer": { "handler": "allow" },
|
||||||
"mutators": [{ "handler": "noop" }]
|
"mutators": [{ "handler": "noop" }]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ server {
|
|||||||
|
|
||||||
# Hydra Public API
|
# Hydra Public API
|
||||||
location /oidc {
|
location /oidc {
|
||||||
|
rewrite ^/oidc/(.*)$ /$1 break;
|
||||||
proxy_pass $oathkeeper_upstream;
|
proxy_pass $oathkeeper_upstream;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
Reference in New Issue
Block a user