Tuesday, 25 April 2017

node.js as front end authentication for cloudfront + s3

I'm a fan of using cloudfront + s3 to serve static sites. I have a use case where I need to run a site in s3, but I need authentication. I'd like to be able to handle this in a serverless way, but I need some sort of application to handle the auth logic.

My idea is that I could run a node.js application on something like elastic beanstalk in front of cloudfront to handle authentication.

Basically a user makes a request to the application, my app authenticates the user with our authentication backend, creates a cookie returns it and then servers the private cloudfront url for the requested resource. Am I on the right track here?

The idea is to basically have a gated s3 website that a user can browser after authenticating.



via yossarian2004

No comments:

Post a Comment