STIGQter STIGQter: STIG Summary: Microsoft Azure SQL Database Security Technical Implementation Guide Version: 2 Release: 3 Benchmark Date: 02 Jul 2025:

Azure SQL Database must automatically terminate a user session after organization-defined conditions or trigger events requiring session disconnect.

DISA Rule

SV-255340r1043182_rule

Vulnerability Number

V-255340

Group Title

SRG-APP-000295-DB-000305

Rule Version

ASQL-00-010200

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

Determine the situations when a user-initiated database session must be terminated.

Note: The user running the commands shown below requires the KILL DATABASE CONNECTION permission. The server-level principal login has the KILL DATABASE CONNECTION.

In the SQL Server Management Studio ,as an authenticated user connected to master database, run the following command to list all user sessions:

SELECT c.session_id,host_name,program_name,nt_domain, login_name, connect_time, last_request_end_time
FROM sys.dm_exec_sessions AS s
JOIN sys.dm_exec_connections AS c ON s.session_id= c.session_id;

https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-sessions-transact-sql?view=azuresqldb-current

Example output:
76 MyComputer Microsoft SQL Server Management Studio - Transact-SQL IntelliSense NULL MyLogin 2022-08-26 20:08:38.170 2022-08-26 20:22:39.697

From the output identify the names of users whose session_ids should be terminated. Using the user for each session to be terminated, run the following command (still in SQL Server Management Studio).

Example to terminate user "MyLogin" sessions from example output:
KILL <SPID> - where <SPID> is the Session_ID of the session you want to terminate.

Reference:
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/kill-transact-sql?view=azuresqldb-current

Check Contents

Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding.

If the system owner, data owner, or organization requires additional assurance, this is a finding.

Vulnerability Number

V-255340

Documentable

False

Rule Version

ASQL-00-010200

Severity Override Guidance

Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding.

If the system owner, data owner, or organization requires additional assurance, this is a finding.

Check Content Reference

M

Target Key

5500