I have a requirement to make sure that the x509 certificate that the client presents during the WCF session has a specific certificate service in its chain.
I know that I can verify the certificate chain programmatically using ChainElements [index].
But I'm not sure how to do this, still integrating with WCF using configuration files.
WCF is currently configured in the configuration file, see below:
<services> <service name="SampleService" behaviorConfiguration="wsHttpBehavior"> <endpoint name="SampleEndPoint" address="http://localhost:70000/SampleService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding" contract="SampleApp.ISampleService"> </endpoint> </service> </services> <bindings> <wsHttpBinding> <binding name="wsHttpBinding"> <reliableSession enabled="true" ordered="true" /> <security> <message clientCredentialType="Certificate" /> </security> </binding> </wsHittpBinding> </bindings> <behaviors> <serviceBehaviors> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> <serviceCredentials> <serviceCertificate findValue="aa aa aa" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySerialNumber" /> </serviceCredentials> <serviceBehaviors> </behaviors>
Is there anything I can do in the configuration file to tell him to make sure that the client certificate provided contains a specific certificate authority. Or do I need to bind a WCF channel to do this? Is it possible?
source share