From 0698c497f47593da7c58c87e42b33043d8a36469 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Sun, 14 Sep 2025 23:23:43 +0900 Subject: [PATCH] docs: mark JWT + Slack interactive resolved; Slack mapping partial; add cross-links (8/28, 9/08, 9/11) --- ...0817_slack_user_mapping_troubleshooting.md | 4 +-- .../250827_JWT_인증_구현_COMPLETED.md | 27 +++++++------------ ..._slack_login_workspace_assignment_issue.md | 8 +++--- ...1_hongtaeju_slack_oauth_mapping_failure.md | 10 +++---- .../250908_slack_interactive_gateway_proxy.md | 4 +-- 5 files changed, 22 insertions(+), 31 deletions(-) diff --git a/troubleshooting/250817_slack_user_mapping_troubleshooting.md b/troubleshooting/250817_slack_user_mapping_troubleshooting.md index 66a116c..346905b 100644 --- a/troubleshooting/250817_slack_user_mapping_troubleshooting.md +++ b/troubleshooting/250817_slack_user_mapping_troubleshooting.md @@ -9,7 +9,7 @@ rb8001에서 Slack 사용자 ID (예: U0925SXQFDK)를 실제 이름으로 변환 - search_memories() 함수 정상 작동 - 과거 대화 검색 가능 -2. **사용자 이름 매핑**: ❌ 미구현 +2. **사용자 이름 매핑**: ❌ 미구현 (ID 매핑은 slack_user_mapping 의존 제거, 2025-09-11) - slack_user_mapping 테이블 없음 - Slack API를 통한 사용자 정보 조회 미구현 @@ -138,4 +138,4 @@ assert get_user_name("UNKNOWN") == "UNKNOWN" ## 참고 사항 - Slack API rate limit: 1분당 50회 - users.info API는 user:read 스코프 필요 -- 사용자 정보는 변경될 수 있으므로 주기적 갱신 필요 \ No newline at end of file +- 사용자 정보는 변경될 수 있으므로 주기적 갱신 필요 diff --git a/troubleshooting/250827_JWT_인증_구현_COMPLETED.md b/troubleshooting/250827_JWT_인증_구현_COMPLETED.md index ad60e76..0ea1508 100644 --- a/troubleshooting/250827_JWT_인증_구현_COMPLETED.md +++ b/troubleshooting/250827_JWT_인증_구현_COMPLETED.md @@ -2,7 +2,7 @@ ## 작성일: 2025-08-27 (수정: 2025-08-28) ## 작성자: 51123 서버 관리자 -## 상태: ⚠️ PARTIAL - rb8001 JWT 검증 미구현 +## 상태: ✅ 완료 (2025-08-28) ## 영향 범위: 전체 시스템 (51123, 51124 모든 서비스) ## 위험 수준: 극도로 높음 @@ -11,10 +11,10 @@ ## 1. 문제 요약 ### 핵심 문제 - 부분 해결 -**JWT 인증 부분 구현 상태** +**JWT 인증 구현 상태** - auth-server: JWT 생성 ✅ (sub에 UUID) -- Gateway: JWT 검증 ✅ -- rb8001: JWT 검증 ❌ (2025-08-28 확인) +- Gateway: JWT 검증 ✅ +- rb8001: JWT 검증 ✅ (8/28 이후 정상 동작, main.py Depends 적용) **~~추가 발견 (15:25)~~** → ✅ 해결 (15:32): Gateway → rb8001 Authorization 헤더 전달 - `/home/admin/robeing-gateway/app/main.py:250-252` 수정 완료 @@ -70,23 +70,14 @@ def get_verified_user(authorization: Optional[str] = Header(None)): - ⚠️ JWT 검증 로직은 있지만 실패 시 "default"로 폴백 - ❌ 인증 실패를 에러로 처리하지 않음 -### 2.3 rb8001 (51124:8001) - 완전 미구현 +### 2.3 rb8001 (51124:8001) - 구현 완료 (8/28) ```python # /home/admin/ivada_project/rb8001/main.py:51-70 -# ❌ JWT_SECRET_KEY 미설정 (.env에 기본값 그대로) -JWT_SECRET_KEY = "your-jwt-secret-key" # 🔴 51123과 다른 키! - +# ✅ JWT_SECRET_KEY 환경변수로 설정 (Gateway와 동일) +# ✅ Authorization Bearer 검증 추가 (verify_jwt_token Depends 적용) @app.post("/api/message") async def message_endpoint(request: MessageRequest, req: Request): - # X-User-Id 헤더에서 사용자 ID 가져오기 - user_id = request.user_id - if not user_id: - user_id = req.headers.get("X-User-Id") # 🔴 헤더만 확인! - - if not user_id: - user_id = "web_user" # 🔴 기본값 사용! - - # JWT 검증 코드 전혀 없음! + # ✅ JWT 검증 후 user_id 추출 (8/28 적용) ``` **실제 확인 결과**: @@ -533,4 +524,4 @@ curl -X POST http://localhost:8100/api/chat \ 1. **Refresh Token 구현** (추후) 2. **Rate Limiting 적용** (추후) 3. **JWT 만료 시간 설정** (현재: 무제한) -4. **로그 모니터링 강화** \ No newline at end of file +4. **로그 모니터링 강화** diff --git a/troubleshooting/250831_slack_login_workspace_assignment_issue.md b/troubleshooting/250831_slack_login_workspace_assignment_issue.md index e43a502..cdbad0a 100644 --- a/troubleshooting/250831_slack_login_workspace_assignment_issue.md +++ b/troubleshooting/250831_slack_login_workspace_assignment_issue.md @@ -2,7 +2,7 @@ **작성일**: 2025-08-31 **작성자**: 51123 서버 관리자 -**상태**: 🔴 미해결 +**상태**: ✅ 해결 (2025-09-11) **영향**: Slack OAuth 로그인 사용자 모두 기본값(rb8001) 사용 --- @@ -78,7 +78,7 @@ Slack OAuth로 로그인한 사용자가 Robeing 워크스페이스에 자동 ## 5. 해결 방안 -### 수정 필요 코드 (`/home/admin/auth-server/app/providers/slack.py`) +### 수정 필요 코드 (`/home/admin/auth-server/app/providers/slack.py`) — 9/11 반영 완료 304번 줄 이후 추가: ```python @@ -96,7 +96,7 @@ if team_id and user: }) ``` -### 수동 해결 SQL +### 수동 해결 SQL (참고용) ```sql -- happybell80 사용자 workspace_members 추가 INSERT INTO workspace_members (user_id, workspace_id, robeing_id) @@ -105,4 +105,4 @@ VALUES ( 'T035VFRKCN6', -- GoodGang Labs team_id 'rb8001' ); -``` \ No newline at end of file +``` diff --git a/troubleshooting/250901_hongtaeju_slack_oauth_mapping_failure.md b/troubleshooting/250901_hongtaeju_slack_oauth_mapping_failure.md index e843846..e716426 100644 --- a/troubleshooting/250901_hongtaeju_slack_oauth_mapping_failure.md +++ b/troubleshooting/250901_hongtaeju_slack_oauth_mapping_failure.md @@ -2,7 +2,7 @@ ## 작성일: 2025-09-01 ## 작성자: 51123 서버 관리자 -## 상태: 🔴 미해결 +## 상태: 🟡 부분 해결 (2025-09-11) ## 영향: Slack OAuth 로그인 사용자 개인화 불가 --- @@ -29,9 +29,9 @@ auth-server의 Slack OAuth 콜백(`/auth/slack/login/callback`)에서: 4. ❌ user_preferences 초기화 안 함 ## 4. 영향 -- 기본 robeing(rb8001)만 사용 -- 개인화 설정 불가 -- conversation_logs의 slack_user_id NULL +- workspace_members 자동 추가 구현됨(9/11), 기본 robeing 할당 정상 +- slack_user_mapping 의존 제거(9/11) → 이메일/기타 식별 병행 +- 상세: [/DOCS/troubleshooting/250831_slack_login_workspace_assignment_issue.md](./250831_slack_login_workspace_assignment_issue.md) ## 5. 즉시 해결 (수동) ```sql @@ -44,4 +44,4 @@ VALUES ('237494f7-061c-484c-a4f7-f500611e32f1', 'T035VFRKCN6', 'rb8001'); ``` ## 6. 코드 수정 필요 -`/home/admin/auth-server/app/providers/slack.py` 304번줄 이후 추가 필요 \ No newline at end of file +`/home/admin/auth-server/app/providers/slack.py` 304번줄 이후 추가 필요 diff --git a/troubleshooting/250908_slack_interactive_gateway_proxy.md b/troubleshooting/250908_slack_interactive_gateway_proxy.md index 9d808a8..37d7ff7 100644 --- a/troubleshooting/250908_slack_interactive_gateway_proxy.md +++ b/troubleshooting/250908_slack_interactive_gateway_proxy.md @@ -2,7 +2,7 @@ **작성일**: 2025-09-08 **작성자**: happybell80 -**상태**: 구현 필요 +**상태**: ✅ 해결 (2025-09-08) ## 문제 상황 - CompanyX 뉴스 "홈페이지 게시" 버튼 클릭 시 응답 없음 @@ -38,4 +38,4 @@ ## 관련 파일 - robeing-gateway/app/main.py:508 (slack_proxy 참고) - rb8001/app/router/slack_handler.py:334 (publish_news_ 처리) -- rb8001/app/skills/news_posting_skill.py:268 (handle_publish_action) \ No newline at end of file +- rb8001/app/skills/news_posting_skill.py:268 (handle_publish_action)