Skip to content

Commit 4f2436f

Browse files
authored
Merge pull request #7155 from HeidiSteen/heidist-ctp2-security
Security and isolation model revisions per late breaking changes
2 parents 100a468 + 2d25206 commit 4f2436f

1 file changed

Lines changed: 26 additions & 15 deletions

File tree

docs/advanced-analytics/install/sql-machine-learning-services-ver15.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Differences in SQL Server 2019 Machine Learning Services installation | Microsoft Docs
33
ms.prod: sql
44
ms.technology: machine-learning
5-
ms.date: 09/07/2018
5+
ms.date: 09/08/2018
66
ms.topic: conceptual
77
author: MashaMSFT
88
ms.author: mathoma
@@ -12,32 +12,43 @@ monikerRange: ">=sql-server-ver15||=sqlallproducts-allversions"
1212
# Differences in SQL Server Machine Learning Services installation in SQL Server 2019
1313
[!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md-winonly](../../includes/appliesto-ss-xxxx-xxxx-xxx-md-winonly.md)]
1414

15-
On Windows, SQL Server 2019 Setup fundamentally changes the security and isolation mechanism for external processes running Java, R, or Python tasks. If you are adding programming language extensions or machine learning to a database engine instance, this article explains how Setup provisions an authorization model for accessing data and operations.
15+
On Windows, SQL Server 2019 Setup changes the isolation mechanism, substituting AppContainers for local worker accounts, for external processes running Java, R, or Python tasks. If you are adding programming extensions or machine learning to a database engine instance, this article explains how Setup provisions the server to contain those processes.
1616

17-
While isolation and security are changing, the mechanics of installation remain the same. If you installed the previous version, you'll notice that the Installation wizard and command-line parameters are unchanged in SQL Server 2019. For help with installation, see [Install SQL Server Machine Learning Services](sql-machine-learning-services-windows-install.md).
17+
Although process isolation has changed, the mechanics of installation remain the same. If you installed the previous version, you'll notice that the Installation wizard and command-line parameters are unchanged in SQL Server 2019. For help with installation, see [Install SQL Server Machine Learning Services](sql-machine-learning-services-windows-install.md).
1818

19-
## AppContainer isolation
19+
## About AppContainer isolation
2020

