大网数据广告活动
域与目录服务

How Clients Compose a Service's SPN

· 52CE 我爱测

To authenticate a service, a client application composes an SPN for the service instance to which it must connect.

To authenticate a service, a client application composes an SPN for the service instance to which it must connect. The client application can use the DsMakeSpn function to compose an SPN. The client specifies the components of the SPN using known data or data retrieved from sources other than the service itself.

The form of an SPN is as shown in the following form:

<service class>/<host>:<port>/<service name>

In this form, "<service class>" and "<host>" are required. "<port>" and "<service name>" are optional.

Typically, the client recognizes the "<service class>" part of the name, and recognizes which of the optional components to include in the SPN. The client can retrieve components of the SPN from sources such as a service connection point (SCP) or user input. For example, the client can read the serviceDNSName attribute of a service's SCP to get the "<host>" component. The serviceDNSName attribute contains either the DNS name of the server on which the service instance is running or the DNS name of SRV records containing the host data for service replicas. The "<service name>" component, used only for replicable services, can be the distinguished name of the service's SCP, the DNS name of the domain served by the service, or the DNS name of SRV or MX records.

For more information and a code example used to compose an SPN for a service, see How a Client Authenticates an SCP-based Windows Sockets Service.

For more information and a description of the SPN components, see Name Formats for Unique SPNs.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。