Score:0

Authenticating Infrastructure SOAP-based API

in flag

I have been involved in a discussion the other day regarding the implementation of backend-to-backend authentication. The communications between each backend happen via SOAP (XML) message protocol.

Objective:

Authenticate calls originating from Backend A <> Backend B. All communications can be considered to go through TLS tunneling first

Their proposed solution:

Append a Signature in a XML Header which is computed using only certain parts of the request body and a timestamp, encrypted with AES-ECB

The secrets are shared in an external channel and maintained at each end.

My concerns / own solution:

From my perspective, this problem calls for a MAC-type of authentication that would guarantee message integrity and authenticity.

I would recommend them to use HMAC-SHA256 instead, with a nonce-timestamp to prevent replay attacks, and pass that it in a custom XML Header which would be validated by each backend.

I do not understand the need of using encryption here, especially since they do not cipher the request body (confidentiality). However, I do not really have strong enough arguments as to why their solution is insecure/unsuitable

NB: I reckon that the ECB cipher mode can also have oracle problems, and generally CBC would be preferred over it?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.