Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top