WCF service that identifies a client by certificate

We have a WCF service using BasicHttpBinding with server and client certificates. We use transport security:

<security mode="Transport"> <transport clientCredentialType="Certificate" /> </security> 

While everything works (the client calls the web method and is only allowed if the client certificate is issued by a trusted CA).

Now we want to check the WCF service if the client certificate is a specific certificate. The certificate we are looking for is also known (installed) on the server.

How can we get the used client certificate in the service code? How to upload the certificate we want to compare with? How do we compare?

+4
source share
1 answer

I have not actually tried this, but the technique shown in this MSDN article seems to be exactly what you are looking for. It explains how to create a custom certificate certificate authority (did not know that this is possible).

+4
source

All Articles