Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Routing with Message Security

I have a WCF service with Message Security Authentication.

I want to set up a routing service for Load Balancing.

For some reason it doesn't work, I've enabled includeExceptionDetailInFaults to see exceptions, so in the client I see:

The client certificate is not provided. Specify a client certificate in ClientCredentials.

It seems that the certificate isn't forwarded from router->service.

Currently the client/router/service is on the same machine, so I have all the certificates, but if I deploy them on a different machine will the Router have to have the private keys?

In addition, if I want to establish a non-secured connection between the router and service (offload the security), how can I provide the Identity of the caller?

EDIT : For all Client/Router(both server&client)/Server the security configured the same :

            <security mode="Message">
                <message clientCredentialType="Certificate" negotiateServiceCredential="false"
                    algorithmSuite="Default" establishSecurityContext="false" />
            </security>
like image 304
Maxim Avatar asked Feb 08 '12 16:02

Maxim


People also ask

How to encrypt WCF message?

Client ApplicationCreate a new console application as a client for this WCF service. Add service reference of ProductService to the client application. Add below client code to console application. Enable WCF Tracing and Message Logging for a client application to see how the communication has encrypted.

Which routing message filter should be used when routing incoming messages that share a common address prefix?

The MatchAll filter matches any received message. It is useful if you must always route all received messages to a specific endpoint, such as a logging service that stores a copy of all received messages.

What is security mode in WCF?

Windows Communication Foundation (WCF) security has three common security modes that are found on most predefined bindings: transport, message, and "transport with message credential." Two additional modes are specific to two bindings: the "transport-credential only" mode found on the BasicHttpBinding, and the "Both" ...

Is WCF secure?

WCF provides a secure, reliable, scalable messaging framework that can work over any protocol in any network. However, you need to secure your WCF service from phishing attacks when passing sensitive information through the network.


2 Answers

There are many articles that says Microsoft didn't support this scenario and it is true.

This article explains how to write your own custom solution to provide security to all client/router/service.

like image 189
Sundeep Avatar answered Sep 27 '22 23:09

Sundeep


The client certificate is not provided. Specify a client certificate in ClientCredentials.

I have seen this error when the service certificate doesn't match the host domain name.

If you are still seeing this issue can you post some of your configuration entries?

like image 29
Thomas Bates Avatar answered Sep 27 '22 23:09

Thomas Bates