The post will show the configuration needed to enable net.tcp transport security with impersonation for WCF.
What is transport security?
Transfer security is concerned with guaranteeing the integrity and confidentiality of WCF service messages as they flow from application to application across the network.
What is impersonation?
Impersonation is most commonly used as a way of pretending to be another user as to perform a particular action or to access a resource which can only be the user being impersonated. Impersonation allows the service to act as the client while performing the action.
NOTE: Impersonation can be a potential security hole, so make sure the user being impersonated has limited rights.
What needs to be done to enable impersonation?
- If a web client is being used the web site clients requires the following; the identity element needs to be added to enable impersonation in the web site.
- In the configuration files for all clients and services change the net.tcp binding to enable transport security.
(click on the image to enlarge)
- Set the security mode to “Transport”
- Set the clientcredialtype to “Windows”
- In all the configuration files for all clients create endpoint behaviour and assign to the client end points.
(click on the image to enlarge)
- Within the endpoint behaviour create a ClientCrediential element
- Set to allowImpersonationLevel to “Impersonation”
- Define a clientCertificate
- Define a serviceCerticate
- Define the authentication to use.