0

I have a WCF service hosted in IIS. The service is mandated to be basicHttpBinding. There is IBM DataPower in front of the WCF service that exposes it to outside world.

I am writing a WCF client app (inheriting from ClientBase) that has to encrypt the message body using a pre-shared public key and DataPower will decrypt it and forward the message to the hosting server. As for responses, DataPower will encrypt it and the client should be able to decrypt the responses received. One way to achieve this (that I could think of) is using IClientMessageInspector and use the BeforeSendRequest() to encrypt AfterReceiveReply() to decrypt. Before going this route, I wanted to know what other options are available to achieve this?

muruge
  • 4,083
  • 3
  • 38
  • 45
  • Does the encryption need to use the pre-defined shared public key? If not, `basicHttpBinding` supports message encryption. – Tim Sep 18 '13 at 06:22
  • Yes, it has to use the pre-shared key. Also, will basicHttpBinding support message encryption in SOAP 1.1? – muruge Sep 19 '13 at 05:24

2 Answers2

0

Usually the pattern is to use SSL which is easy to work with in DataPower and WCF clients. I'm not sure how easy it is to configure message level encryption in DataPower. If you insist on message level encryption first check if DP dsupports the standard WS-Security approach, in which case configuring the WCF client is easy (basic http binding with security mode of message and client credential type of certificate or username, but of course depend if you want to configure client auth).

Yaron Naveh
  • 23,560
  • 32
  • 103
  • 158
  • Another requirement that I forgot to mention is SOAP 1.1. WS-Security requires SOAP 1.2, right? – muruge Sep 19 '13 at 05:26
0

Yes datapower supports WS-Security standard and you can play around any part or whole of messages for encryption/decryption. The only thing you need to weight here is whether to use PKI or symmetric encryption/decryption technique while playing with message level security.