SQL19 Eal2-W Agd Add 1.3
SQL19 Eal2-W Agd Add 1.3
Database Engine
Common Criteria Evaluation (EAL2+)
Guidance Addendum
Abstract
This document is the Guidance Addendum for the Common Criteria certification of the Microsoft SQL
Server 2019 Database Engine Enterprise Edition x64 (English).
Keywords
CC, SQL, Common Criteria, Guidance Addendum
© 2020 Microsoft Corporation. All rights reserved. This data sheet is informational purposes only.
Microsoft makes no warranties, express or implied, with respect to the information presented here.
Guidance Addendum SQL Server 2019 Page 2/78
Table of Contents
1 INTRODUCTION .......................................................................................................................................... 8
1.1 IDENTIFICATION ...................................................................................................................................... 8
2 SCOPE OF THE EVALUATION ................................................................................................................ 9
2.1 SECURITY OBJECTIVES FOR THE OPERATIONAL ENVIRONMENT ........................................................... 9
2.1.1 Trusted and competent Administrator ........................................................................................ 10
2.1.2 Protection of information .............................................................................................................. 11
2.1.3 No General-purposes capabilities ............................................................................................... 11
2.1.4 Physical Protection ........................................................................................................................ 11
2.1.5 Trusted identification and authentication information .............................................................. 12
2.1.6 Remote IT System Policies .......................................................................................................... 12
2.1.7 Remote Trusted System............................................................................................................... 12
3 INSTALLATION AND START-UP GUIDE ............................................................................................. 14
3.1 PREREQUISITES ................................................................................................................................... 14
3.1.1 Hardware Prerequisites ................................................................................................................ 14
3.1.2 Software Prerequisites ................................................................................................................. 14
3.1.3 TOE Delivery .................................................................................................................................. 14
3.2 SQL SERVER 2019 INSTALLATION ...................................................................................................... 15
3.2.1 Checking the integrity and the signature of the TOE parts ..................................................... 15
3.2.2 Installing the product ..................................................................................................................... 18
3.2.3 Installing the Documentation Contents ...................................................................................... 30
3.2.4 Installing the Cumulative Update ................................................................................................ 34
3.2.5 Enabling the certified version ...................................................................................................... 37
3.2.6 Installing the logon triggers .......................................................................................................... 38
9 APPENDIX .................................................................................................................................................. 73
9.1 STORED PROCEDURES ........................................................................................................................ 73
9.1.1 sp_Msgetversion ........................................................................................................................... 73
9.1.2 xp_dirtree ........................................................................................................................................ 73
9.1.3 xp_fileexist ...................................................................................................................................... 73
9.1.4 xp_fixeddrives ................................................................................................................................ 74
9.1.5 xp_getnetname .............................................................................................................................. 74
9.1.6 xp_qv ............................................................................................................................................... 74
9.1.7 xp_instance_regread .................................................................................................................... 75
9.1.8 xp_regread ..................................................................................................................................... 75
9.1.9 Sp_remove_maximum_number_of_connections_limit ............................................................ 75
9.1.10 Sp_revoke_logon_denies ........................................................................................................ 75
9.1.11 Sp_set_maximum_number_of_connections_per_login ...................................................... 76
9.1.12 Sp_deny_logon ......................................................................................................................... 76
9.1.13 sp_enable_sql_debug .............................................................................................................. 77
10 REFERENCES ........................................................................................................................................... 78
Guidance Addendum SQL Server 2019 Page 5/78
List of Tables
Page
List of Figures
Page
1 Introduction
This document has been created as part of the Common Criteria (CC) Evaluation of Microsoft SQLServer
2019 Database Engine Enterprise Edition x64 (English). It covers the specific aspects that shall be
considered when operating SQL Server 2019 in its certified version and extends the general guidance
of the product given in SQL Server Technical Documentation. The document follows the following
structure:
Chapter 2 of this document gives more details about the scope of the certification for SQL Server 2019
and the assumptions, which have been made about the environment of the TOE.
Chapter 3 of this document describes the steps for the installation process of the database engine of
SQL Server 2019 in its certified version.
Chapter 4 introduces the concept of the SQL Server Technical Documentation and provides the
administrator and users with entry points for important aspects.
Chapter 5 contains the important aspects of the guidance, which are specific to the certified version of
SQL Server 2019.
Chapter 6 introduces the concept and the important aspects of the audit mechanism of SQL Server
2019.
Chapter 7 contains the appropriate configuration of the Security Server Policies to avoid some possible
attacks to the TOE.
Finally, chapter 8 gives requirements for the secure operation and proper configuration of the TOE.
1.1 Identification
Document title Microsoft SQL Server 2019 Database Engine - Common Criteria Evaluation
(EAL2+) – Guidance Addendum
Version 1.3
TOE name Microsoft SQL Server 2019 Database Engine Enterprise Edition x64 (English)
TOE version 15.0.4033.1
Guidance Addendum SQL Server 2019 Page 9/78
Objective Description
trained to exercise control over their own
data.
OE._NO_GENERAL_PURPOSE There will be no general-purposes computing capabilities
(e.g., compilers or user applications) available on DBMS
servers other than those services necessary for the
operation, administration and support of the DBMS.
OE_PHYSICAL Those responsible for the TOE must ensure that those
parts of the TOE critical to enforcement of the security
policy are protected from physical attack that might
compromise IT security objectives. The protection must be
commensurate with the value of the IT assets protected by
the TOE.
OE.IT_I&A Any information provide by a trusted entity in the
environment and used to support user authentication and
authorization used by the TOE is correct and up to date.
OE.IT_REMOTE If the TOE relies on remote trusted IT systems to support
the enforcement of its policy, those systems provide that
the functions and any data used by the TOE in making
policy decisions, required by the TOE are sufficiently
protected from any attack that may cause those functions to
provide false results.
OE.IT_TRUSTED_SYSTEM The remote trusted IT systems implement the protocols and
mechanisms required by the TSF to support the
enforcement of the security policy.
These remote trusted IT systems are managed according to
known, accepted, and trusted policies based on the same
rules and policies applicable to the TOE, and are physically
and logically protected equivalent to the TOE.
user role membership changes to another server management role or a database management
permission is assigned to it, the SQL Server user is considered as a management user and thus become
a trusted user, according to the security objective for the operational environment OE.ADMIN in [ST],
section 4.2 Security Objectives for the operational Environment.
The users involved in the installation and configuration of the TOE during the preparative procedures
will be considered trustworthy and reliable.
This objective will be fulfilled by any role of the TOE, except on users who have the role public without
any additional permissions.
Every network or peripheral cabling must be approved for transmit sensitive data over the
link. Physical links shall be protected in a proper way against threats defined in [ST] to
ensure the confidentiality and integrity of the data transmitted using appropriate physical
and logical protection techniques.
Policy control access or DAC protections on security-relevant files (such as audit trails and
authorization databases) shall always be set up correctly. This policy control access shall
be established in order to create different roles with different privileges on the TOE that
rightly control access to sensitive information.
Users shall be proper authorize to access concrete parts of the data managed of the TOE and trained
to exercise control over their own data.
This objective does not apply to any specific role of the TOE. This objective will be fulfilled by the secure
facility where it is installed the TOE and the people who are in charge of this facility.
physical security of the machine that contains the TOE is a notorious factor to take into account if the
user data should be correctly protected. The machine needs to be installed in a secure place that has
convenient physical measures to avoid non-privileged users to gain physical access to the TOE. It is a
remarkable fact that an attacker with physical access to the machine could easily gain complete control
of user data which is stored into the database.
This objective does not apply to any specific role of the TOE. This objective will be fulfilled by the secure
facility where it is installed the TOE and the people who are in charge of this facility.
are no remote Trusted IT that are connected to the TOE. In other words, the TOE does not have TSF-
distributed parts.
Therefore, regarding the separated parts of the TOE, there are non-additional security measures
required to fulfil this security objective for the operational environment.
This objective does not apply to any specific role of the TOE. This objective will be fulfilled by the person
or people who is in charge of the TOE and its environment.
Guidance Addendum SQL Server 2019 Page 14/78
3.1 Prerequisites
3.1.1 Hardware Prerequisites
According to [ST] a machine that meets at least following criteria has to be available:
AMD Opteron, AMD Athlon 64, Intel Xeon with Intel EM64T support, Intel Pentium IV with EM64T
support at 1.4 GHz or faster. x64-compatible
DVD-ROM drive
Keyboard
Please note that additional disc space will be required for the recommended audit processes (Up to 10
GB in its default configuration).
1 Although the permission poster refers to SQL Server 2017 is also applicable for the evaluated TOE.
Guidance Addendum SQL Server 2019 Page 16/78
4. Download the DVD image (SQLServer2019-x64-ENU.iso file) via the Microsoft volume licensing
service center (https://www.microsoft.com/licensing/servicecenter/default.aspx).
5. Calculate the SHA256 hash values for each downloaded file with the following command in a
Windows terminal or PowerShell 3.0 application: certutil.exe -hashfile <file_name>
SHA256
6. Compare the output hash with the following hashes:
File SHA256 Hash
hash_dir_1.0_2020-05-07.bat BD9E61C4DCE7775B7999CC313124B5C947708
73F49E268880E4206F508B18AEA
Microsoft_SQL_Server_2017_and_Azure_SQL_ 4C2119AD0CB54B388D900590351FEB53758139
Database_permissions_infographic_1.0.pdf EE6574B50EAB6BEF6192EC368B
Offline-Book_SQL-Server-2019-CU4_1.0_2020- 4CCFCE731108C1755860DC630A84DABA49E92
05-07.zip 1D89A35429D239806EAD5116273
SQL19_W_Install_cc_triggers_1.0_2020-05- 043AC79021C549AB198BE5DB18AC7AE160C06
07.sql 24AA9C870D6F606FA68BE7987C5
SQLServer2019-KB4548597-x64.exe 58D78AC13DD8BBA0B5E17AAFAA8FE38A9D9B
BCD72DAD480B66C914E6962DB888
7. Mount drive the ISO file or burn into a DVD and put it on DVD.
8. The script “hash_dir_1.0_2020-05-07.bat” creates a list of file hashes of files on a specified drive
and outputs the hash of this list. For the hash operations it uses the Windows CertUtil tool.
Please note that during operation the script creates the file “hash_dir_output.txt” in the directory
Guidance Addendum SQL Server 2019 Page 17/78
where it is executed. If the file already exists, it is automatically deleted and a new output file is
created.
Execute “hash_dir_1.0_2020-05-07.bat E:” (replace E: by the appropriate drive) and verify that
the final SHA256 hash output matches the one in the following picture (Figure 3):
Next, to create a new installation of SQL Server 2019 go to menu Installation and click “New SQL Server
stand-alone installation or add features to an existing installation”.
On the Product Key page (see Figure 7Figure 7), exists two possible options: installing a free SQL Server
Edition or Enterprise or use a key to install the Enterprise Edition. It is remarkable that only the Enterprise
Edition of SQL Server has been certified, so it is necessary to have a product license key to install the
TOE.
Next the License Terms page appears (Figure 8), it is important to read carefully the license agreement
and then select the check box to accept the licensing terms and conditions.
Guidance Addendum SQL Server 2019 Page 21/78
Next, the installer will perform some checks to identify problems with SQL Server Setup support files
(Figure 9Figure 9).
When the prerequisites have already been installed, the Installation Wizard asks if Microsoft Update
shall be used to check for updates (Figure 10Figure 10). The installation of updates shall not be enabled
because any update version of the TOE leaves the certified version.
The Installation Wizard will then only copy the Setup Files to the hard disk as shown in Figure 12Figure
12:
The System Configuration Checker will verify the system state of the machine before Setup continues.
Warning messages shown by the Configuration Checker (e.g. the one to see in Figure 13 that is shown
because the Windows Firewall is active) shall be carefully considered but do not prevent the further
installation. For more information, please refer to [AGD, section: “Configure the Windows Firewall to
Allow SQL Server Access”].
On the Feature Selection menu, it can be selected the components for installation. A description for each
component group appears in the right-hand pane after selecting the feature name. It can be selected
any combination of check boxes. For the certified version of the database engine of SQL Server 2019
the selection of components as shown in Figure 14 is recommended. It will install an instance of the
database engine. According to an assumption of the evaluation process, other components may only be
installed if they are indispensable for the operation of the database engine.
A custom directory for shared components can be specified by using the field at the bottom of the Feature
Selection menu.
Guidance Addendum SQL Server 2019 Page 25/78
Next, the System Configuration Checker will run one more set of rules to validate your computer
configuration with the SQL Server features that have been selected (Figure 15).
On the Instance Configuration page (see Figure 16Figure 15Figure 16), can be specified whether to
install a default instance or a named instance. If an instance of SQL Server is not already installed, a
default instance will be created unless you specify a named instance.
SQL Server supports multiple instances of SQL Server on a single server or processor, but only one
instance can be the default instance. All others must be named instances. A computer can run multiple
instances of SQL Server concurrently, and each instance runs independently of other instances.
Default or Named instance — Consider the following information when you decide whether to install a
default or named instance of SQL Server:
If you plan to install a single instance of SQL Server on a database server, it should be a default
instance.
Use a named instance for situations where you plan to have multiple instances on the same
computer. A server can host only one default instance.
Any application that installs SQL Server Express should install it as a named instance. This will
minimize conflict when multiple applications are installed on the same computer.
Please do not activate the option “Grant Perform Volume Maintenance Task privilege to SQL Server
Database Engine Service” because it may result in non CC-compliant behaviour.
The Server Configuration — Collation tab can be used to specify non-default collations for the Database
Engine. For more information, see [AGD, section: “Server Configuration Options (SQL Server)”].
Figure 23: Choosing the installation source for the contents in Help Viewer
In this document all references to the Technical Documentation are given in form of [AGD, section:
<Section Title>] and can be easily found in Help Viewer by typing or pasting the section title to the “Filter
Contents” search box in the upper left corner of Help Viewer (cf. Figure 24).
In the properties window, select IE Enhanced Security Configuration and a new window will open (Figure
26).
After perform these steps, HelpViewer tool should work correctly and the help menu can be consulted.
The update progress is shown on the screen (Figure 32). After the message, update has been
completed, a status overview is shown (Figure 33).
After the installation process has been finished the admin shall finally determine whether the correct
version of SQL Server 2019 is installed. To do this the administrator of SQL Server shall connect to the
running database engine (using any T-SQL client) and execute the following command:
SELECT @@VERSION
go
Using this command, the TOE will return the name of the product platform (of which the TOE is the
central part), the version number of the TOE and information about the Operating System.
For the certified version the string that is returned in response to this command shall start with
Microsoft SQL Server 2019 (RTM-CU4) (KB4548597) - 15.0.4033.1 (X64)
These strings include information on the actual version of the SQL Server that has been installed
(15.0.4033.1 ) and also show that the x64 edition has been installed.
contribute to improved security; however, overwriting the memory allocation can slow performance. After
the common criteria compliance enabled option is enabled, the overwriting occurs.
Login auditing will be enabled. Each time a user successfully logs in to SQL Server, information about
the last successful login time, the last unsuccessful login time, and the number of attempts between the
last successful and current login times is made available. These login statistics can be viewed by
querying the sys.dm_exec_sessions dynamic management view.
To enable this option, the administrator shall connect to the database engine and issue the following
commands:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'common criteria compliance enabled', 1;
GO
RECONFIGURE
GO
These setting takes effect directly after the server has been restarted.
For more information, please refer to [AGD, section: “common criteria compliance enabled Server
Configuration Option”].
For more information on “sp_configure” please see [AGD, section: “sp_configure (Transact-SQL)”].
In addition to this setting, a CC-compliant audit log has to be configured. Please refer to chapter 6.2 a
CC-compliant audit specification.
dbo.denied_logins_A54E382458CA11DB8373B622A1EF5492
This table contains the weekly intervals in which logins are not allowed to connect to SQL Server.
The table should not be modified directly. The following stored procedures should be used
instead:
- master.dbo.sp_deny_logon
- master.dbo.sp_revoke_logon_denies
dbo.maximum_number_of_connections_per_login_A54E382458CA11DB8373B622A1EF5492
This table contains the value for the maximum number of connections per login. It should not be
modified directly. Use the following stored procs instead:
- master.dbo.sp_set_maximum_number_of_connections_per_login
- master.dbo.sp_remove_maximum_number_of_connections_limit
The view:
dbo.denied_logins
This view dumps the contents of the table with the weekly intervals in human readable format.
The function
dbo.fn_is_original_login_denied_A54E382458CA11DB8373B622A1EF5492
This function checks whether the original login (the one who created the session) is allowed to
logon at this time. EXECUTE permission for this function is granted to everyone.
The logon trigger
trig_deny_access_A54E382458CA11DB8373B622A1EF5492
This trigger is executed on every LOGON attempt. It checks whether the login is allowed to
logon at this time (based on the time of the day and the day of the week) and if NOT rejects the
connection by raising an exception.
trig_max_connections_A54E382458CA11DB8373B622A1EF5492
This trigger is executed on every LOGON attempt. It checks whether the login is allowing to
logon at this time (based on the maximum number of concurrent session per user) and if NOT
rejects the connection by raising an exception.
The Stored Procedures
dbo.sp_deny_logon_internal_A54E382458CA11DB8373B622A1EF5492
This is an utility stored procedure and it is not supposed to be called directly
dbo.sp_deny_logon (see chapter 9.1.12)
dbo.sp_revoke_logon_denies (see chapter 9.1.10)
dbo.sp_set_maximum_number_of_connections_per_login (see chapter 9.1.11)
dbo.sp_remove_maximum_number_of_connections_limit (see chapter 9.1.9)
Guidance Addendum SQL Server 2019 Page 40/78
Topic Reference
What's New [AGD, section: “What's new in Database Engine - SQL Server 2019”]
(Database
Engine)
SQL Server [AGD, section: “SQL Server Database Engine Backward Compatibility”]
Database Engine
Backward
Compatibility
Database [AGD, section: “SQL Server Database Engine”]
Features and
Tasks
Technical [AGD, section: “Guidance for using Microsoft SQL relational databases”]
Reference
Transact-SQL [AGD, section: "Transact-SQL Reference"]
Reference
XQuery [AGD, section: "XQuery Language Reference (SQL Server)"]
Reference
5 Guidance Addendum
This chapter contains the guidance addendum for the secure administration and operation of the TOE.
This document covers the aspects of guidance and operation, which are specific for the certified version
of the database engine of SQL Server 2019. This document is a supplement of [AGD] documentation.
Option Description
Name option with SQLCMD or SQL Server Management Studio. For example, -m
SQLCMD limits connections to a single connection and that connection must
identify itself as the SQLCMD client program. Use this option when you are
starting SQL Server in single-user mode and an unknown client application is
taking the only available connection. To connect through the Query Editor in
Management Studio, use –m Microsoft SQL Server Management Studio –
Query.
** Security Note ** Do not use this option as a security feature. The client
application provides the client application name, and can provide a false
name as part of the connection string.
-n Does not use the Windows application log to record SQL Server events. If
you start an instance of SQL Server with –n, we recommend that you also
use the –e startup option. Otherwise, SQL Server events are not logged.
-s Allows you to start a named instance of SQL Server 2019. Without the –s
parameter set, the default instance will try to start. You must switch to the
appropriate BINN directory for the instance at a command prompt before
starting sqlservr.exe. For example, if Instance1 were to use \mssql$Instance1
for its binaries, the user must be in the \mssql$Instance1\binn directory to
start sqlservr.exe –s instance1.
-T trace# Indicates that an instance of SQL Server should be started with a specified
trace flag (trace#) in effect. Trace flags are used to start the server with
nonstandard behavior. For more information, see [AGD, section: “DBCC
TRACEON - Trace Flags (Transact-SQL)”]
-x Disables monitoring features such as the keeping of CPU time and cache-hit
ratio statistics. Allows maximum performance.
-E Increases the number of extents that are allocated for each file in a filegroup.
This option may be helpful for data warehouse applications that have a limited
number of users running index or data scans. It should not be used in other
applications because it might adversely affect performance. This option is not
supported in 32-bit releases of SQL Server.
-d master_path Indicates the fully qualified path for the master database. If you do not provide
this option, the existing registry parameters are used. There are no spaces
between -d and master_path.
-e error_log_path Indicates the fully path for the error log file. If not specified, the default location
is *\<Drive>*:\Program Files\Microsoft SQL Server\MSSQL\Log\Errorlog for
the default instance and *\<Drive>*:\Program Files\Microsoft SQL
Server\MSSQL$*instance_name*\Log\Errorlog for a named instance. There
are no spaces between -e and error_log_path.
-l master_log_path Indicates the fully qualified path for the master database transaction log file.
Guidance Addendum SQL Server 2019 Page 43/78
Option Description
There are no spaces between -l and master_log_path.
-v Displays the server version number.
--help Shows the help application menu of sqlservr.exe application.
Additional info: if the parameter --help is used, parameters (-a<L2, -B, -g number, -y number and -K),
that are not defined in the AGD or the table, can be shown. These parameters are Microsoft Internal
Purpose or Legacy parameters and are out of the certified evaluation.
Guidance Addendum SQL Server 2019 Page 44/78
As it is specified at the beginning of this chapter, the TOE runs, by default, as a service with the startup
option “-s” and the instance name “MSSQLSERVER”. Path options “-l”, “-e” and “-d” are defined, by
default, as Windows Registry Variable values with the following paths and no other modes will be allowed
in the evaluated version:
“C\:Program files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA” for options
-l and -d.
“C\:Program files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\log” for option -e.
Furthermore, errors of the TOE are managed via the error log (that is in the default path
/var/opt/mssql/log). The only user(s) that can manage these errors are the user(s) that belong(s) to the
sysadmin role. A token is sent to the error log to identify the different type of the error, the severity and
the actions to carry out when these errors occur. For further detail, please refer to [TDS-SPEC, section
2.2.7.10 Error].
In order to manage the TOE, it should be possible to use a friendly interface instead of a command
prompt. For example, in order to manage the configuration part, software SQL 2019 Server Configuration
Manager could be used and to manage the database SQL Server Management Studio could be used
also. All these software programs and interfaces are out of scope of the evaluation and shall not be take
into account as TOE parts.
More detailed information about the functionality which is provided by the SQL Server Configuration
Manager can be found in [AGD, section: “SQL Server Configuration Manager”].
Every user can connect to the TOE via the external interface EV-CLIENT using a T-SQL client.
The SQL Server Management Studio which ships separately from the TOE comprises a T-SQL client,
which can be used. However, the functionality of the GUI has not been evaluated.
Guidance Addendum SQL Server 2019 Page 47/78
For a complete overview over the T-SQL language please refer to the links under [AGD, section:
"Transact-SQL Reference"].
Warning: some operations and activities require different server permissions, so a db_owner cannot
perform them.
This example overwrites the oldest stored audit record if the audit trail is full. To stop the TOE operation
instead, the example can be modified as follows:
The following example shows how to select the set of events to be audited based on the user identity,
event type, object identity and outcome using the WHERE clause:
CREATE SERVER AUDIT CCAudit
TO FILE ( FILEPATH ='C:\CCAudit\', MAX_ROLLOVER_FILES=10 )
WHERE server_principal_name= 'sa';
Similarly, one can use the “action_id”, “object_id” and the “succeeded” field names in the WHERE clause
to filter for event type, object identity and outcome. Please note that the action_id cannot be specified
2 The directory to which the file path points to has to be created before.
Guidance Addendum SQL Server 2019 Page 57/78
4This is only a subset of all possible action ids for operations on objects covered by the SFP. To get an overview
of all auditable actions, please refer to previous section.
5 This applies to revocation of database role memberships and permissions.
Guidance Addendum SQL Server 2019 Page 60/78
6.2.1 Configuration
The following configuration creates a CC-compliant SERVER AUDIT SPECIFICATION based on the
server-level events listed in Table 27. This configuration is mandatory for a Security Target conform
operation of the TOE.
CREATE SERVER AUDIT SPECIFICATION CCAuditServerSpec
FOR SERVER AUDIT CCAudit
-- Audit changes
ADD (AUDIT_CHANGE_GROUP),
-- Authentication Failure/Success
ADD (FAILED_LOGIN_GROUP),
ADD (FAILED_DATABASE_AUTHENTICATION_GROUP),
-- Schema-level
ADD (SCHEMA_OBJECT_ACCESS_GROUP),
ADD (SCHEMA_OBJECT_CHANGE_GROUP),
ADD (SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP),
-- Database-level
ADD (DATABASE_CHANGE_GROUP),
ADD (DATABASE_OBJECT_ACCESS_GROUP),
ADD (DATABASE_OBJECT_CHANGE_GROUP),
ADD (DATABASE_OBJECT_PERMISSION_CHANGE_GROUP),
ADD (DATABASE_PERMISSION_CHANGE_GROUP),
ADD (DATABASE_PRINCIPAL_CHANGE_GROUP),
ADD (DATABASE_PRINCIPAL_IMPERSONATION_GROUP),
ADD (DATABASE_ROLE_MEMBER_CHANGE_GROUP),
-- Server-level
ADD (SERVER_OBJECT_CHANGE_GROUP),
ADD (SERVER_PERMISSION_CHANGE_GROUP),
ADD (SERVER_PRINCIPAL_CHANGE_GROUP),
ADD (SERVER_PRINCIPAL_IMPERSONATION_GROUP),
Guidance Addendum SQL Server 2019 Page 62/78
ADD (SERVER_ROLE_MEMBER_CHANGE_GROUP),
ADD (SERVER_STATE_CHANGE_GROUP),
ADD (USER_DEFINED_AUDIT_GROUP),
ADD (TRANSACTION_GROUP)
WITH (STATE=ON);
When the Server Manager is open, in the screen, select the option Tools (Figure 35):
This option opens a menu with some Account Policies options for configuration, select the option
Account Policies, and click to pen the dropdown menu (Figure 37):
Inside of the dropdown menu, select the option Account Lockout Policy, press mouse right button over
Account lockout threshold and select edit properties (Figure 38):
Guidance Addendum SQL Server 2019 Page 65/78
A new menu should be opened. In this menu change the threshold properties from 0 (default value) to
3 as in the image below (Figure 39):
The next characteristic to be modified is the Minimum Password Length. By default, is 0, it is necessary
to change from a more secure value, this muste be at least 12. This value can be changed with right
click mouse button and select edit properties. A pop-up window should be appeared (), on this window
the value can be adjusted with two arrows, as same on previous characteristic.
This configuration could help to avoid some distinct attacks, such as brute-force, dictionaries or
rainbow table attacks.
Guidance Addendum SQL Server 2019 Page 68/78
Every user with the appropriate permissions can manage the security audit. By default, only the role
sysadmin is the role that is in charge of this sensitive task. It is one of the security pillars of this TOE. As
it is described in section 2.1.1 Trusted and competent administrator, the role public has no
permissions to perform any action related to this requirement.
Every user with the appropriate permissions can manage the access control. By default, the role
securityadmin is the role that should be in charge of this sensitive task, because this role can manage
any login of the TOE. As it is described in section 2.1.1 Trusted and competent administrator, the role
public has no permissions to perform any action related to this requirement.
Option "password must meet complexity requirements" setting of the OS is enabled. This will
ensure that passwords:
o Do not contain all or part of the user's account name
o Contain characters from three of the following four categories:
o English uppercase characters (A through Z)
o English lowercase characters (a through z)
o Base 10 digits (0 through 9)
o Non-alphabetic characters (for example,!, $, #, %)
The SQL Server engine supports the enforcement of password policies for SQL Server logins based on
the policies of the underlying Operating System. This option shall be enabled by using the ALTER or
CREATE LOGIN command for each login as follows: ‘CHECK_POLICY=on’.
‘CHECK_POLICY=on’ enables “Account lockout duration”, “account lockout threshold”, and “reset
account lockout counter after”. The security policy can be set in Windows (Local Security Policy) and
should define that an account is locked out after three invalid logon attempts. The minimum lockout
duration is one minute (For further detail, see section 7). This task depends on the configuration of the
OS. Refer to section 7 Security Server Policies Configuration for further details.
“KILL (Transact-SQL) “]) in case of important changes to the login of that user (e.g. the change of group
memberships of a user). Further it is possible that sessions are cached after a user disconnected and
that a cached session may be reused in case a user logs in again. Changes to login may not be applied
to cached sessions under certain circumstances. To avoid this behaviour the administrator shall consider
to run the command "DBCC FREESYSTEMCACHE ('ALL')" after important changes to one or more
logins. If the server is involved in scenarios of distributed queries the administrator shall further consider
to run the “DBCC FREESESSIONCACHE” command in those cases.
The Service Broker and Database Mirroring endpoints can be used to circumvent the Security
Functionality of the TOE. Therefore, the administrator shall not install applications on the TOE that make
the TSF or any data controlled by the TSF accessible through these endpoints.
Per default the connections to the database engine are not encrypted and the encryption features of
SQL Server 2019 have not been considered during the evaluation. Thus the administrator has to ensure
that all connections to the database engine are appropriately protected, e.g. by using and enforcing an
encrypted connection or by using a physically secured connection.
The use of the column data types text, ntext and image is a deprecated feature (see also [AGD, section:
“ntext, text, and image (Transact-SQL)”]) and has not been considered during the evaluation and
certification process with respect to the access control functionality. Therefore, the administrator shall
ensure that user defined objects do not use this data type. The following SQL query can be used to show
all columns that use this data type within the current database:
select b.name, a.name from sys.columns a inner join sys.objects b on a.object_id = b.object_id where
b.is_ms_shipped=0 and (a.user_type_id=35 or a.user_type_id=99 or a.user_type_id=34)
Please note that it is possible that after the evaluation and certification process of the TOE as described
in this document additional security patches are issued. Therefore the administrator shall regularly visit
the Microsoft Security Update Guide (https://portal.msrc.microsoft.com/en-us/security-guidance) from
Microsoft Security Response Center website (https://www.microsoft.com/en-us/msrc) to get informed
about new security bulletins. For each new security patch the administrator shall carefully consider to
install it (depending on the needs of the specific installation). The authenticity of each downloadable
package can be verified using the digital signature of the file: a file can be considered authentic if it is
digitally signed by Microsoft Corporation.
The Microsoft Security Response Center also has a site that explains how the development group of
Microsoft products can be contacted for the case that an administrator finds a security bug
(https://msrc.microsoft.com/create-report).
The permission “Perform volume maintenance tasks” must not be granted to the account which runs the
TOE (by default: NT SERVICE\MSSQLSERVER). If this permission is granted the TOE may not protect
residual information in a resource when the resource is re-allocated.
The backup functionality of SQL Server 2019 (cf. [AGD, section: “BACKUP (Transact-SQL)”] writes
database contents directly to disk, tape, Azure or a Virtual Device.
These requirements must be ensured by the person who is in charge of the TOE when they are related
to the Operating System and the TOE’s environment.
Regarding of KILL command, any user with appropriate permissions can perform it. By default, the
processadmin role is in charge of this task although any competent and trusted administrator can perform
this action as it is defined in section Error! Reference source not found. Error! Reference source not
found..
Guidance Addendum SQL Server 2019 Page 72/78
The role sysadmin, by default, is the only role that can manage permission administration and permform
tasks of internal database configuration however any role with appropriate permissions can perform this
action when this role is a trusted and competent administrator as it is defined on section 2.1.1 Trusted
and competent Administrator.
At last but not least, the backup functionality is reserved by default, to the database role
db_backupoperator that shall ensure that any critical database or log on its charge is conveniently saved
on a disk; although any competent and trusted administrator can perform this action as it is defined in
section 2.1.1 Trusted and competent Administrator.
The Microsoft Security Response Center also has a site that explains how the development group of
Microsoft products can be contacted for the case that an administrator finds a security bug. Issues can
be reported through the following link: https://www.msrc.microsoft.com/create-report. Moreover, users
who want to report any security issue should follow the guidance published at:
https://www.microsoft.com/en-us/msrc/faqs-report-an-issue.
Guidance Addendum SQL Server 2019 Page 73/78
9 Appendix
9.1.1 sp_Msgetversion
This Stored Procedure can be used to get the current version of SQL Server 2019.
Input: no input parameters
Returns: 0 / Error number
Output: row(s) with the Version Number in Character_value
Syntax: exec sp_MSgetversion
9.1.2 xp_dirtree
Returns a complete listing of all subdirectories on the server; for each subdirectory listed its depth in the
directory tree is also returned. If a depth is specified, then only subdirectories up to and including the
specified depth will be returned. If IncludeFiles is specified (as a 1) then files will also be returned and
the result set will include an additional column to indicate if a row is a file or a directory.
Input: @filepath, @depth, @IncludeFiles
Output: subdirectory, depth, file
Note: file is only displayed if @IncludeFiles = 1
Permission If the calling user is ‘sa’ this Stored Procedure is executed in the context of the SQL
Server system account. In all other cases the Stored Procedure will be executed in the
context of the calling user (i.e. the Stored Procedure will impersonate the user). This
impersonation will fail for the case that a SQL login is used and an empty set will be
returned.
Syntax: xp_dirtree <filepath>, <depth>, <IncludeFiles>
Examples: exec xp_dirtree 'c:' - Lists all dirs and sub-dirs on C:
exec xp_dirtree 'c:', 1 - Lists all dirs at the root level of C:
exec xp_dirtree 'c:', 1, 1 - Lists all dirs and files at the root level of C:
9.1.3 xp_fileexist
This Stored Procedure can be used to determine whether a particular file exists on disk or not.
Input: <filename>
Result: 0 / Error number
Permission If the calling user is ‘sa’ this Stored Procedure is executed in the context of the SQL
Server system account. In all other cases the Stored Procedure will be executed in the
Guidance Addendum SQL Server 2019 Page 74/78
context of the calling user (i.e. the Stored Procedure will impersonate the user). This
impersonation will fail for the case that a SQL login is used and an empty set will be
returned.
Syntax: EXECUTE xp_fileexist <filename> [, <file_exists INT> OUTPUT]
Example: For example, to check whether the file boot.ini exists on disk c: or not, run:
EXEC master..xp_fileexist 'c:\boot.ini'
9.1.4 xp_fixeddrives
Returns a row for each fixed drive containing the drive name and the amount of disk space available in
MB.
Input: no input parameters
Output: (two columns – drive, MB free)
Permission If the calling user is ‘sa’ this Stored Procedure is executed in the context of the SQL
Server system account. In all other cases the Stored Procedure will be executed in the
context of the calling user (i.e. the Stored Procedure will impersonate the user). This
impersonation will fail for the case that a SQL login is used and an empty set will be
returned.
Syntax: exec @retval=xp_fileexist
Example: To see the list of drives, run:
EXEC master..xp_fixeddrives
9.1.5 xp_getnetname
This extended stored procedure returns the WINS name of the SQL Server that you're connected to.
Input: no input parameters
Output: (optional) one column (Server Net Name)
Else single-row, single-column result set is returned
Syntax: exec xp_getnetname
9.1.6 xp_qv
This Stored Procedure wraps SQLBOOT's QueryProductValue function.
USAGE: xp_qv '<setting>' [, '<instancename>']
If the optional instance name is not provided, then the default instance
('MSSQLSERVER') is assumed.
RETURNS: A signed int return value from QueryProductValue or VALUE_ERROR (-1), if an error
occurred. VALUE_NOT_FOUND (-2) is returned if the input value is not a valid VALUE_*
const.
Example: declare @sqlbootvalue int
exec @sqlbootvalue = xp_qv '2745196162'
select @sqlbootvalue 'VALUE_REPLICATION'
Guidance Addendum SQL Server 2019 Page 75/78
9.1.7 xp_instance_regread
See xp_regread for details
9.1.8 xp_regread
Functionality: This Stored Procedure is used to read from the registry.
Input: @rootkey, @key, @value_name, [,@value] (can have 5 input parameters)
Comments: Error if <2 input parameters
5th param – “no_output” then no output is displayed
No error check if >5 params are given
Permission If the calling user is ‘sa’ this Stored Procedure is executed in the context of the SQL
Server system account. The Stored Procedure ensures that other users are only granted
access to a limited set of registry values.
Return: 0/ Error number
Syntax: EXECUTE xp_regread [@rootkey=]'rootkey', [@key=]'key' [,
@value_name=]'value_name'] [, [@value=]@value OUTPUT]
Example: To read into the variable @test from the value 'TestValue' from the key
'SOFTWARE\Test' from the 'HKEY_LOCAL_MACHINE', run:
DECLARE @test varchar(20)
EXEC master..xp_regread @rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Test', @value_name='TestValue', @value=@test OUTPUT
SELECT @test
9.1.9 Sp_remove_maximum_number_of_connections_limit
Functionality: This Stored Procedure allows the administrator to remove the setting for the maximum
number of connections that are allowed per login. After successfully executing this
Stored Procedure the TOE will no longer enforce any limitation on the number of
concurrent sessions per login.
Input: None
Comments: Please note that other than standard system Stored Procedures that do live in the sys.
–
schema this Stored Procedure is stored in the dbo-schema of the master database.
Permission: Requires the CONTROL SERVER permission.
Return: 0 (Success) or >0 (Failure)
Syntax: dbo.sp_remove_maximum_number_of_connections_limit
9.1.10 Sp_revoke_logon_denies
Functionality: This Stored Procedure allows an administrator to revoke all denies from a certain login.
Input: [@login_name=] 'login'
Is the name of the login for which all denies shall be revoked. 'login is of data type
sysname.
Guidance Addendum SQL Server 2019 Page 76/78
Comments: Please note that other than standard system Stored Procedures that do live in the sys.
–
schema this Stored Procedure is stored in the dbo-schema of the master database.
Permission: Requires the CONTROL SERVER permission.
Return: 0 (Success) or >0 (Failure)
Syntax: sp_revoke_logon_denies [@login_name=]'login'
9.1.11 Sp_set_maximum_number_of_connections_per_login
Functionality: This Stored Procedure allows the administrator to set the maximum number of
connections that are allowed per login. This value is a global value that is valid for all
logins.
Input: [@max_connections=] max_connections
New value for the maximum number of allowed connection per login.
Max_connections is ofdata type INT.
Comments: Please note that other than standard system Stored Procedures that do live in the sys.
–
schema this Stored Procedure is stored in the dbo-schema of the master database.
Permission: Requires the CONTROL SERVER permission.
Return: 0 (Success) or >0 (Failure)
Syntax: dbo.sp_set_maximum_number_of_connections_per_login
[@max_connections=] max_connections
9.1.12 Sp_deny_logon
Functionality: This Stored Procedure allows the administrator to deny session establishment to a
certain login based on the day of the week and the time of the day.
Input: [@login_name=] 'login'
Is the name of the login. 'login is of data type sysname.
[@start_weekday=] start_weekday
Is the day of the week where the session deny should start. Start_weekday is tinyint
according to the @@DATEFIRST setting (i.e. 1 means Sunday in the default setting
for @@DATEFIRST).
[@start_time =] 'start_time'
Is the time of the day where the session deny should start. Start_time is of nvarchar(12),
in format hh:mm:ss.000 (the last three digits represent milliseconds)
[@end_weekday=] end_weekday
Is the day of the week where the session deny should end. end_weekday is tinyint
according to the @@DATEFIRST setting (i.e. 1 means Sunday in the default setting
for @@DATEFIRST).
[@end_time=] 'end_time'
Guidance Addendum SQL Server 2019 Page 77/78
Is the time of the day where the session deny should end. end_time is of nvarchar(12),
in format hh:mm:ss.000 (the last three digits represent milliseconds).
Comments: This Stored Procedure can be called with any @@datefirst setting and the start of the
interval given can be > than the end of the interval. In this case it splits the passed
interval into two intervals. Please note that other than standard system Stored
Procedures that do live in the sys. – schema this Stored Procedure is stored in the dbo-
schema of the master database.
Permission: Requires the CONTROL SERVER permission.
Return: 0 (Success) or >0 (Failure)
Syntax: sp_deny_logon [@login_name=] 'login',[@start_weekday=] start_weekday,
[@start_time =] 'start_time',[@end_weekday=] end_weekday, [@end_time=] 'end_time'
9.1.13 sp_enable_sql_debug
Functionality: Returns a marshaled COM interface pointer that implements
IHostDebugServerInstance, as varbinary(8000). IHostDebugServerInstance is the
entry point to the integrated Transact-SQL/CLR debugging interfaces. A debugger calls
sp_enable_sql_debug and then unmarshals the returned blob to get
IHostDebugServerInstance. All methods of IHostDebugServerInstance and related
interface implementations in SQL Server verify the caller is ‘sa’ and return
E_ACCESSSDENIED if the check fails.
This Stored Procedure has been developed for debugging purposes only and must not
be used in a productive environment.
Input: none
Permission Only ‘sa’ can call this stored procedure; otherwise permission error 300 will be returned.
Syntax: sp_enable_sql_debug @interface_blob output
Example: declare @v varbinary(8000);
exec master.dbo.sp_enable_sql_debug @v output;
select @v
Guidance Addendum SQL Server 2019 Page 78/78
10 References
All documentation references (abbreviations, glossary, and document references) have been moved to
an external reference document, which will be updated with every new document version:
[AGD] Microsoft SQL Server 2019 Technical Documentation (file: Offline-Book_SQL-
Server-2019-CU4_1.0_2020-05-07.zip)
[PERM] Poster containing information on the permissions model of the TOE poster (file:
Microsoft_SQL_Server_2017_and_Azure_SQL_Database_permissions_infogr
aphic_1.0.pdf)
[ST] Microsoft SQL Server 2019 Database Engine - Common Criteria Evaluation
(EAL2+) - Security Target, version 1.3
[TDS-SPEC] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-
tds/893fcc7e-8a39-4b3c-815a-773b7b982c50
[WEB] https://www.microsoft.com/en-us/sql-server/data-security (click on “View our
Common Criteria certification” and a PDF document will be downloaded)