feat: multi-browser cookie source (EAC_BROWSER) + config-driven GSBER#2
Open
gr8woo wants to merge 1 commit into
Open
feat: multi-browser cookie source (EAC_BROWSER) + config-driven GSBER#2gr8woo wants to merge 1 commit into
gr8woo wants to merge 1 commit into
Conversation
Auth (auth.ts): - Generalize macOS cookie extraction from Chrome-only to a Chromium-family browser registry (Chrome/Comet/Brave/Edge), selected via EAC_BROWSER (default: chrome). Only the cookie path and Keychain service name differ; crypto is identical. - Decrypt both v10 and v11 cookie prefixes (was v10-only). - Parameterize the re-login flow (open -a target, prompts) by browser name. GSBER (types/ops/config): - Add optional UserProfile.gsber (business area). ops.ts payloads now use `user.gsber ?? "K200"` instead of a hardcoded K200, so users on a K300 cost center can post vouchers without the "same Business Area" rejection. - Surface gsber in DEFAULT_CONFIG so `config init` exposes it. README: document EAC_BROWSER selection and the gsber/cost-center match rule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
두 가지 운영 마찰을 해소한다.
corpcard create/voucher create가 사업영역을K200으로 박아 보낸다. 비용센터가 K300 영역(e.g.343000, FE)인 사용자는 차/대변 사업영역 불일치로Please input only the same 'Business Area'(ZUNIEFI_1009) 400 에러가 나서 전표를 못 만든다. (지금까지는 바이너리 문자열을 K300으로 패치한 복사본으로 우회)변경
Auth (
src/lib/auth.ts)macOS 쿠키 추출을 Chrome 전용 → Chromium 계열 브라우저 레지스트리로 일반화.
EAC_BROWSER로 선택 (default:chrome).EAC_BROWSERchrome(default)cometbraveedge복호화(PBKDF2 salt=saltysalt/1003/16B → AES-128-CBC, 32B hash prefix strip)는 모든 브라우저 동일. 브라우저별로 다른 건 쿠키 경로 + Keychain 서비스명뿐.
쿠키 prefix
v10뿐 아니라v11도 복호화 (기존 v10 only).재로그인 플로우(
open -a대상, 한글 안내문)를 선택 브라우저명으로 파라미터화.GSBER (
types/ops/config)UserProfile에 optionalgsber추가(비용센터와 일치 주석). payload 3곳에서GSBER: "K200"→GSBER: user.gsber ?? "K200". 미설정 시 K200 fallback이라 하위호환.DEFAULT_CONFIG에gsber노출 →config init이 신규 사용자에게 필드를 보여준다.README
EAC_BROWSER선택 및gsber(비용센터 일치 규칙) 문서화.스코프 주의 (리뷰 포인트)
corpcard뿐 아니라 자기관리비/일반경비 경로(computeDefaults/createTempDoc)도 거친다. 다만 자기관리비(FI_21)는 기존에도 K200을 보냈고 서버가 비용센터로 사업영역을 덮어쓰므로 결과 동일(회귀 아님).gsber미설정 사용자는 전 경로 K200 유지.검증
bun build --compile통과.EAC_BROWSER=comet로 빌드본이EAC_JSESSIONID없이 Comet 쿠키에서 세션을 읽어voucher list정상 동작(읽기전용) 확인.user.gsber ?? "K200") + 빌드로 확인. (K300 하드코딩 패치본이 이미 프로덕션에서 동일 payload로 증명됨.)tsc에러(update-check.ts, package.json version 누락)는 본 변경과 무관하며 CI(release.yml)는bun build만 수행.🤖 Generated with Claude Code