21-
In previous releases, Setup created a **SQLRUserGroup** and worker accounts for running external processes. SQL Server 2019 replaces those accounts with [AppContainers](https://docs.microsoft.com/windows/desktop/secauthz/appcontainer-isolation). AppContainers isolate a process to run in a restricted execution environment, with access to specific resources only. Built-in barriers prevent backdoor access to hardware, files, registry, other applications, network connectivity, and network resources.
21+
In previous releases, **SQLRUserGroup** contained a pool of local Windows user accounts (MSSQLSERVER00-MSSQLSERVER20) for isolating and running external processes. When an external process was needed, SQL Server Launchpad service would take an available account and use it to run a process.
2222

23-
An AppContainer is created for each external process you run.
23+
In SQL Server 2019, Setup no longer creates worker accounts. Instead, isolation is achieved through [AppContainers](https://docs.microsoft.com/windows/desktop/secauthz/appcontainer-isolation), which do a better job of restricting access to resources without the overhead of account management. At run time, when embedded script or code is detected in a stored procedure or query, Launchpad instantiates an AppContainer to contain the external process, but the process runs under the Launchpad service identity.
2424

25-
In terms of setup, the main differences with AppContainer isolation are:
25+
As implemented by SQL Server, AppContainers are an internal mechanism. While you won't see physical evidence of AppContainers in Process Monitor, you can find them in outbound firewall rules created by Setup to prevent processes from making network calls.
2626

27-
+ Physical accounts, **SQLRUserGroup** and worker accounts, are no longer created. This is beneficial for machines with policies that disable local users from logging on, and with passwords that expire.
28-
+ **All Application Packages** security principle group will be granted 'read and execute' permissions to the SQL Server 'Binn', R_SERVICES, and PYTHON_SERVICES directories.
29-
+ All external scripts and code executed from sp_execute_external_script follow the new security model. This applies to R, Python, and the new Java language extension introduced in SQL Server 2019.
27+
In SQL Server 2019, the only member of **SQLRUserGroup** is the SQL Server Launchpad service account. As with previous releases, the **SQL Restricted User Group (SQLRUserGroup)** continues to provide read and execute permissions on executables in the SQL Server **Binn**, **R_SERVICES**, and **PYTHON_SERVICES** directories.
3028

31-
As before, additional configuration is still required for implied authentication for remote users who execute code on SQL Server. For more information, see [Security for SQL Server machine learning and R](../r/security-overview-sql-server-r.md)
29+
> [!NOTE]
30+
> On SQL Server, stored procedures and T-SQL queries execute as a database user, but that user's security token is not used on new processes. Instead, embedded script or code executes under a different identity. In previous releases, the process identity was a worker account. In SQL Server 2019, the process identity is the Launchpad service account, with isolation provided by AppContainers.
3231
32+
Summarized, the main differences with AppContainer isolation are:
3333

34-
## Firewall
34+
+ Physical accounts worker accounts under **SQLRUserGroup** are no longer created. This is beneficial for machines with policies that disable local users from logging on, and with passwords that expire.
35+
+ **SQLRUserGroup** continues to be granted 'read and execute' permissions to the SQL Server **Binn**, **R_SERVICES**, and **PYTHON_SERVICES** directories, but membership now consists of just the SQL Server Launchpad service.
36+
+ All external scripts and code executed from [sp_execute_external_script](../../relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql.md)follow the new security model. This applies to R, Python, and the new Java language extension introduced in SQL Server 2019.
3537

36-
No firewall rule is created for **SQLRUserGroup**. Since there is no equivalent group concept for AppContainers, SQL Server Setup will create firewall rules for each AppContainer. As such, if there are 20 AppContainers, then 20 firewall rules will be created. An example of a firewall rule name is **Block network access for AppContainer-00 in SQL Server instance MSSQLSERVER**, where MSSQLSERVER is the name of the SQL Server instance.
38+
As before, additional configuration is still required for *implied authentication*, where script or code has to connect back to SQL Server to retrieve data or resources. The additional configuration is creating a database login for **SQLRUserGroup**. For more information, see [Add SQLRUserGroup as a database user](../r/add-sqlrusergroup-to-database.md)
3739

38-
## Symbolic link
40+
> [!NOTE]
41+
> Wehn code or script passes connection instructions, such as an ODBC connection string, back to SQL Server, the server refuses the request from Launchpad service by default. This occurs because there is no login created for Launchpad or the parent **SQLRUserGroup**. If you require an impersonation token for an identity other than the original caller, a database login for **SQLRUserGroup** is required.
3942
40-
A symbolic link is created to the current default R_SERVICES location as part of SQL Server setup. To avoid creating this link, grant 'all application packages' read permission to the hierarchy leading up to the R_SERVICES folder.
43+
## Firewall rules created by Setup
44+
45+
In previous releases, Setup created one outbound rule for **SQLRUserGroup** that denied network access to its members, with each worker account listed as a local principle subject to the rule.
46+
47+
In SQL Server 2019, SQL Server Setup creates individual firewall rules for each AppContainer (20 by default). Naming conventions for the firewall rule name are **Block network access for AppContainer-00 in SQL Server instance MSSQLSERVER**, where 00 is the number of the AppContainer (00-20 by default), and MSSQLSERVER is the name of the SQL Server instance.
48+
49+
## Symbolic link created by Setup
50+
51+
A symbolic link is created to the current default **R_SERVICES location** as part of SQL Server Setup. To avoid creating this link, grant 'all application packages' read permission to the hierarchy leading up to the **R_SERVICES** folder.
4152

4253

4354
## See also

0 commit comments

Comments
 (0)