diff --git a/README.md b/README.md index 66ca662f..c44cfd3e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Baron SSO -**Baron 통합로그인**은 화이트 라벨링된 가족사의 모든 소프트웨어 Auth를 총괄하는 사용자 인증/인가 허브입니다. +**Baron 로그인**은 화이트 라벨링된 가족사의 모든 소프트웨어 Auth를 총괄하는 사용자 인증/인가 허브입니다. * Ory Stack으로 모든 구성요소를 self-hosting 합니다. * Backend는 Go (Fiber)로 구성된 Ory Stack의 유일한 Command 전송 포인트입니다. 모든 Command는 ClickHouse로 강제 전송되며 Audit Log 시스템을 구성합니다. @@ -75,7 +75,7 @@ flowchart ### 4. 주요 시나리오 (Core Scenarios) -1. **Same Browser SSO**: Baron 통합로그인 서비스에 로그인된 상태에서 런처를 통해 타 앱/서비스로 이동 (자동 로그인). +1. **Same Browser SSO**: Baron 로그인 서비스에 로그인된 상태에서 런처를 통해 타 앱/서비스로 이동 (자동 로그인). 1.1. 단 약관동의(Consent) 이력이 없으면 Consent 단계로 이동 2. **Cross-Device Auth**: 이메일 SMS 등의 수단으로 링크를 전달받고 해당 링크를 사용자가 클릭하면 최초 로그인 요청한 세션이 활성화 2.1 향후 App Push 등 2차 인증 강화수단 검토 필요 diff --git a/adminfront/src/components/layout/AppLayout.tsx b/adminfront/src/components/layout/AppLayout.tsx index 03f37346..ffe26ab3 100644 --- a/adminfront/src/components/layout/AppLayout.tsx +++ b/adminfront/src/components/layout/AppLayout.tsx @@ -1,142 +1,148 @@ import { - BadgeCheck, - Building2, - Key, - KeyRound, - LayoutDashboard, - Moon, - NotebookTabs, - ShieldHalf, - Sun, - Users, + BadgeCheck, + Building2, + Key, + KeyRound, + LayoutDashboard, + Moon, + NotebookTabs, + ShieldHalf, + Sun, + Users, } from "lucide-react"; import { useEffect, useState } from "react"; import { NavLink, Outlet } from "react-router-dom"; import RoleSwitcher from "./RoleSwitcher"; const navItems = [ - { label: "Overview", to: "/", icon: LayoutDashboard }, - { label: "Tenant Dashboard", to: "/dashboard", icon: ShieldHalf }, - { label: "Tenants", to: "/tenants", icon: Building2 }, - { label: "Users", to: "/users", icon: Users }, - { label: "API Keys (M2M)", to: "/api-keys", icon: Key }, - { label: "Audit Logs", to: "/audit-logs", icon: NotebookTabs }, - { label: "Auth Guard", to: "/auth", icon: KeyRound }, + { label: "Overview", to: "/", icon: LayoutDashboard }, + { label: "Tenant Dashboard", to: "/dashboard", icon: ShieldHalf }, + { label: "Tenants", to: "/tenants", icon: Building2 }, + { label: "Users", to: "/users", icon: Users }, + { label: "API Keys (M2M)", to: "/api-keys", icon: Key }, + { label: "Audit Logs", to: "/audit-logs", icon: NotebookTabs }, + { label: "Auth Guard", to: "/auth", icon: KeyRound }, ]; function AppLayout() { - const [theme, setTheme] = useState<"light" | "dark">(() => { - const stored = window.localStorage.getItem("admin_theme"); - return stored === "dark" ? "dark" : "light"; - }); + const [theme, setTheme] = useState<"light" | "dark">(() => { + const stored = window.localStorage.getItem("admin_theme"); + return stored === "dark" ? "dark" : "light"; + }); - useEffect(() => { - const root = document.documentElement; - root.classList.remove("light", "dark"); - if (theme === "light") { - root.classList.add("light"); - } else { - root.classList.add("dark"); - } - window.localStorage.setItem("admin_theme", theme); - }, [theme]); + useEffect(() => { + const root = document.documentElement; + root.classList.remove("light", "dark"); + if (theme === "light") { + root.classList.add("light"); + } else { + root.classList.add("dark"); + } + window.localStorage.setItem("admin_theme", theme); + }, [theme]); - const toggleTheme = () => { - setTheme((prev) => (prev === "light" ? "dark" : "light")); - }; + const toggleTheme = () => { + setTheme((prev) => (prev === "light" ? "dark" : "light")); + }; - return ( -
- - -
-
-
-
-

