PostgreSQL
TMA-POSTGRES-4.6
Ensure excessive DML privileges are revoked
MédiaNível 1Revisão manualpostgres
Descrição
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.
Como é verificado
Método de auditoria: Revisão manual
Esta recomendação não pode ser verificada automaticamente. Uma varredura a lista com estas instruções quando você passa --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.
Como é corrigido
Método de correção: Orientação ou patch de infraestrutura
REVOKE INSERT, UPDATE, DELETE, TRUNCATE ON <schema>.<table> FROM <role>; for each excessive grant, keeping only what the role requires.
Propriedades
- Sistemas operacionais
- Qualquer
- Tags
- postgresdatabaseauthorizationmanual
- Referência
- CIS PostgreSQL 18 Benchmark v1.0.0 - 4.6 Ensure excessive DML privileges are revoked