SV-271400r1167497_rule
V-271400
SRG-APP-000855-DB-000240
SQLI-22-019500
CAT II
10
Configure the DBMS to require immediate selection of a new password for accounts using SQL login upon account recovery.
Ensure all scripts, functions, triggers, and stored procedures used to create a user or reset a user's password for SQL logins include a line similar to the following password_option:
MUST_CHANGE
If MUST_CHANGE is specified, CHECK_EXPIRATION and CHECK_POLICY must be set to ON. Otherwise, the statement will fail.
More information can be found at https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-login-transact-sql?view=sql-server-ver16.
Check for use of SQL Server Authentication:
SELECT CASE SERVERPROPERTY('IsIntegratedSecurityOnly') WHEN 1 THEN 'Windows Authentication' WHEN 0 THEN 'SQL Server Authentication' END as [Authentication Mode]
If the returned value in the "Authentication Mode" column is "Windows Authentication", this is not a finding.
If the returned value is not "Windows Authentication", verify SQL Server is configured to require immediate selection of a new password upon account recovery.
All scripts, functions, triggers, and stored procedures used to create a user or reset a user's password for SQL logins should include a line similar to the following password_option:
MUST_CHANGE
Example:
CREATE LOGIN STIG_test WITH PASSWORD ='Password' MUST_CHANGE,
CHECK_EXPIRATION = ON,
CHECK_POLICY = ON;
If they do not, this is a finding.
If SQL Server is not configured to require immediate selection of a new password upon account recovery for accounts using SQL login, this is a finding.
V-271400
False
SQLI-22-019500
Check for use of SQL Server Authentication:
SELECT CASE SERVERPROPERTY('IsIntegratedSecurityOnly') WHEN 1 THEN 'Windows Authentication' WHEN 0 THEN 'SQL Server Authentication' END as [Authentication Mode]
If the returned value in the "Authentication Mode" column is "Windows Authentication", this is not a finding.
If the returned value is not "Windows Authentication", verify SQL Server is configured to require immediate selection of a new password upon account recovery.
All scripts, functions, triggers, and stored procedures used to create a user or reset a user's password for SQL logins should include a line similar to the following password_option:
MUST_CHANGE
Example:
CREATE LOGIN STIG_test WITH PASSWORD ='Password' MUST_CHANGE,
CHECK_EXPIRATION = ON,
CHECK_POLICY = ON;
If they do not, this is a finding.
If SQL Server is not configured to require immediate selection of a new password upon account recovery for accounts using SQL login, this is a finding.
M
5677