- Admin Plane -

- - Tenant isolation & least privilege by default - -
-
- - - Session TTL: 15m admin - -
-
-
-
- -
- -
-
- ); + ); } export default AppLayout; diff --git a/backend/internal/handler/auth_handler.go b/backend/internal/handler/auth_handler.go index 1294bea5..9668ac02 100644 --- a/backend/internal/handler/auth_handler.go +++ b/backend/internal/handler/auth_handler.go @@ -237,7 +237,7 @@ func (h *AuthHandler) SendSignupEmailCode(c *fiber.Ctx) error { return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Email service not configured"}) } - subject := "[Baron 통합로그인] 회원가입 인증코드" + subject := "[Baron 로그인] 회원가입 인증코드" body := fmt.Sprintf(`

이메일 인증

@@ -287,7 +287,7 @@ func (h *AuthHandler) SendSignupSmsCode(c *fiber.Ctx) error { h.saveSignupState(key, newState, signupStateExpiration) // 4. Send SMS - content := fmt.Sprintf("[Baron 통합로그인] 인증번호 [%s]를 입력해주세요.", code) + content := fmt.Sprintf("[Baron 로그인] 인증번호 [%s]를 입력해주세요.", code) go h.SmsService.SendSms(phone, content) return c.JSON(fiber.Map{"message": "Verification code sent"}) @@ -808,7 +808,7 @@ func (h *AuthHandler) SendSms(c *fiber.Ctx) error { sanitizedPhone := strings.ReplaceAll(req.PhoneNumber, "-", "") rand.Seed(time.Now().UnixNano()) code := fmt.Sprintf("%06d", rand.Intn(1000000)) - content := fmt.Sprintf("[Baron 통합로그인] 인증번호: %s", code) + content := fmt.Sprintf("[Baron 로그인] 인증번호: %s", code) h.RedisService.StoreVerificationCode(sanitizedPhone, code) if err := h.SmsService.SendSms(sanitizedPhone, content); err != nil { @@ -991,10 +991,10 @@ func (h *AuthHandler) InitEnchantedLink(c *fiber.Ctx) error { return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Email service not configured"}) } - subject := "[Baron 통합로그인] 링크" + subject := "[Baron 로그인] 링크" body := fmt.Sprintf(`
-

Baron SSO 로그인

+

Baron 로그인

안녕하세요,

아래 버튼을 클릭하여 로그인을 완료해 주세요. 이 링크는 5분 동안 유효합니다.

@@ -1016,7 +1016,7 @@ func (h *AuthHandler) InitEnchantedLink(c *fiber.Ctx) error { } } else { // Send SMS - content := fmt.Sprintf("[Baron 통합로그인] 로그인 링크: %s | 코드: %s", link, userCode) + content := fmt.Sprintf("[Baron 로그인] 로그인 링크: %s | 코드: %s", link, userCode) if drySend { slog.Info("[Enchanted][DrySend] SMS send skipped", "loginID", loginID, "content", content) } else { @@ -1677,10 +1677,10 @@ func (h *AuthHandler) InitiatePasswordReset(c *fiber.Ctx) error { ale.Log(slog.LevelError, "Email service not configured") return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "Email service not configured"}) } - subject := "[Baron 통합로그인] 비밀번호 재설정" + subject := "[Baron 로그인] 비밀번호 재설정" body := fmt.Sprintf(`
-

Baron SSO 비밀번호 재설정

+

Baron 로그인 비밀번호 재설정

아래 버튼을 클릭해 비밀번호 재설정을 진행해 주세요. 링크는 15분간 유효합니다.

비밀번호 재설정 @@ -1700,7 +1700,7 @@ func (h *AuthHandler) InitiatePasswordReset(c *fiber.Ctx) error { } } } else { - resetSms := fmt.Sprintf("[Baron 통합로그인] 비밀번호 재설정 링크: %s", resetLink) + resetSms := fmt.Sprintf("[Baron 로그인] 비밀번호 재설정 링크: %s", resetLink) if drySend { ale.Log(slog.LevelInfo, "SMS send skipped (dry-send)", slog.String("loginId", loginID), slog.String("content", resetSms)) } else { @@ -1736,7 +1736,7 @@ func (h *AuthHandler) VerifyPasswordResetPage(c *fiber.Ctx) error { - Baron SSO - 비밀번호 재설정 + Baron 로그인 - 비밀번호 재설정