Lurker News

Comments (249) 36 threads

Show all comments

Showing thread 33 of 36

sidhuko1 reply#
For users or applications within your own network?
somtum2 replies#
What would you recommend for both?
mcjiggerlog#
Within your own network a simple key/secret combination is enough, as the secret can just be stored as an environment variable, for example.

For users you'd need some way for the users to "fetch the secret", which is effectively what logging in is. At that point you should just use JWT or oAuth.

sidhuko#
For applications using a HMAC token with some sort of timestamp which can be checked for replay attacks. AWS has a good guide: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthenti....

For users, I'd add a OAuth layer to the application layer and still have this application using a HMAC like above. You want to try keep things 'stateless' when it comes to your API's.