Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does TLS ensure message integrity and confidentiality of data transmission in a RESTful Java enterprise

I want to apply web service security according to OWASP Web Service Security. Thereby I stumbled over the two points:

  1. Message Integrity
  2. Message Confidentiality

So far there is just a RESTful service which can be directly accessed by a client. For each request the client needs to authenticate by the server. All communication is secured via TLS. I'm now unsure about Message Integrity since I don't understand the sentence:

When using public key cryptography, encryption does guarantee confidentiality but it does not guarantee integrity since the receiver's public key is public. For the same reason, encryption does not ensure the identity of the sender.

Is it also required that the data was signed by the client in order that message integrity is ensured? TLS is only point-to-point, what is about proxies?

Concerning Message Confidentiality, I understood it as follows.

  1. Use TLS to ensure message confidentiality over the wire.
  2. Use a symmetric encryption to encrypt the transmitted data.
  3. The encrypted data get stored in data base.

Did I understand that right?

like image 806
My-Name-Is Avatar asked Aug 22 '13 20:08

My-Name-Is


People also ask

Does TLS ensure data integrity?

TLS provides data integrity by calculating a message digest. For more information, refer to Data integrity of messages. Use of TLS does ensure data integrity, provided that the CipherSpec in your channel definition uses a hash algorithm as described in the table in Enabling CipherSpecs.

Does TLS encrypt data at rest?

The rest can use encrypted transport with SSL or TLS. When data is encrypted in transit, it can only be compromised if the session key can be compromised.

Does TLS provide authentication?

TLS provides three primary services that help ensure the safety and security of data exchanged with it: Authentication. Authentication lets each party to the communication verify that the other party is who they claim to be. Encryption.

How do you ensure confidentiality and integrity and authentication?

Ensure message confidentiality by converting the contents to ciphertext with XML encryption. This encryption ensures that data remains private and confidential, and that it cannot be viewed by unauthorized users or eavesdroppers. Ensure message integrity and authentication by signing a message with a digital signature.


1 Answers

From the TLS specification:

The primary goal of the TLS Protocol is to provide privacy and data integrity between two communicating applications. [...]

  • The connection is private. Symmetric cryptography is used for data encryption (e.g., DES [DES], RC4 [SCH] etc.). [...]

  • The connection is reliable. Message transport includes a message integrity check using a keyed MAC. Secure hash functions (e.g., SHA, MD5, etc.) are used for MAC computations. The Record Protocol can operate without a MAC, but is generally only used in this mode while another protocol is using the Record Protocol as a transport for negotiating security parameters.

So, yes, TLS will provide you with integrity and confidentiality of the message during its transport, provided that it was used correctly.

In particular, the client needs to verify the certificate to ensure it is communicating with the right server (verifying that the certificate is genuine and issued by a trusted party, and issued to the host name it intended to contact).

  • Use TLS to ensure message confidentiality over the wire.
  • Use a symmetric encryption to encrypt the transmitted data.

TLS will provide confidentiality via encryption. (You need to use an appropriate cipher suite, in particular not a anonymous cipher suite or a cipher suite will null encryption, but that's always the case by default.)

  • The encrypted data get stored in data base.

If you want to encrypt the data in your database, that's a different problem. TLS only provides you with integrity and confidentiality during transport. Once it's handled by your web application, it's deciphered.

TLS is only point-to-point, what is about proxies?

HTTP proxies only relay the TLS traffic as-is, without looking into it or altering it. (Some proxy servers can intercept the traffic, but the certificate verification would fail, unless you forget to check the certificate.)

like image 159
Bruno Avatar answered Sep 26 '22 00:09

Bruno