fix: public 테이블 RLS 활성화(Supabase REST 노출 차단)#50
Merged
Merged
Conversation
- V11__enable_rls.sql 추가 — 9개 public 테이블 RLS 활성화(멱등) - 정책 없음 = anon PostgREST 전면 차단, 서버는 owner role 로 우회 - 운영 DB 수동 활성화분과 충돌 없음(no-op), 새 환경 재현성 확보 Closes #49
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.
문제
Supabase 가 public 테이블을 anon key(앱에 박힌 공개값)로 접근되는 PostgREST 로 자동 노출 → RLS 가 꺼져 있어 서버 우회 직접 접근 가능(CRITICAL). 운영 DB 는 수동 SQL 로 즉시 활성화했으나 Flyway 에 없어 새 환경 재발.
수정
V11__enable_rls.sql— public 9개 테이블 RLS 활성화(멱등). 정책 없음 = anon 전면 차단, 서버는 owner(postgres) role 로 RLS 우회라 기능 영향 없음. client 는 Auth(auth스키마)만 Supabase 사용 + public 은 서버 API 경유라 영향 없음.안전성
./gradlew test그린).결정/컨벤션
Closes #49