SV-271306r1109119_rule
V-271306
SRG-APP-000164-DB-000401
SQLI-22-008000
CAT I
10
Configure SQL Server contained databases to have users originating from Microsoft Entra (Azure Active Directory) principals. Remove any users not created from Microsoft Entra principals.
Reference Contained Databases: https://learn.microsoft.com/en-us/sql/relational-databases/databases/contained-databases?
Execute the following query to determine if Contained Databases are used:
SELECT * FROM sys.databases WHERE containment = 1
If any records are returned, check the server documentation for a list of authorized contained database users.
Execute the following query to ensure contained database users are not using SQL Authentication:
EXEC sp_MSforeachdb 'USE [?]; SELECT DB_NAME() AS DatabaseName, *
FROM sys.database_principals dp
inner join sys.databases d on d.name = dp.name
WHERE dp.authentication_type = 2
and d.containment = 1'
If any records are returned, this is a finding.
V-271306
False
SQLI-22-008000
Execute the following query to determine if Contained Databases are used:
SELECT * FROM sys.databases WHERE containment = 1
If any records are returned, check the server documentation for a list of authorized contained database users.
Execute the following query to ensure contained database users are not using SQL Authentication:
EXEC sp_MSforeachdb 'USE [?]; SELECT DB_NAME() AS DatabaseName, *
FROM sys.database_principals dp
inner join sys.databases d on d.name = dp.name
WHERE dp.authentication_type = 2
and d.containment = 1'
If any records are returned, this is a finding.
M
5677