- Смарт-карты и службы удаленных рабочих столов Smart Card and Remote Desktop Services
- Перенаправление служб удаленного рабочего стола Remote Desktop Services redirection
- RD Session Host server single sign-in experience RD Session Host server single sign-in experience
- Удаленные службы настольных компьютеров и вход смарт-карт Remote Desktop Services and smart card sign-in
- Удаленные службы настольных компьютеров и вход смарт-карт в доменах Remote Desktop Services and smart card sign-in across domains
- Смарт-карты для службы Windows Smart Cards for Windows Service
Смарт-карты и службы удаленных рабочих столов Smart Card and Remote Desktop Services
Применяется к: Windows 10, Windows Server 2016 Applies To: Windows 10, Windows Server 2016
В этом разделе для ИТ-специалистов описывается поведение служб удаленного рабочего стола при внедрении входной карточки. This topic for the IT professional describes the behavior of Remote Desktop Services when you implement smart card sign-in.
Содержимое в этом разделе относится к версиям Windows, указанным в списке Applies To в начале этой темы. The content in this topic applies to the versions of Windows that are designated in the Applies To list at the beginning of this topic. В этих версиях логика перенаправления смарт-карт и API WinSCard объединяются для поддержки нескольких перенаправленных сеансов в один процесс. In these versions, smart card redirection logic and WinSCard API are combined to support multiple redirected sessions into a single process.
Поддержка смарт-карт необходима, чтобы включить многие сценарии удаленных настольных служб. Smart card support is required to enable many Remote Desktop Services scenarios. К ним можно отнести следующие. These include:
Использование служб быстрого переключения пользователей или служб удаленного рабочего стола. Using Fast User Switching or Remote Desktop Services. Пользователь не может установить удаленное десктопное подключение на основе смарт-карт. A user is not able to establish a redirected smart card-based remote desktop connection. То есть попытка подключения не удалась при быстром переключении пользователей или в сеансе удаленной службы настольных компьютеров. That is, the connect attempt is not successful in Fast User Switching or from a Remote Desktop Services session.
Включение шифрования файловой системы (EFS) для поиска читателя смарт-карт пользователя в локальном органе безопасности (LSA) в процессе быстрого переключения пользователей или в сеансе удаленной службы настольных компьютеров. Enabling Encrypting File System (EFS) to locate the user’s smart card reader from the Local Security Authority (LSA) process in Fast User Switching or in a Remote Desktop Services session. Если EFS не может найти читателя или сертификата смарт-карт, EFS не может расшифровать файлы пользователей. If EFS is not able to locate the smart card reader or certificate, EFS cannot decrypt user files.
Перенаправление служб удаленного рабочего стола Remote Desktop Services redirection
В сценарии удаленного рабочего стола пользователь использует удаленный сервер для запуска служб, а смарт-карта локализуется на компьютере, который использует пользователь. In a Remote Desktop scenario, a user is using a remote server for running services, and the smart card is local to the computer that the user is using. В сценарии регистрации смарт-карт служба смарт-карт на удаленном сервере перенаправляется на считыватель смарт-карт, подключенный к локальному компьютеру, на котором пользователь пытается войти. In a smart card sign-in scenario, the smart card service on the remote server redirects to the smart card reader that is connected to the local computer where the user is trying to sign in.
Удаленное перенаправление настольных компьютеров Remote Desktop redirection
Заметки о модели перенаправления: Notes about the redirection model:
Этот сценарий — удаленный сеанс регистрации на компьютере с службами удаленного рабочего стола. This scenario is a remote sign-in session on a computer with Remote Desktop Services. В удаленном сеансе (помеченном как «Клиентская сессия»), пользователь запускает чистое использование /smartcard. In the remote session (labeled as «Client session»), the user runs net use /smartcard.
Стрелки представляют поток ПИН-кода после того, как пользователь ввел ПИН-код в командной подсказке, пока не достигнет смарт-карты пользователя в считывателье смарт-карт, подключенном к клиентского компьютера удаленного рабочего стола (RDC). Arrows represent the flow of the PIN after the user types the PIN at the command prompt until it reaches the user’s smart card in a smart card reader that is connected to the Remote Desktop Connection (RDC) client computer.
Проверка подлинности выполняется LSA в сеансе 0. The authentication is performed by the LSA in session 0.
Обработка CryptoAPI выполняется в LSA (Lsass.exe). The CryptoAPI processing is performed in the LSA (Lsass.exe). Это возможно, так как перенаправление RDP (rdpdr.sys) позволяет использовать контекст за сеанс, а не за один процесс. This is possible because RDP redirector (rdpdr.sys) allows per-session, rather than per-process, context.
Компоненты WinScard и SCRedir, которые ранее были отдельными модулями в операционных системах, чем Windows Vista, теперь включены в один модуль. The WinScard and SCRedir components, which were separate modules in operating systems earlier than Windows Vista, are now included in one module. Библиотека ScHelper — это оболочка CryptoAPI, специфическая для протокола Kerberos. The ScHelper library is a CryptoAPI wrapper that is specific to the Kerberos protocol.
Решение о перенаправлении принимается на основе контекста смарт-карты на основе сеанса потока, который выполняет вызов SCardEstablishContext. The redirection decision is made on a per smart card context basis, based on the session of the thread that performs the SCardEstablishContext call.
Изменения в WinSCard.dll реализации были внесены в Windows Vista для улучшения перенаправления смарт-карт. Changes to WinSCard.dll implementation were made in Windows Vista to improve smart card redirection.
RD Session Host server single sign-in experience RD Session Host server single sign-in experience
В соответствии с общими критериями клиент RDC должен быть настроен на использование диспетчера учетных данных для приобретения и сохранения пароля пользователя или ПИН-кода смарт-карты. As a part of the Common Criteria compliance, the RDC client must be configurable to use Credential Manager to acquire and save the user’s password or smart card PIN. Соблюдение общих критериев требует, чтобы приложения не получили прямой доступ к паролям или ПИН-коду пользователя. Common Criteria compliance requires that applications not have direct access to the user’s password or PIN.
Соблюдение общих критериев требует специально, чтобы пароль или ПИН-код никогда не оставьте LSA незашифрованным. Common Criteria compliance requires specifically that the password or PIN never leave the LSA unencrypted. Распределенный сценарий должен разрешить пароль или ПИН-код для перемещения между одним доверенным LSA и другим, и его нельзя расшифровать во время транзита. A distributed scenario should allow the password or PIN to travel between one trusted LSA and another, and it cannot be unencrypted during transit.
Когда для сеансов удаленной службы настольных компьютеров используется один вход с включенной смарт-картой, пользователям по-прежнему необходимо войти для каждого нового сеанса служб удаленного рабочего стола. When smart card-enabled single sign-in (SSO) is used for Remote Desktop Services sessions, users still need to sign in for every new Remote Desktop Services session. Однако пользователю не предложен пин-код для создания сеанса удаленной службы настольных компьютеров. However, the user is not prompted for a PIN more than once to establish a Remote Desktop Services session. Например, после двойного щелчка значка документа Microsoft Word, расположенного на удаленном компьютере, пользователю предлагается ввести ПИН-код. For example, after the user double-clicks a Microsoft Word document icon that resides on a remote computer, the user is prompted to enter a PIN. Этот ПИН-код отправляется с помощью защищенного канала, созданного SSP учетных данных. This PIN is sent by using a secure channel that the credential SSP has established. ПИН-код передается клиенту RDC по безопасному каналу и отправляется в Winlogon. The PIN is routed back to the RDC client over the secure channel and sent to Winlogon. Пользователь не получает дополнительных подсказок для ПИН-кода, если ПИН-код не является неправильным или есть ошибки, связанные с смарт-картами. The user does not receive any additional prompts for the PIN, unless the PIN is incorrect or there are smart card-related failures.
Удаленные службы настольных компьютеров и вход смарт-карт Remote Desktop Services and smart card sign-in
Службы удаленного рабочего стола позволяют пользователям войти с помощью смарт-карты, введя ПИН-код на клиентский компьютер RDC и отправив его на хост-сервер сеанса RD таким образом, как проверка подлинности, основанная на имени пользователя и пароле. Remote Desktop Services enable users to sign in with a smart card by entering a PIN on the RDC client computer and sending it to the RD Session Host server in a manner similar to authentication that is based on user name and password.
Кроме того, для входа в смарт-карты необходимо включить параметры групповой политики, которые являются специфическими для служб удаленного рабочего стола. In addition, Group Policy settings that are specific to Remote Desktop Services need to be enabled for smart card-based sign-in.
Чтобы включить вход смарт-карты на сервер удаленного рабочего стола (RD Session Host), сертификат Центра рассылки ключей (KDC) должен присутствовать на клиентном компьютере RDC. To enable smart card sign-in to a Remote Desktop Session Host (RD Session Host) server, the Key Distribution Center (KDC) certificate must be present on the RDC client computer. Если компьютер не находится в одном домене или в группе, для развертывания сертификата можно использовать следующую команду: If the computer is not in the same domain or workgroup, the following command can be used to deploy the certificate:
certutil -dspublish NTAuthCA «DSCDPContainer» certutil -dspublish NTAuthCA «DSCDPContainer«
Общее имя DSCDPContainer (CN) обычно является именем органа сертификации. The DSCDPContainer Common Name (CN) is usually the name of the certification authority.
certutil -dspublish NTAuthCA «CN=NTAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration,DC=engineering,DC=contoso,DC=com» certutil -dspublish NTAuthCA «CN=NTAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration,DC=engineering,DC=contoso,DC=com»
Сведения об этом параметре для средства командной строки см. в пункте dsPublish. For information about this option for the command-line tool, see -dsPublish.
Удаленные службы настольных компьютеров и вход смарт-карт в доменах Remote Desktop Services and smart card sign-in across domains
Чтобы включить удаленный доступ к ресурсам предприятия, корневой сертификат для домена должен быть задан на смарт-карте. To enable remote access to resources in an enterprise, the root certificate for the domain must be provisioned on the smart card. С компьютера, который присоединяется к домену, запустите следующую команду в командной строке: From a computer that is joined to a domain, run the following command at the command line:
certutil -scroots update certutil -scroots update
Сведения об этом параметре для средства командной строки см. в пункте -SCRoots. For information about this option for the command-line tool, see -SCRoots.
Для служб удаленного рабочего стола в различных доменах сертификат KDC хост-сервера сеанса RD также должен присутствовать в магазине NTAUTH клиентского компьютера. For Remote Desktop Services across domains, the KDC certificate of the RD Session Host server must also be present in the client computer’s NTAUTH store. Чтобы добавить магазин, запустите следующую команду в командной строке: To add the store, run the following command at the command line:
certutil -addstore-enterprise NTAUTH certutil -addstore -enterprise NTAUTH
Где сертификата KDC. Where is the root certificate of the KDC certificate issuer.
Сведения об этом параметре для средства командной строки см. в книге -addstore. For information about this option for the command-line tool, see -addstore.
**** Примечание Если вы используете SSP учетных данных на компьютерах с поддерживаемой версией операционной системы, указанной в списке Applies To в начале этого раздела. Чтобы войти со смарт-картой с компьютера, не присоединився к домену, смарт-карта должна содержать корневую сертификацию контроллера домена. Note If you use the credential SSP on computers running the supported versions of the operating system that are designated in the Applies To list at the beginning of this topic: To sign in with a smart card from a computer that is not joined to a domain, the smart card must contain the root certification of the domain controller. Безопасный канал инфраструктуры общедоступных ключей (PKI) невозможно установить без корневой сертификации контроллера домена. A public key infrastructure (PKI) secure channel cannot be established without the root certification of the domain controller.
Вход в службы удаленного рабочего стола в домене работает только в том случае, если УПЛ в сертификате использует следующую форму: @ Sign-in to Remote Desktop Services across a domain works only if the UPN in the certificate uses the following form: @
UpN в сертификате должен включать домен, который можно разрешить. The UPN in the certificate must include a domain that can be resolved. В противном случае протокол Kerberos не может определить, к каков домену обращаться. Otherwise, the Kerberos protocol cannot determine which domain to contact. Эту проблему можно решить, включив подсказки домена GPO X509. You can resolve this issue by enabling GPO X509 domain hints. Дополнительные сведения об этом параметре см. в группе политики и параметров реестра смарт-карт. For more information about this setting, see Smart Card Group Policy and Registry Settings.
Смарт-карты для службы Windows Smart Cards for Windows Service
Применимо к: Windows 10, Windows Server 2016 Applies To: Windows 10, Windows Server 2016
В этом разделе для ИТ-специалистов и разработчиков смарт-карт описывается, как служба смарт-карт для Windows (прежнее название — диспетчер ресурсов смарт-карт) управляет взаимодействием с читателями и приложениями. This topic for the IT professional and smart card developers describes how the Smart Cards for Windows service (formerly called Smart Card Resource Manager) manages readers and application interactions.
Служба смарт-карт для Windows предоставляет базовую инфраструктуру для всех остальных компонентов смарт-карт при управлении считывателей смарт-карт и взаимодействиями с приложениями на компьютере. The Smart Cards for Windows service provides the basic infrastructure for all other smart card components as it manages smart card readers and application interactions on the computer. Он полностью соответствует спецификациям, установленным в pc/SC Workgroup. It is fully compliant with the specifications set by the PC/SC Workgroup. Сведения об этих спецификациях см. на веб-сайте pc/SC Workgroup Specifications. For information about these specifications, see the PC/SC Workgroup Specifications website.
Служба смарт-карт для Windows запускается в контексте локальной службы и реализуется как общая служба процесса хоста служб (svchost). The Smart Cards for Windows service runs in the context of a local service, and it is implemented as a shared service of the services host (svchost) process. Смарт-карты для службы Windows, Налддсвейру, имеет следующее описание службы: The Smart Cards for Windows service, Scardsvr, has the following service description:
**** Примечание Чтобы winscard.dll в качестве правильного установщика класса, INF-файл для ридера смарт-карт должен указать следующее для Class и ClassGUID: Note For winscard.dll to be invoked as the proper class installer, the INF file for a smart card reader must specify the following for Class and ClassGUID:
Class=SmartCardReader
ClassGuid=
По умолчанию служба настроена для ручного режима. By default, the service is configured for manual mode. Создателям драйверов для чтения смарт-карт необходимо настроить свои infs таким образом, чтобы они запускали службу автоматически и winscard.dll файлы вызывали предопределеную точку входа для запуска службы во время установки. Creators of smart card reader drivers must configure their INFs so that they start the service automatically and winscard.dll files call a predefined entry point to start the service during installation. Точка входа определяется как часть класса SmartCardReader и не вызвана напрямую. The entry point is defined as part of the SmartCardReader class, and it is not called directly. Если устройство объявляет себя как часть этого класса, автоматически вызывается точка входа для запуска службы при вставке устройства. If a device advertises itself as part of this class, the entry point is automatically invoked to start the service when the device is inserted. Использование этого метода гарантирует, что служба будет включена при необходимости, но также отключена для пользователей, не использующих смарт-карты. Using this method ensures that the service is enabled when it is needed, but it is also disabled for users who do not use smart cards.
Когда служба запущена, она выполняет несколько функций: When the service is started, it performs several functions:
Она регистрируется для уведомлений службы. It registers itself for service notifications.
Она регистрируется для уведомлений plug and Play (PnP), связанных с удалением и добавлением устройств. It registers itself for Plug and Play (PnP) notifications related to device removal and additions.
Он инициализирует кэш данных и глобальное событие, которое сообщает о том, что служба запущена. It initializes its data cache and a global event that signals that the service has started.
**** Примечание Для внедрения смарт-карт рассмотрите возможность отправки всех сообщений в операционных системах Windows со средствами чтения смарт-карт через службу смарт-карт для Windows. Note For smart card implementations, consider sending all communications in Windows operating systems with smart card readers through the Smart Cards for Windows service. Это обеспечивает интерфейс для отслеживания, выбора и связи со всеми драйверами, которые объявляют себя членами группы устройств чтения смарт-карт. This provides an interface to track, select, and communicate with all drivers that declare themselves members of the smart card reader device group.
Служба смарт-карт для Windows классифицируют каждый слот устройства чтения смарт-карт как уникальный считыватель, и каждый слот также управляется отдельно независимо от физических характеристик устройства. The Smart Cards for Windows service categorizes each smart card reader slot as a unique reader, and each slot is also managed separately, regardless of the device’s physical characteristics. Служба смарт-карт для Windows обрабатывает следующие высокоуровневые действия: The Smart Cards for Windows service handles the following high-level actions:
Введение в устройство Device introduction
Инициализация читателя Reader initialization
Уведомление клиентов о новых читателях Notifying clients of new readers
Сериализация доступа к читателям Serializing access to readers
Доступ к смарт-карте Smart card access
Туннелing команд для чтения Tunneling of reader-specific commands