Skip to content

[Fix] 관리자 권한 회수 후 OpenProxy stale role 인가 차단 - #364

Merged
Gimini-3 merged 5 commits into
developfrom
fix/admin-role-revocation-consistency
Oct 1, 2026
Merged

Gimini-3 merged 5 commits into
developfrom
fix/admin-role-revocation-consistency

Conversation

@Gimini-3

Copy link
Copy Markdown
Contributor

문제와 수정

  • 복제 지연 중 ADMIN을 회수해도 OpenProxy 경유 관리자 요청이 standby의 이전 역할을 읽어 통과하던 현상을 해결합니다.
  • /admin/** 인가는 Redis 캐시를 우회하고 독립 read-write 트랜잭션에서 현재 primary 역할을 확인합니다. primary 확인 불가 시 캐시로 통과시키지 않고 503을 반환합니다.
  • 일반 역할 캐시에는 Redis epoch와 원자적 CAS를 추가해 DB 조회와 캐시 저장 사이 무효화 경쟁을 방지합니다.

실제 3노드 검증

  • 두 standby를 보호 타이머와 nofailover 설정 아래 일시 지연한 뒤 ADMIN 회수 후 OpenProxy 요청을 실행했습니다.
  • 정상 라우팅 6회는 primary/standby SQL 증가량 6/0/0, 회수 후 요청은 403과 1/0/0, Redis ADMIN 캐시 없음으로 확인했습니다.
  • 원장 16요청 모두 결과 확정, 시험 계정 삭제·standby 복제·승격 자격 원복을 재확인했습니다.
  • 재현 방법과 비식별 결과: docs/test-results/opensql-admin-role-primary-consistency-20261001.md

테스트와 범위

  • 관련 Java 보안·캐시·MVC 테스트와 Python 하네스 테스트 6개 통과. 실제 3노드 HTTP 실험 결과 PRIMARY_AUTH_ENFORCED.
  • 전체 Gradle test는 로컬 PostgreSQL 미기동으로 1,188개 중 117개가 Spring/Flyway 연결 오류로 실패했습니다. 전체 통과를 주장하지 않습니다.
  • primary 장애 시 503은 로컬 보안 체인에서 확인했으며 실제 primary 장애 주입은 이번 범위가 아닙니다. 일반 API의 복제 지연 최신성 및 WebSocket 장기 세션 권한은 별도 과제입니다.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: DocGrid/docgrid/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 80570d24-f40f-435a-8a9d-78de7fdf878b

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Gimini-3
Gimini-3 merged commit 2da1eec into develop Oct 1, 2026
1 check passed
@Gimini-3 Gimini-3 self-assigned this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant