This documentation is archived and is not being maintained.

<authentication> of <clientCertificate> Element

Specifies authentication behaviors for client certificates used by a service.

customCertificateValidatorType="namespace.typeName, [,AssemblyName] [,Version=version number] [,Culture=culture] [,PublicKeyToken=token]"

The following sections describe attributes, child elements, and parent elements


Attribute Description


Optional string. A type and assembly used to validate a custom type. This attribute must be set when certificateValidationMode is set to Custom.


Optional enumeration. Specifies one of the modes used to validate credentials. This attribute is of the System.Servicemodel.Security.X509CertificateValidationMode type. If set to Custom, then a customCertificateValidator must also be supplied. The default is ChainTrust.


Optional Boolean. Specifies if Windows groups are included in the security context. Setting this attribute to true has a performance impact, as it results in a full group expansion. Set this attribute to false if you do not need to establish the list of groups a user belongs to.


Boolean. Specifies whether the client can be mapped to a Windows identity using the certificate. Active Directory must be enabled to do this. For more information about using the Active Directory feature, see .


Optional enumeration. One of the modes used to check for a revoked certificate lists (RCL). The default is Online.


Optional enumeration. One of the two system store locations: LocalMachine or CurrentUser. This value is used when a service certificate is negotiated to the client. Validation is performed against the Trusted People store in the specified store location. The default is CurrentUser.

Child Elements


Parent Elements

Element Description

<clientCertificate> of <serviceCredentials>

Defines an X.509 certificate used to authenticate a client to a service.

The <authentication> element corresponds to the X509ClientCertificateAuthentication class. It enables you to customize how clients are authenticated. You can set the certificateValidationMode attribute to None, ChainTrust, PeerOrChainTrust, PeerTrust, or Custom. By default, the level is set to ChainTrust, which specifies that each certificate must be found in a hierarchy of certificates ending in a root authority at the top of the chain. This is the most secure mode. You can also set the value to PeerOrChainTrust, which specifies that self-issued certificates (peer trust) are accepted as well as certificates that are in a trusted chain. This value is used when developing and debugging clients and services because self-issued certificates need not be purchased from a trusted authority. When deploying a client, use the ChainTrust value instead.

You can also set the value to Custom. When set to the Custom value, you must also set the customCertificateValidatorType attribute to an assembly and type used to validate the certificate. To create your own custom validator, you must inherit from the abstract X509CertificateValidator class. For more information, see How To: Create a Service Employing a Custom Certificate Validator.

The following code specifies an X.509 certificate and a custom validation type in the <authentication> element.

 <behavior name="myServiceBehavior">
         x509FindType="FindByIssuerName" />
   <authentication customCertificateValidatorType="MyTypes.Coho"
    mapClientCertificateToWindowsAccount="true" />