views:

1978

answers:

4

I've got a WCF service which handles some sensitive data. I'd like to make sure I keep that data from being exposed and so I'm looking at netTCPBinding... primarily because I can control the network it runs across and performance is a high priority.

I recognize that there are two areas that can be encrypted: transport level and message level. I intend to use certificates to encrypt at the transport level, which I understand uses TLS over TCP.

The calling clients are also mine and so I control the transport level. Since I anticipate no change in the transport layer, do I need to bother with message level encryption? It seems unnecessary unless I want the flexibility of changing the transport.

+3  A: 

The message-level encryption is needed when you do not control an intermediary. Intermediary services need to be able to modify the soap headers and could peek at your sensitive data for malicious purposes. But if you control everything from initial sender to ultimate receiver, then you do not need encryption at that level.

I work on a project that uses netTCP for internal services, and I can confirm it works well.

hurst
+3  A: 

In general terms, as long as you're dealing with point to point connections, and certificates are being validated on both sides (particularly if you're using mutual authentication), then yes, transport level security might be enough. Checking the certificates is useful to ensure that someone doesn't supplant the server (or no man-in-the-middle gets in the way).

Message-level security becomes more useful when you need to do content signing or you need non-repudiation and particularly when you have intermediaries (routers) between the client and server and want to make sure they can route the message without actually looking at its contents.

tomasr
+2  A: 

I think you're spot on. If you don't plan on moving this to another transport mechanism I cant see why you would need both message- and transport encryption. If performance is a key factor skipping message encryption will save you some performance since you don't have to add protection on sending/receiving each messages.

Jonas Follesø
A: 

What I don't get is. If I trust the intermediaries why do I encrypt at all?

Thorsten
I should have been more clear that I don't control the middle of the network... just the endpoints. By "controlling the network" I meant to imply that I don't have to worry about firewall restrictions... I have management of those.
Mike L