3 ms·
Maybe I am misunderstanding, but how is it possible to encrypt the access token? Doesn't the server need it in plaintext to make requests?
by shawnz 13y ago
Maybe I am misunderstanding, but how is it possible to encrypt the access token? Doesn't the server need it in plaintext to make requests?
- mpeg 13y agoIf the web server is making API calls, encryption could still protect you from some SQL injection attacks, even if the decryption key for all tokens was in the web app code. With a system of this scale, the web server will probably be making no API calls, as everything might be sent via some distributed system. There are, anyway, many solutions to store the keys, a key vault that is separate from both database and application/web servers would be ideal. There's not much to do if an attacker gains control of every machine, so the general idea is to keep every attack vector as isolated as possible.
- deleted 13y ago[deleted]
- ArturoVM 13y agoRemember encryption is not the same as hashing :) With encryption you can reverse the process, as long as you have the encryption key(s). With hashing, you can't.
- shawnz 13y agoI realize, but whatever server is making the API calls needs unrestricted access to the key and the encrypted tokens. So if server is compromised, the access tokens are necessarily compromised too, aren't they?