STIGQter STIGQter: STIG Summary: MS SQL Server 2014 Database Security Technical Implementation Guide Version: 1 Release: 6 Benchmark Date: 26 Jan 2018:

Database objects (including but not limited to tables, indexes, storage, stored procedures, functions, triggers, links to software external to SQL Server, etc.) must be owned by database/DBMS principals authorized for ownership.

DISA Rule

SV-81861r1_rule

Vulnerability Number

V-67371

Group Title

SRG-APP-000133-DB-000200

Rule Version

SQL4-00-015600

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

Add and/or update system documentation to include any accounts authorized for object ownership and remove any account not authorized.

To change the schema owning a database object in SQL Server, use this code:
USE <database name>;
GO
ALTER SCHEMA <name of new schema> TRANSFER <name of old schema>.<object name>;
GO

Caution: this can break code. This Fix should be implemented in conjunction with corrections to such code. Test before deploying in production. Deploy during a scheduled maintenance window.

Check Contents

Review system documentation to identify SQL Server accounts authorized to own database objects.

If the SQL Server database ownership list does not exist or needs to be updated, this is a finding.

The view STIG.database_permissions, included in the supplemental file, Permissions.sql, can be of use in making this determination:
USE <database name>;
GO
SELECT DISTINCT
S.[Schema/Owner] AS [Owner],
O.[Schema/Owner] AS [Schema],
O.[Securable]
FROM
STIG.database_permissions O
INNER JOIN STIG.database_permissions S
ON S.[Securable] = O.[Schema/Owner]
AND O.[Securable Type or Class] = 'OBJECT_OR_COLUMN'
AND S.[Securable Type or Class] = 'SCHEMA'
WHERE
S.[Schema/Owner] NOT IN ('dbo', 'sys', 'INFORMATION_SCHEMA' ... )
-- Complete the "NOT IN" list with the names of user accounts authorized for ownership.
;
If any of the listed owners is not authorized, this is a finding.

Vulnerability Number

V-67371

Documentable

False

Rule Version

SQL4-00-015600

Severity Override Guidance

Review system documentation to identify SQL Server accounts authorized to own database objects.

If the SQL Server database ownership list does not exist or needs to be updated, this is a finding.

The view STIG.database_permissions, included in the supplemental file, Permissions.sql, can be of use in making this determination:
USE <database name>;
GO
SELECT DISTINCT
S.[Schema/Owner] AS [Owner],
O.[Schema/Owner] AS [Schema],
O.[Securable]
FROM
STIG.database_permissions O
INNER JOIN STIG.database_permissions S
ON S.[Securable] = O.[Schema/Owner]
AND O.[Securable Type or Class] = 'OBJECT_OR_COLUMN'
AND S.[Securable Type or Class] = 'SCHEMA'
WHERE
S.[Schema/Owner] NOT IN ('dbo', 'sys', 'INFORMATION_SCHEMA' ... )
-- Complete the "NOT IN" list with the names of user accounts authorized for ownership.
;
If any of the listed owners is not authorized, this is a finding.

Check Content Reference

M

Target Key

2637

Comments