Ensure that "log_error_verbosity" database flag configured for your Google Cloud PostgreSQL database instances is set to DEFAULT or to a stricter value. The "log_error_verbosity" configuration flag defines the level of detail recorded in the server log for every logged message. It accepts three valid values: TERSE, DEFAULT, and VERBOSE. Each value adds additional fields to the displayed messages. TERSE excludes the logging of DETAIL, HINT, QUERY, and CONTEXT information. VERBOSE output includes the SQLSTATE error code, as well as the source code file name, function name, and line number that produced the error.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
efficiency
optimisation
PostgreSQL database auditing can help in troubleshooting operational issues and permit administrators to perform forensic analysis. If the "log_error_verbosity" flag is not set to the correct value, an excessive or insufficient amount of details may be recorded in the logs. It is important to configure this configuration flag with a value of DEFAULT or with a more stricter value to ensure optimal logging behavior.
Note: Some database flag settings can affect instance availability and/or stability, and eventually remove the PostgreSQL instance from the Google Cloud SQL Service Level Agreement (SLA).
Audit
To determine if the "log_error_verbosity" flag set for your Cloud PostgreSQL database instances has the appropriate configuration value, perform the following actions:
Remediation / Resolution
To ensure that your PostgreSQL database instances have the appropriate value set for the "log_error_verbosity" configuration flag, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Cloud SQL for PostgreSQL documentation
- Configure database flags
- Edit instances
- CIS Security Documentation
- Google Cloud Computing Platform
- PostgreSQL Database Documentation
- Error Reporting and Logging
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud sql instances list
- gcloud sql instances describe
- gcloud sql instances patch