From 8a9bbeeb888065dc03a6f39d0ddf46b50f8365b4 Mon Sep 17 00:00:00 2001
From: kyy
Date: Mon, 2 Feb 2026 14:42:21 +0900
Subject: [PATCH 1/7] =?UTF-8?q?OIDC=20=ED=97=A4=EB=8D=94=20=EC=B2=98?=
=?UTF-8?q?=EB=A6=AC=20=EC=9C=84=ED=95=9C=20=EA=B2=8C=EC=9D=B4=ED=8A=B8?=
=?UTF-8?q?=EC=9B=A8=EC=9D=B4=20=EB=B0=8F=20=EC=9D=B8=ED=94=84=EB=9D=BC=20?=
=?UTF-8?q?=EC=84=A4=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
compose.ory.yaml | 8 +++-----
docker-compose.yaml | 1 +
gateway/nginx.conf | 2 ++
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/compose.ory.yaml b/compose.ory.yaml
index 3c90d7a7..44ddfac3 100644
--- a/compose.ory.yaml
+++ b/compose.ory.yaml
@@ -92,7 +92,7 @@ services:
container_name: ory_hydra
environment:
- DSN=postgres://${ORY_POSTGRES_USER}:${ORY_POSTGRES_PASSWORD}@postgres_ory:5432/${HYDRA_DB:-ory_hydra}?sslmode=disable&max_conns=20
- - URLS_SELF_ISSUER=${HYDRA_PUBLIC_URL:-http://localhost:5000/oidc}
+ - URLS_SELF_ISSUER=${USERFRONT_URL:-http://localhost:5000}/oidc
- URLS_LOGIN=${USERFRONT_URL:-http://localhost:5000}/login
- URLS_CONSENT=${USERFRONT_URL:-http://localhost:5000}/consent
- SECRETS_SYSTEM=${ORY_POSTGRES_PASSWORD}
@@ -106,8 +106,6 @@ services:
- ory-net
- hydranet
-
-
# --- Keto ---
keto-migrate:
image: oryd/keto:${KETO_VERSION:-v25.4.0}
@@ -229,8 +227,8 @@ services:
- hydranet
volumes:
- ory_postgres_data:
- ory_clickhouse_data:
+ ory_postgres_data:
+ ory_clickhouse_data:
networks:
ory-net:
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 981831c9..2b5e4ece 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -95,6 +95,7 @@ services:
- APP_ENV=${APP_ENV}
networks:
- baron_net
+ - ory-net
depends_on:
backend:
condition: service_healthy
diff --git a/gateway/nginx.conf b/gateway/nginx.conf
index 9b94fe8a..eeb6f234 100644
--- a/gateway/nginx.conf
+++ b/gateway/nginx.conf
@@ -21,6 +21,8 @@ log_format json_combined escape=json
server {
listen 5000;
+ client_header_buffer_size 16k;
+ large_client_header_buffers 4 64k;
include /etc/nginx/mime.types;
resolver 127.0.0.11 valid=10s ipv6=off;
From fa1f37dc90be611e9a53a17fe33c03b3ddaa9989 Mon Sep 17 00:00:00 2001
From: kyy
Date: Mon, 2 Feb 2026 14:43:55 +0900
Subject: [PATCH 2/7] =?UTF-8?q?Oathkeeper=20API=20=EC=95=A1=EC=84=B8?=
=?UTF-8?q?=EC=8A=A4=20=EA=B7=9C=EC=B9=99=20=EB=B0=8F=20=EA=B2=BD=EB=A1=9C?=
=?UTF-8?q?=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/ory/oathkeeper/rules.active.json | 45 +++++++++++++++++++++++++
docker/ory/oathkeeper/rules.json | 45 +++++++++++++++++++++++++
docker/ory/oathkeeper/rules.stage.json | 45 +++++++++++++++++++++++++
3 files changed, 135 insertions(+)
diff --git a/docker/ory/oathkeeper/rules.active.json b/docker/ory/oathkeeper/rules.active.json
index 921b8366..42a09d19 100755
--- a/docker/ory/oathkeeper/rules.active.json
+++ b/docker/ory/oathkeeper/rules.active.json
@@ -83,6 +83,21 @@
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
},
+ {
+ "id": "hydra-well-known-oidc",
+ "description": "Hydra OIDC Discovery & JWKS (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/.well-known/<.*>",
+ "methods": ["GET", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
+ },
{
"id": "hydra-oauth2",
"description": "Hydra OAuth2 Endpoints",
@@ -97,6 +112,21 @@
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
},
+ {
+ "id": "hydra-oauth2-oidc",
+ "description": "Hydra OAuth2 Endpoints (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/oauth2/<.*>",
+ "methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
+ },
{
"id": "hydra-userinfo",
"description": "Hydra Userinfo",
@@ -110,5 +140,20 @@
"authenticators": [{ "handler": "noop" }],
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
+ },
+ {
+ "id": "hydra-userinfo-oidc",
+ "description": "Hydra Userinfo (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/userinfo",
+ "methods": ["GET", "POST", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
}
]
diff --git a/docker/ory/oathkeeper/rules.json b/docker/ory/oathkeeper/rules.json
index 921b8366..42a09d19 100755
--- a/docker/ory/oathkeeper/rules.json
+++ b/docker/ory/oathkeeper/rules.json
@@ -83,6 +83,21 @@
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
},
+ {
+ "id": "hydra-well-known-oidc",
+ "description": "Hydra OIDC Discovery & JWKS (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/.well-known/<.*>",
+ "methods": ["GET", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
+ },
{
"id": "hydra-oauth2",
"description": "Hydra OAuth2 Endpoints",
@@ -97,6 +112,21 @@
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
},
+ {
+ "id": "hydra-oauth2-oidc",
+ "description": "Hydra OAuth2 Endpoints (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/oauth2/<.*>",
+ "methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
+ },
{
"id": "hydra-userinfo",
"description": "Hydra Userinfo",
@@ -110,5 +140,20 @@
"authenticators": [{ "handler": "noop" }],
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
+ },
+ {
+ "id": "hydra-userinfo-oidc",
+ "description": "Hydra Userinfo (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/userinfo",
+ "methods": ["GET", "POST", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
}
]
diff --git a/docker/ory/oathkeeper/rules.stage.json b/docker/ory/oathkeeper/rules.stage.json
index e65e9d51..42383387 100755
--- a/docker/ory/oathkeeper/rules.stage.json
+++ b/docker/ory/oathkeeper/rules.stage.json
@@ -83,6 +83,21 @@
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
},
+ {
+ "id": "hydra-well-known-oidc",
+ "description": "Hydra OIDC Discovery & JWKS (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/.well-known/<.*>",
+ "methods": ["GET", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
+ },
{
"id": "hydra-oauth2",
"description": "Hydra OAuth2 Endpoints",
@@ -97,6 +112,21 @@
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
},
+ {
+ "id": "hydra-oauth2-oidc",
+ "description": "Hydra OAuth2 Endpoints (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/oauth2/<.*>",
+ "methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
+ },
{
"id": "hydra-userinfo",
"description": "Hydra Userinfo",
@@ -110,5 +140,20 @@
"authenticators": [{ "handler": "noop" }],
"authorizer": { "handler": "allow" },
"mutators": [{ "handler": "noop" }]
+ },
+ {
+ "id": "hydra-userinfo-oidc",
+ "description": "Hydra Userinfo (with /oidc prefix)",
+ "match": {
+ "url": "<.*>://sso-test.hmac.kr/oidc/userinfo",
+ "methods": ["GET", "POST", "OPTIONS"]
+ },
+ "upstream": {
+ "url": "http://hydra:4444",
+ "strip_path_prefix": "/oidc"
+ },
+ "authenticators": [{ "handler": "noop" }],
+ "authorizer": { "handler": "allow" },
+ "mutators": [{ "handler": "noop" }]
}
]
\ No newline at end of file
From 849424f0300c3e00b30124634526d8d1d7a99fb5 Mon Sep 17 00:00:00 2001
From: kyy
Date: Mon, 2 Feb 2026 14:44:33 +0900
Subject: [PATCH 3/7] =?UTF-8?q?OIDC=20=EC=9D=B8=EC=A6=9D=20=EB=A1=9C?=
=?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EB=B0=B1=EC=97=94?=
=?UTF-8?q?=EB=93=9C=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EC=98=A4=EB=A5=98=20?=
=?UTF-8?q?=ED=95=B4=EA=B2=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/cmd/server/main.go | 4 +
backend/internal/handler/auth_handler.go | 62 +++++++-
.../internal/service/hydra_admin_service.go | 140 ++++++++++++++++++
3 files changed, 204 insertions(+), 2 deletions(-)
diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go
index 0b1c84fa..63d8a4c7 100644
--- a/backend/cmd/server/main.go
+++ b/backend/cmd/server/main.go
@@ -242,6 +242,7 @@ func main() {
app := fiber.New(fiber.Config{
AppName: "Baron SSO Backend",
DisableStartupMessage: true, // Clean logs
+ ReadBufferSize: 32768, // 32KB로 증가 (긴 OIDC 챌린지 대응)
// Global Error Handler for Production Masking
ErrorHandler: func(c *fiber.Ctx, err error) error {
// Default status code
@@ -459,6 +460,9 @@ func main() {
auth.Post("/login/code/verify", authHandler.VerifyLoginCode)
auth.Post("/login/code/verify-short", authHandler.VerifyLoginShortCode)
auth.Post("/password/login", authHandler.PasswordLogin)
+ auth.Get("/consent", authHandler.GetConsentRequest)
+ auth.Post("/consent/accept", authHandler.AcceptConsentRequest)
+
auth.Post("/password/reset/initiate", authHandler.InitiatePasswordReset)
// [Changed] Use Interstitial Page for GET to prevent Scanner consumption
auth.Get("/password/reset/verify", authHandler.VerifyPasswordResetPage)
diff --git a/backend/internal/handler/auth_handler.go b/backend/internal/handler/auth_handler.go
index 197233d7..bd123dd6 100644
--- a/backend/internal/handler/auth_handler.go
+++ b/backend/internal/handler/auth_handler.go
@@ -1266,8 +1266,9 @@ func (h *AuthHandler) PasswordLogin(c *fiber.Ctx) error {
ale.Operation = "Auth.Password().SignIn"
var req struct {
- LoginID string `json:"loginId"`
- Password string `json:"password"`
+ LoginID string `json:"loginId"`
+ Password string `json:"password"`
+ LoginChallenge string `json:"login_challenge,omitempty"`
}
if err := c.BodyParser(&req); err != nil {
@@ -1314,6 +1315,21 @@ func (h *AuthHandler) PasswordLogin(c *fiber.Ctx) error {
setSessionIDLocal(c, authInfo.SessionToken)
ale.Log(slog.LevelInfo, "Login successful", slog.String("provider", h.IdpProvider.Name()), slog.String("subject", authInfo.Subject))
+ // --- OIDC 로그인 흐름 처리 ---
+ if req.LoginChallenge != "" {
+ slog.Info("OIDC login flow detected", "challenge", req.LoginChallenge)
+ acceptResp, err := h.Hydra.AcceptLoginRequest(c.Context(), req.LoginChallenge, authInfo.Subject)
+ if err != nil {
+ slog.Error("failed to accept hydra login request", "error", err)
+ return fiber.NewError(fiber.StatusInternalServerError, "Failed to accept OIDC login request")
+ }
+ slog.Info("Hydra login request accepted", "redirectTo", acceptResp.RedirectTo)
+ return c.JSON(fiber.Map{
+ "redirectTo": acceptResp.RedirectTo,
+ })
+ }
+ // --- OIDC 로그인 흐름 처리 끝 ---
+
resp := fiber.Map{
"sessionJwt": authInfo.SessionToken.JWT,
"status": "ok",
@@ -2897,6 +2913,48 @@ func (h *AuthHandler) ListLinkedRps(c *fiber.Ctx) error {
return c.JSON(linkedRpListResponse{Items: items})
}
+func (h *AuthHandler) GetConsentRequest(c *fiber.Ctx) error {
+ challenge := c.Query("consent_challenge")
+ if challenge == "" {
+ return fiber.NewError(fiber.StatusBadRequest, "consent_challenge is required")
+ }
+
+ consentRequest, err := h.Hydra.GetConsentRequest(c.Context(), challenge)
+ if err != nil {
+ slog.Error("failed to get hydra consent request", "error", err)
+ return fiber.NewError(fiber.StatusInternalServerError, "Failed to get consent information")
+ }
+
+ return c.JSON(consentRequest)
+}
+
+func (h *AuthHandler) AcceptConsentRequest(c *fiber.Ctx) error {
+ var req struct {
+ ConsentChallenge string `json:"consent_challenge"`
+ }
+ if err := c.BodyParser(&req); err != nil {
+ return fiber.NewError(fiber.StatusBadRequest, "Invalid request body")
+ }
+ if req.ConsentChallenge == "" {
+ return fiber.NewError(fiber.StatusBadRequest, "consent_challenge is required")
+ }
+
+ consentRequest, err := h.Hydra.GetConsentRequest(c.Context(), req.ConsentChallenge)
+ if err != nil {
+ slog.Error("failed to get hydra consent request before accepting", "error", err)
+ return fiber.NewError(fiber.StatusInternalServerError, "Failed to get consent information")
+ }
+
+ acceptResp, err := h.Hydra.AcceptConsentRequest(c.Context(), req.ConsentChallenge, consentRequest)
+ if err != nil {
+ slog.Error("failed to accept hydra consent request", "error", err)
+ return fiber.NewError(fiber.StatusInternalServerError, "Failed to accept consent request")
+ }
+
+ return c.JSON(acceptResp)
+}
+
+
func (h *AuthHandler) resolveCurrentProfile(c *fiber.Ctx) (*domain.UserProfileResponse, error) {
token := h.getBearerToken(c)
if token != "" {
diff --git a/backend/internal/service/hydra_admin_service.go b/backend/internal/service/hydra_admin_service.go
index 6d77cebf..103bc45f 100644
--- a/backend/internal/service/hydra_admin_service.go
+++ b/backend/internal/service/hydra_admin_service.go
@@ -36,6 +36,15 @@ type HydraClient struct {
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
+type HydraConsentRequest struct {
+ Challenge string `json:"challenge"`
+ RequestedScope []string `json:"requested_scope"`
+ RequestedAudience []string `json:"requested_access_token_audience"`
+ Skip bool `json:"skip"`
+ Subject string `json:"subject"`
+ Client HydraClient `json:"client"`
+}
+
type HydraConsentSession struct {
Subject string `json:"subject"`
GrantedScope []string `json:"granted_scope"`
@@ -347,3 +356,134 @@ func (s *HydraAdminService) buildURLWithParams(path string, params map[string]st
u.RawQuery = q.Encode()
return u.String(), nil
}
+
+type AcceptLoginRequestResponse struct {
+ RedirectTo string `json:"redirectTo"`
+}
+
+type AcceptConsentRequestResponse struct {
+ RedirectTo string `json:"redirectTo"`
+}
+
+func (s *HydraAdminService) GetConsentRequest(ctx context.Context, challenge string) (*HydraConsentRequest, error) {
+ params := map[string]string{
+ "consent_challenge": challenge,
+ }
+ endpoint, err := s.buildURLWithParams("/oauth2/auth/requests/consent", params)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)
+ if err != nil {
+ return nil, fmt.Errorf("hydra admin: create request for get consent failed: %w", err)
+ }
+
+ resp, err := s.httpClient().Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("hydra admin: get consent request failed: %w", err)
+ }
+ defer resp.Body.Close()
+
+ body, _ := io.ReadAll(resp.Body)
+ if resp.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("hydra admin: get consent failed status=%d body=%s", resp.StatusCode, string(body))
+ }
+
+ var consentReq HydraConsentRequest
+ if err := json.Unmarshal(body, &consentReq); err != nil {
+ return nil, fmt.Errorf("hydra admin: decode get consent response failed: %w", err)
+ }
+
+ return &consentReq, nil
+}
+
+func (s *HydraAdminService) AcceptConsentRequest(ctx context.Context, challenge string, grantInfo *HydraConsentRequest) (*AcceptConsentRequestResponse, error) {
+ params := map[string]string{
+ "consent_challenge": challenge,
+ }
+ endpoint, err := s.buildURLWithParams("/oauth2/auth/requests/consent/accept", params)
+ if err != nil {
+ return nil, err
+ }
+
+ payload := map[string]interface{}{
+ "grant_scope": grantInfo.RequestedScope,
+ "grant_audience": grantInfo.RequestedAudience,
+ "remember": true,
+ "remember_for": 3600,
+ }
+ body, _ := json.Marshal(payload)
+
+ req, err := http.NewRequestWithContext(ctx, "PUT", endpoint, bytes.NewReader(body))
+ if err != nil {
+ return nil, fmt.Errorf("hydra admin: create request for accept consent failed: %w", err)
+ }
+ req.Header.Set("Content-Type", "application/json")
+
+ resp, err := s.httpClient().Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("hydra admin: accept consent request failed: %w", err)
+ }
+ defer resp.Body.Close()
+
+ respBody, _ := io.ReadAll(resp.Body)
+ if resp.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("hydra admin: accept consent failed status=%d body=%s", resp.StatusCode, string(respBody))
+ }
+
+ // Hydra 응답(redirect_to)을 읽어서 우리 응답(redirectTo)으로 변환
+ var hydraResp struct {
+ RedirectTo string `json:"redirect_to"`
+ }
+ if err := json.Unmarshal(respBody, &hydraResp); err != nil {
+ return nil, fmt.Errorf("hydra admin: decode accept consent response failed: %w", err)
+ }
+
+ return &AcceptConsentRequestResponse{RedirectTo: hydraResp.RedirectTo}, nil
+}
+
+
+func (s *HydraAdminService) AcceptLoginRequest(ctx context.Context, challenge string, subject string) (*AcceptLoginRequestResponse, error) {
+ params := map[string]string{
+ "login_challenge": challenge,
+ }
+ endpoint, err := s.buildURLWithParams("/oauth2/auth/requests/login/accept", params)
+ if err != nil {
+ return nil, err
+ }
+
+ payload := map[string]interface{}{
+ "subject": subject,
+ "remember": true,
+ "remember_for": 3600,
+ }
+ body, _ := json.Marshal(payload)
+
+ req, err := http.NewRequestWithContext(ctx, "PUT", endpoint, bytes.NewReader(body))
+ if err != nil {
+ return nil, fmt.Errorf("hydra admin: create request for accept login failed: %w", err)
+ }
+ req.Header.Set("Content-Type", "application/json")
+
+ resp, err := s.httpClient().Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("hydra admin: accept login request failed: %w", err)
+ }
+ defer resp.Body.Close()
+
+ respBody, _ := io.ReadAll(resp.Body)
+ if resp.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("hydra admin: accept login failed status=%d body=%s", resp.StatusCode, string(respBody))
+ }
+
+ // Hydra 응답(redirect_to)을 읽어서 우리 응답(redirectTo)으로 변환
+ var hydraResp struct {
+ RedirectTo string `json:"redirect_to"`
+ }
+ if err := json.Unmarshal(respBody, &hydraResp); err != nil {
+ return nil, fmt.Errorf("hydra admin: decode accept login response failed: %w", err)
+ }
+
+ return &AcceptLoginRequestResponse{RedirectTo: hydraResp.RedirectTo}, nil
+}
From 3a3ea4879ef473cc24874c9f2ea065c7e6b32110 Mon Sep 17 00:00:00 2001
From: kyy
Date: Mon, 2 Feb 2026 14:45:04 +0900
Subject: [PATCH 4/7] =?UTF-8?q?=ED=94=84=EB=A1=A0=ED=8A=B8=EC=97=94?=
=?UTF-8?q?=EB=93=9C=20=EB=8F=99=EC=9D=98=20=ED=99=94=EB=A9=B4=20=EC=B6=94?=
=?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20OIDC=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?=
=?UTF-8?q?=ED=9D=90=EB=A6=84=20=EC=99=84=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../lib/core/services/auth_proxy_service.dart | 50 ++++++-
.../auth/presentation/consent_screen.dart | 123 ++++++++++++++++++
.../auth/presentation/login_screen.dart | 54 ++++----
userfront/lib/main.dart | 30 ++++-
4 files changed, 215 insertions(+), 42 deletions(-)
create mode 100644 userfront/lib/features/auth/presentation/consent_screen.dart
diff --git a/userfront/lib/core/services/auth_proxy_service.dart b/userfront/lib/core/services/auth_proxy_service.dart
index 8389815f..4d9886ec 100644
--- a/userfront/lib/core/services/auth_proxy_service.dart
+++ b/userfront/lib/core/services/auth_proxy_service.dart
@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'http_client.dart';
+import 'dart:html' as html;
class AuthProxyService {
static String _envOrDefault(String key, String fallback) {
@@ -196,23 +197,60 @@ class AuthProxyService {
}
}
- static Future
{data.client.id}
-
+
toast("Client ID가 복사되었습니다.")}
+ />
@@ -173,14 +176,11 @@ function ClientDetailsPage() {
>
{showSecret ? : }
-
+ onCopy={() => toast("Client Secret이 복사되었습니다.")}
+ />
@@ -213,14 +213,11 @@ function ClientDetailsPage() {
{endpoint.value}
-
+ onCopy={() => toast(`${endpoint.label}가 복사되었습니다.`)}
+ />
))}
diff --git a/devfront/src/features/clients/ClientsPage.tsx b/devfront/src/features/clients/ClientsPage.tsx
index 14a0d3f6..a3ed28a7 100644
--- a/devfront/src/features/clients/ClientsPage.tsx
+++ b/devfront/src/features/clients/ClientsPage.tsx
@@ -42,6 +42,8 @@ import {
updateClientStatus,
} from "../../lib/devApi";
import { cn } from "../../lib/utils";
+import { CopyButton } from "../../components/ui/copy-button";
+import { toast } from "../../components/ui/use-toast";
function ClientsPage() {
const navigate = useNavigate();
@@ -231,15 +233,13 @@ function ClientsPage() {
{client.id}
-
+ onCopy={() => toast("클라이언트 ID가 복사되었습니다.")}
+ />
From f756959bbedda6c7f51f3178061afa40b07332c6 Mon Sep 17 00:00:00 2001
From: kyy
Date: Mon, 2 Feb 2026 16:59:28 +0900
Subject: [PATCH 7/7] =?UTF-8?q?sso-test=20=EA=B3=A0=EC=A0=95=20=EC=A0=9C?=
=?UTF-8?q?=EA=B1=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/ory/oathkeeper/rules.active.json | 6 +++---
docker/ory/oathkeeper/rules.json | 6 +++---
docker/ory/oathkeeper/rules.stage.json | 28 ++++++++++++-------------
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/docker/ory/oathkeeper/rules.active.json b/docker/ory/oathkeeper/rules.active.json
index 42a09d19..fd6bfb2d 100755
--- a/docker/ory/oathkeeper/rules.active.json
+++ b/docker/ory/oathkeeper/rules.active.json
@@ -87,7 +87,7 @@
"id": "hydra-well-known-oidc",
"description": "Hydra OIDC Discovery & JWKS (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/.well-known/<.*>",
+ "url": "<.*>://<.*>/oidc/.well-known/<.*>",
"methods": ["GET", "OPTIONS"]
},
"upstream": {
@@ -116,7 +116,7 @@
"id": "hydra-oauth2-oidc",
"description": "Hydra OAuth2 Endpoints (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/oauth2/<.*>",
+ "url": "<.*>://<.*>/oidc/oauth2/<.*>",
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
},
"upstream": {
@@ -145,7 +145,7 @@
"id": "hydra-userinfo-oidc",
"description": "Hydra Userinfo (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/userinfo",
+ "url": "<.*>://<.*>/oidc/userinfo",
"methods": ["GET", "POST", "OPTIONS"]
},
"upstream": {
diff --git a/docker/ory/oathkeeper/rules.json b/docker/ory/oathkeeper/rules.json
index 42a09d19..fd6bfb2d 100755
--- a/docker/ory/oathkeeper/rules.json
+++ b/docker/ory/oathkeeper/rules.json
@@ -87,7 +87,7 @@
"id": "hydra-well-known-oidc",
"description": "Hydra OIDC Discovery & JWKS (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/.well-known/<.*>",
+ "url": "<.*>://<.*>/oidc/.well-known/<.*>",
"methods": ["GET", "OPTIONS"]
},
"upstream": {
@@ -116,7 +116,7 @@
"id": "hydra-oauth2-oidc",
"description": "Hydra OAuth2 Endpoints (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/oauth2/<.*>",
+ "url": "<.*>://<.*>/oidc/oauth2/<.*>",
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
},
"upstream": {
@@ -145,7 +145,7 @@
"id": "hydra-userinfo-oidc",
"description": "Hydra Userinfo (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/userinfo",
+ "url": "<.*>://<.*>/oidc/userinfo",
"methods": ["GET", "POST", "OPTIONS"]
},
"upstream": {
diff --git a/docker/ory/oathkeeper/rules.stage.json b/docker/ory/oathkeeper/rules.stage.json
index 42383387..4a0735da 100755
--- a/docker/ory/oathkeeper/rules.stage.json
+++ b/docker/ory/oathkeeper/rules.stage.json
@@ -1,9 +1,9 @@
[
{
"id": "public-health",
- "description": "공개 헬스체크 (STAGE 도메인)",
+ "description": "공개 헬스체크",
"match": {
- "url": "<.*>://sso-test.hmac.kr/health",
+ "url": "<.*>://<.*>/health",
"methods": ["GET"]
},
"upstream": {
@@ -15,9 +15,9 @@
},
{
"id": "public-preflight",
- "description": "CORS preflight (STAGE 도메인)",
+ "description": "CORS preflight",
"match": {
- "url": "<.*>://sso-test.hmac.kr/api/v1/<.*>",
+ "url": "<.*>://<.*>/api/v1/<.*>",
"methods": ["OPTIONS"]
},
"upstream": {
@@ -29,9 +29,9 @@
},
{
"id": "public-auth",
- "description": "인증/회원가입 등 공개 엔드포인트 (STAGE 도메인)",
+ "description": "인증/회원가입 등 공개 엔드포인트",
"match": {
- "url": "<.*>://sso-test.hmac.kr/api/v1/auth/<.*>",
+ "url": "<.*>://<.*>/api/v1/auth/<.*>",
"methods": ["GET", "POST", "OPTIONS"]
},
"upstream": {
@@ -45,7 +45,7 @@
"id": "backend-command",
"description": "Command 요청은 Backend로 전달 (Audit 강제)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/api/v1/<.*>",
+ "url": "<.*>://<.*>/api/v1/<.*>",
"methods": ["POST", "PUT", "PATCH", "DELETE"]
},
"upstream": {
@@ -59,7 +59,7 @@
"id": "backend-query",
"description": "Backend Query (admin/dev 포함)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/api/v1/<.*>",
+ "url": "<.*>://<.*>/api/v1/<.*>",
"methods": ["GET"]
},
"upstream": {
@@ -73,7 +73,7 @@
"id": "hydra-well-known",
"description": "Hydra OIDC Discovery & JWKS",
"match": {
- "url": "<.*>://sso-test.hmac.kr/.well-known/<.*>",
+ "url": "<.*>://<.*>/.well-known/<.*>",
"methods": ["GET", "OPTIONS"]
},
"upstream": {
@@ -87,7 +87,7 @@
"id": "hydra-well-known-oidc",
"description": "Hydra OIDC Discovery & JWKS (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/.well-known/<.*>",
+ "url": "<.*>://<.*>/oidc/.well-known/<.*>",
"methods": ["GET", "OPTIONS"]
},
"upstream": {
@@ -102,7 +102,7 @@
"id": "hydra-oauth2",
"description": "Hydra OAuth2 Endpoints",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oauth2/<.*>",
+ "url": "<.*>://<.*>/oauth2/<.*>",
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
},
"upstream": {
@@ -116,7 +116,7 @@
"id": "hydra-oauth2-oidc",
"description": "Hydra OAuth2 Endpoints (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/oauth2/<.*>",
+ "url": "<.*>://<.*>/oidc/oauth2/<.*>",
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
},
"upstream": {
@@ -131,7 +131,7 @@
"id": "hydra-userinfo",
"description": "Hydra Userinfo",
"match": {
- "url": "<.*>://sso-test.hmac.kr/userinfo",
+ "url": "<.*>://<.*>/userinfo",
"methods": ["GET", "POST", "OPTIONS"]
},
"upstream": {
@@ -145,7 +145,7 @@
"id": "hydra-userinfo-oidc",
"description": "Hydra Userinfo (with /oidc prefix)",
"match": {
- "url": "<.*>://sso-test.hmac.kr/oidc/userinfo",
+ "url": "<.*>://<.*>/oidc/userinfo",
"methods": ["GET", "POST", "OPTIONS"]
},
"upstream": {