I have been looking into REST authentication schemes (many discussed on SO), and many of them seem to be overly complex for my purposes. I have formulated a simpler scheme from elements of the more complex ones: but I would like to know if there are any security holes in my approach.
Influencing factors:
- TLS everywhere is too slow and resource heavy
- I do not require security against eavesdropping as all information is public.
Proposed authentication scheme:
- "Sign up" and "Login" are achieved via a TLS connection. On Login, a username and password are supplied and a shared secret key is returned by the server (and then stored in local storage by the client e.g. HTML5 local storage, App storage, etc).
- Every other request takes place over cleartext HTTP
Client side algorithm:
- Before sending, every request is "salted" with the shared secret key and an SHA hash is taken of the salted request.
- This hash is inserted into the request in a custom HTTP header.
- The salt is removed from the request.
- The request is sent with the custom header.
Server side algorithm:
- Server isolates and removes the custom Hash header from the request.
- Server salts the request string with the shared secret key.
- Server takes the hash of the salted request and compares it to the value of the custom hash header.
- If they are the same, we have identified which user sent the request and can proceed with authorisation etc based on this knowledge.
Are there any vulnerabilities in this scheme that I have overlooked?