From 2e8ac8d9594ef7fc62a812077fb39b08e5c6cb6f Mon Sep 17 00:00:00 2001 From: happybell80 Date: Sat, 16 Aug 2025 11:59:16 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20Frontend=20=EC=9E=90=EB=8F=99=20?= =?UTF-8?q?=EB=B0=B0=ED=8F=AC=20=ED=99=95=EC=9D=B8=20=EB=B0=8F=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=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 - Frontend 토큰 전송 수정 완료 표시 - robing-api.ts:40, chat-interface.tsx:275-279 수정 확인 - Phase 1 진행 상황 업데이트 --- ideas/auth_system_analysis.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ideas/auth_system_analysis.md b/ideas/auth_system_analysis.md index cbedbae..9c97a79 100644 --- a/ideas/auth_system_analysis.md +++ b/ideas/auth_system_analysis.md @@ -102,10 +102,10 @@ collection_name = f"{settings.ROBING_ID}_{username if username else 'default'}_{ ## 주요 문제점 -### 1. 인증 토큰 미전송 ⚠️ -- Frontend가 API 호출 시 JWT 토큰을 전송하지 않음 -- `robing-api.ts`에 Authorization 헤더 없음 -- 모든 사용자가 'test_user'로 처리 +### 1. ~~인증 토큰 미전송~~ ✅ 해결됨 +- ~~Frontend가 API 호출 시 JWT 토큰을 전송하지 않음~~ +- ~~`robing-api.ts`에 Authorization 헤더 없음~~ +- **수정 완료**: robing-api.ts:40, chat-interface.tsx:275-279에서 토큰 전송 구현 ### 2. 백엔드 토큰 미검증 ⚠️ - Robing Gateway가 JWT 토큰을 검증하지 않음 @@ -266,11 +266,12 @@ X-Username: happybell80 // 명확한 이름 ## 즉시 수정 필요 (Critical) -### 1. Frontend (robing-api.ts) +### 1. ~~Frontend (robing-api.ts)~~ ✅ 완료 ```typescript -// 토큰 전송 추가 -const token = localStorage.getItem('auth_token'); -headers['Authorization'] = `Bearer ${token}`; +// 수정 완료 - robing-api.ts:38-41 +if (token) { + headers['Authorization'] = `Bearer ${token}`; +} ``` ### 2. Gateway (main.py) @@ -298,7 +299,7 @@ collection_name = f"{settings.ROBING_ID}_{username if username else 'default'}_{ ## 단계별 구현 계획 ### Phase 1: 긴급 패치 -1. Frontend에서 토큰 전송 +1. ~~Frontend에서 토큰 전송~~ ✅ 완료 2. Gateway에서 토큰 검증 3. username 기반 ChromaDB 분리