Share via


MessageSecurityOverHttp.NegotiateServiceCredential 속성

정의

서비스 자격 증명이 클라이언트에서 out of band 방식으로 제공되는지 아니면 협상 프로세스를 통해 서비스로부터 전달되는지를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool NegotiateServiceCredential { bool get(); void set(bool value); };
public bool NegotiateServiceCredential { get; set; }
member this.NegotiateServiceCredential : bool with get, set
Public Property NegotiateServiceCredential As Boolean

속성 값

Boolean

협상 프로세스를 통해 서비스 자격 증명을 가져오면 true이고, 그렇지 않으면 false입니다. 기본값은 true입니다.

예제

다음 코드에서는 이 속성에 액세스하여 해당 속성을 설정하는 방법을 보여 줍니다.

WSHttpBinding binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.Message;
binding.Security.Message.ClientCredentialType =
    MessageCredentialType.UserName;
binding.Security.Message.NegotiateServiceCredential = false;

CalculatorClient CalculatorClient = new CalculatorClient("myBinding");
CalculatorClient.ClientCredentials.ServiceCertificate.
    SetDefaultCertificate("Al", StoreLocation.CurrentUser, StoreName.My);
Dim binding As New WSHttpBinding()
binding.Security.Mode = SecurityMode.Message
binding.Security.Message.ClientCredentialType = _
MessageCredentialType.UserName
binding.Security.Message.NegotiateServiceCredential = False

Dim CalculatorClient As New CalculatorClient("myBinding")
CalculatorClient.ClientCredentials.ServiceCertificate. _
    SetDefaultCertificate("Al", StoreLocation.CurrentUser, StoreName.My)

설명

이 속성을 true로 설정하려면 클라이언트와 서비스에서 WS-Trust 및 WS-SecureConversation을 지원해야 합니다. 이 속성을 false로 설정하면 WS-Trust 또는 WS-SecureConversation 지원이 필요 없습니다.

Anonymous, Username 또는 Certificate 클라이언트 자격 증명 형식의 경우 이 속성을 false로 설정하면 서비스 자격 증명이 클라이언트에서 out of band 방식으로 사용할 수 있고, 사용할 서비스의 자격 증명을 클라이언트가 지정해야 함을 의미합니다.

Windows 자격 증명의 경우 이 속성을 false로 설정하면 KerberosToken 기반 인증이 사용됩니다. 그러기 위해서는 클라이언트와 서비스가 Kerberos 도메인의 일부여야 합니다. 이 모드는 OASIS로부터 Kerberos 토큰 프로필을 구현하는 SOAP 스택과 상호 운용할 수 있습니다. 이 속성을 true로 설정하면 SOAP 메시지를 통한 SPNego 교환을 터널링하는 SOAP 협상이 수행됩니다. 이 모드는 상호 운용할 수 없습니다.

이 속성은 서비스 자격 증명이 클라이언트와 서비스 간에 자동으로 협상되는지 여부를 나타냅니다. 이 속성이 true이면 해당 협상이 발생합니다. 이 속성이 false이면 서비스 자격 증명을 클라이언트에서 지정해야 서비스와의 통신이 발생할 수 있습니다.

이 속성이 false로 설정되고 Windows를 클라이언트 자격 증명 형식으로 사용하도록 바인딩이 구성된 경우 서비스 계정은 SPN(서비스 사용자 이름)과 연결되어야 합니다. 이렇게 하려면 NETWORK SERVICE 계정이나 LOCAL SYSTEM 계정에서 서비스를 실행합니다. 또는 SetSpn.exe 도구를 사용하여 서비스 계정의 SPN을 만듭니다. 두 경우 모두 클라이언트는 servicePrincipalName> 요소에서< 또는 생성자를 사용하여 올바른 SPN을 EndpointAddress 사용해야 합니다. 자세한 내용은 서비스 Id 및 인증합니다.

적용 대상