TMAegis
postgres 관련 규칙 더 보기

TMA-POSTGRES-4.7

Ensure Row Level Security (RLS) is configured correctly

보통레벨 1수동 검토postgres

설명

In addition to the SQL-standard privilege system available through GRANT, tables can have row security policies that restrict, on a per-user basis, which individual rows can be returned by normal queries or inserted, updated, or deleted by data modification commands. This feature is also known as Row Level Security (RLS).

점검 방법

감사 방식: 수동 검토

이 권장 사항은 자동으로 점검할 수 없습니다. --include-manual 옵션을 전달하면 스캔 결과에 이 지침과 함께 표시됩니다.

Determine which tables need row level security, then run SELECT oid, relname, relrowsecurity FROM pg_class WHERE relrowsecurity IS TRUE; Any table that requires RLS but is missing from the result (or lacks policies, see \d+ <table>) is a fail.

조치 방법

조치 방식: 가이드 또는 인프라 패치

ALTER TABLE <table> ENABLE ROW LEVEL SECURITY; then CREATE POLICY ... for each required access rule, and confirm roles that must obey RLS do not have BYPASSRLS.

속성

운영 체제
모두
태그
postgresdatabaseauthorizationmanual
참고 자료
CIS PostgreSQL 18 Benchmark v1.0.0 - 4.7 Ensure Row Level Security (RLS) is configured correctly