Overview

SQL Server Audit is capable of capturing both failed and successful logins and writing them to one of three places: the application event log, the security event log, or the file system. We will use it to capture any login attempt to SQL Server, as well as any attempts to change audit policy. This will also serve to be a second source to record failed login attempts.

By utilizing Audit instead of the traditional setting under the Security tab to capture successful logins, we reduce the noise in the ERRORLOG. This keeps it smaller and easier to read for DBAs who are attempting to troubleshoot issues with the SQL Server. Also, the Audit object can write to the security event log, though this requires operating system configuration. This gives an additional option for where to store login events, especially in conjunction with an SIEM.

Excelent Compliance Solution.

Puppet is an excellent solution to ensure your databases are CIS or STIG compliant. Now you’re looking at information about only one compliance control, but managing total compliance isn’t hard either!

If you you like he prospect of easy way into continuous compliancy with minimal fuss and bother, we suggest taking a look at our solution as your go-to option. Plus, our team can help you get up and running so that you can focus on other areas of your business. What are you waiting for? Get started today!

Benchmarks

This control is used in the following benchmarks:

Skipping

To deliberately skip this control (e.g. meaning don’t use Puppet to enforce this setting), we provide you with three ways:

1) Add mssql_secured::controls::sql_server_audit_is_set_to_capture_both_failed_and_successful_logins: skip to your hiera data. This will skip this control for ALL databases.
2) Add mssql_secured::controls::sql_server_audit_is_set_to_capture_both_failed_and_successful_logins::dbname: skip to your hiera data. This will skip this control for specified database only.
3) Add an entry with the content sql_server_audit_is_set_to_capture_both_failed_and_successful_logins to the array value mssql_secured::skip_list in your hiera data.

Attributes

Attribute Name Short Description
title The database to apply the control to.

title

The database to apply the control to.

All controls need an database to apply the control to. Here is a simple example:

mssql_secured::controls::control_name {'MSSQLSERVER':}

In this example, the string DB is the database to apply the control to.

Back to overview of controls::sql_server_audit_is_set_to_capture_both_failed_and_successful_logins