TMAegis
Plus de règles pour postgres

TMA-POSTGRES-4.6

Ensure excessive DML privileges are revoked

MoyenneNiveau 1Revue manuellepostgres

Description

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.

Méthode de vérification

Méthode d'audit: Revue manuelle

Cette recommandation ne peut pas être vérifiée automatiquement. Une analyse la liste avec ces instructions lorsque vous passez --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.

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

REVOKE INSERT, UPDATE, DELETE, TRUNCATE ON <schema>.<table> FROM <role>; for each excessive grant, keeping only what the role requires.

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
postgresdatabaseauthorizationmanual
Référence
CIS PostgreSQL 18 Benchmark v1.0.0 - 4.6 Ensure excessive DML privileges are revoked