X509ClientCertificateAuthentication.IncludeWindowsGroups 속성

정의

Windows 그룹이 권한 부여 컨텍스트에 포함되는지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

trueWindows 그룹이 권한 부여 컨텍스트에 포함되어 있으면 이고, 그렇지 않으면 . false 기본값은 true입니다.

예제

다음 코드에서는 이 속성을 설정하는 방법을 보여 있습니다.

// Create a service host.
Uri httpUri = new Uri("http://localhost/Calculator");
ServiceHost sh = new ServiceHost(typeof(Calculator), httpUri);
// Create a binding that uses a certificate.
WSHttpBinding b = new WSHttpBinding(SecurityMode.Message);
b.Security.Message.ClientCredentialType =
    MessageCredentialType.Certificate;

// Get a reference to the authentication object.
X509ClientCertificateAuthentication myAuthProperties =
    sh.Credentials.ClientCertificate.Authentication;
// Configure IncludeWindowsGroups.
myAuthProperties.IncludeWindowsGroups = true;
' Create a service host.
Dim httpUri As New Uri("http://localhost/Calculator")
Dim sh As New ServiceHost(GetType(Calculator), httpUri)
' Create a binding that uses a certificate.
Dim b As New WSHttpBinding(SecurityMode.Message)
b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate


' Get a reference to the authentication object.
Dim myAuthProperties As X509ClientCertificateAuthentication = _
sh.Credentials.ClientCertificate.Authentication
' Configure IncludeWindowsGroups.
myAuthProperties.IncludeWindowsGroups = True

구성 파일에서 속성을 설정할 수도 있습니다.

<serviceCredentials>
  <clientCertificate>
     <authentication includeWindowsGroups ='true'/>
  </clientCertificate>
</serviceCredentials>

설명

이 속성은 속성이 .로 설정된 경우에만 MapClientCertificateToWindowsAccount 유효합니다 true.

사용자가 속한 그룹 목록을 설정할 필요가 없는 경우에만 이 속성을 false 설정합니다. 이로 인해 애플리케이션 및 권한 부여 결정에 Windows 그룹이 필요하지 않은 경우 성능이 향상될 수 있습니다.

적용 대상