Ensure database logging is turned on to meet compliance standards
Rule | Database logging should be enabled |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ Low |
Database Logging for NIST 800-171 Revision 2
Description
Enabling database logging is a crucial security measure to ensure compliance with the National Institute of Standards and Technology (NIST) Special Publication 800-171 Revision 2. This requirement is specifically focused on protecting sensitive information stored in databases by maintaining an audit trail of activities and changes.
By enabling database logging, organizations can track and monitor any unauthorized access attempts, modifications, or deletions to the critical data stored within their databases. This helps in identifying potential security incidents, detecting anomalies, and facilitating timely incident response.
Troubleshooting Steps
There may be several issues encountered while enabling database logging for NIST 800-171 Revision 2. Some common troubleshooting steps to address these issues are listed below:
Necessary Codes
The specific codes required for enabling database logging vary depending on the database management system being used. Below are examples of common databases and their corresponding codes:
Microsoft SQL Server
ALTER DATABASE <database_name> SET RECOVERY SIMPLE;
ALTER DATABASE <database_name> SET ENABLE_BROKER;
USE master; GO ALTER DATABASE <database_name> SET ENABLE_BROKER; GO
USE master; GO ALTER DATABASE <database_name> SET LOGFILEGROUP <logfilegroup_name>; GO
Oracle Database
ALTER DATABASE <database_name> ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
ALTER DATABASE <database_name> ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;
ALTER DATABASE <database_name> ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER SYSTEM SET AUDIT_TRAIL='<audit_trail_setting>' SCOPE=SPFILE;
MySQL
SET GLOBAL general_log = 'ON';
SET GLOBAL log_output = 'TABLE';
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL long_query_time = <time_in_seconds>;
These are just a few examples, and the actual codes might differ based on the specific DBMS version and the logging solution being used.
Step-by-Step Guide for Remediation
Note: It is recommended to consult with a database administrator or security expert familiar with your specific DBMS for accurate implementation of database logging as per NIST 800-171 Revision 2 requirements.