PostgreSQL
TMA-POSTGRES-2.4
Ensure Passwords are Not Stored in the service file
СредњаНиво 1Ручни прегледpostgres
Опис
One can set a password in a PostgreSQL connection service file. Verify the password option is not used in a connection service file.
Како се проверава
Метод провере: Ручни преглед
Ова препорука се не може проверити аутоматски. Скенирање је наводи са овим упутствима када проследите --include-manual.
As root search connection service files for passwords: find / -name .pg_service.conf -type f -exec grep -H password {} \; 2>/dev/null; grep password /root/.pg_service.conf "${PGSERVICEFILE}" "${PGSYSCONFDIR}/pg_service.conf". Any password=... line is a finding.
Како се исправља
Метод исправке: Смерница или закрпа инфраструктуре
Remove password= entries from pg_service.conf/.pg_service.conf files and store credentials in ~/.pgpass (mode 0600) or use certificate authentication.
Својства
- Оперативни системи
- Било који
- Ознаке
- postgresdatabasecredentialsmanual
- Референца
- CIS PostgreSQL 18 Benchmark v1.0.0 - 2.4 Ensure Passwords are Not Stored in the service file