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