TMA-POSTGRES-4.6
Ensure excessive DML privileges are revoked
Mô tả
DML (insert, update, delete) operations at the table level should be restricted to only authorized users. PostgreSQL manages table-level DML permissions via the GRANT statement.
Cách kiểm tra
Phương pháp kiểm tra: Xem xét thủ công
Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.
In each database list roles (\du+ *) and tables (\dt *.*), then review grants, e.g. SELECT grantee, table_schema, table_name, privilege_type FROM information_schema.role_table_grants WHERE grantee NOT IN ('postgres','PUBLIC'); Any INSERT/UPDATE/DELETE/TRUNCATE grant a role does not need is a fail.
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
REVOKE INSERT, UPDATE, DELETE, TRUNCATE ON <schema>.<table> FROM <role>; for each excessive grant, keeping only what the role requires.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- postgresdatabaseauthorizationmanual
- Tham chiếu
- CIS PostgreSQL 18 Benchmark v1.0.0 - 4.6 Ensure excessive DML privileges are revoked