Repository navigation
정리: LDAP·AD 외부 키도 최초 주인에게 묶는다 - #59
Merged
Merged
Conversation
왜: 계정 드레인이 directory_identities 행을 지우거나 관리자가 연결을 끊으면, 다음 디렉터리 동기화가 같은 외부 키를 연결 없음으로 다시 만들었다. 운영자가 그 키를 다른 계정에 이으면 예전 사람의 디렉터리 로그인이 새 계정으로 들어온다. SSO sub와 같은 최초 주인 규칙을 LDAP·AD에도 건다. - 기존 identity_claims에 realm=directory를 쓴다. 범위는 tenant+provider이고 외부 키는 SHA-256으로 가명화해 DN 원문을 영구 묘비에 남기지 않는다. 원래 계정만 다시 연결할 수 있다. - 연결 UPDATE 자체가 다른 주인의 claim이 없고 활성 계정일 때만 들어간다. claim·identity 연결· principal·permissions_version을 한 배치에 넣어 반쪽 상태가 없다. MySQL 교착은 전체 판정부터 재시도한다. - 이 기능 전 연결은 unlink가 같은 배치에서 claim하고, 계정 드레인은 900개씩 claim한 뒤 지운다. 운영 DB에는 10-19 읽기 전용 조회 기준 directory_identities가 0건이라 backfill 마이그레이션은 없다. - DirectorySyncInput에서 로컬 accountId를 제거한다. sync는 연결을 쓰지 않고 metadata만 갱신하며, 그룹 membership은 배치 시점 현재 연결에서 INSERT SELECT한다. 오래된 snapshot이 해제·탈퇴를 되돌리지 못한다. - 기능 전 identity principal에 남은 account_id는 unlink 때 NULL로 걷는다. 검증: 독립 리뷰 APPROVE. npm run verify 초록(테스트 2,796개, 실패 0), SQLite·PostgreSQL·MySQL 경합/동기화 테스트 73개 통과. submission SCRAM 일시 타임아웃은 단독 7개 재실행으로 통과 확인. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mack-erel
force-pushed
the
directory-claims
branch
from
October 20, 2026 01:15
cc4555a to
6f01a54
Compare
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.
요약
LDAP·AD 외부 키도 SSO sub처럼 최초 주인에게 영구히 묶습니다. 연결 해제나 계정 탈퇴 뒤 같은 키가 다시 나타나도 다른 계정에 연결할 수 없습니다.
identity_claims에realm=directory를 씁니다. 외부 키 원문은 저장하지 않고 SHA-256으로 가명화합니다.account_id·group membership을 되살리지 못하게 구조를 바꿉니다.검증
npm run verify: 초록(리베이스 뒤 재실행)배포 범위
directory_identities는 0건이었습니다.🤖 Generated with Claude Code