11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 12: Building Secure <strong>Web</strong> Services 337Sensitive DataThe threats of network eavesdropping or information disclosure at intermediateapplication nodes must be addressed if your <strong>Web</strong> service request or responsemessages convey sensitive application data, for example, credit card numbers,employee details, <strong>and</strong> so on.In a closed environment where you are in control of both endpoints, you can useSSL or IPSec to provide transport layer encryption. In other environments <strong>and</strong> wheremessages are routed through intermediate application modes, a message levelsolution is required. The WS-<strong>Security</strong> st<strong>and</strong>ard defines a confidentiality service basedon the World Wide <strong>Web</strong> Consortium (W3C) XML Encryption st<strong>and</strong>ard that allowsyou to encrypt some or all of a SOAP message before it is transmitted.XML EncryptionYou can encrypt all or part of a SOAP message in three different ways:● Asymmetric encryption using X.509 certificates● Symmetric encryption using shared keys● Symmetric encryption using custom binary tokensAsymmetric Encryption Using X.509 CertificatesWith this approach, the consumer uses the public key portion of an X.509 certificateto encrypt the SOAP message. This can only be decrypted by the service that ownsthe corresponding private key.The <strong>Web</strong> service must be able to access the associated private key. By default,WSE searches for X.509 certificates in the local machine store. You can use the configuration element in <strong>Web</strong>.config to set the store location to the current user storeas follows.If you use the user store, the user profile of the <strong>Web</strong> service’s process account must beloaded. If you run your <strong>Web</strong> service using the default ASPNET least privileged localaccount, version 1.1 of the .NET Framework loads the user profile for this account,which makes the user key store accessible.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!