I'm reading a lot about implementing security constraints to a REST API.
There are a lot of methods, some better than others for 3party applications or to consume my own API.
- HTTP Basic + TLS (with keys)
- HTTP Digest + TLS
- OAuth 1.0a, 2.0
- Application-only-auth (with keys) link
- Amazon Signature Version 4 Link
To consume my own API I have 3 options (from low to high degree of difficulty to implement, always using TLS!):
- HTTP Basic + TLS (with keys)
- HTTP Digest + TLS
- Application-only-auth (with keys)
- Amazon Signature Version 4
The only benefit of digest over basic+tls is that the password is not transferred in plaintext but in an MD5 Hash.
But according to kbcert and wikipedia they say that MD5 must not be used (collision attacks).
My question is, If MD5 security is compromised (today and in the near future) 2. HTTP Digest + TLS is not a viable option to consume my own API and I only have the others "more" secure options (1, 3, 4)?
I know that HTTP Basic+TLS can have replay attacks.