How to have SSL on Amazon Elastic Load Balancer with a Gunicorn EC2 server?
Posted
by
Riegie Godwin
on Server Fault
See other posts from Server Fault
or by Riegie Godwin
Published on 2013-10-22T21:18:49Z
Indexed on
2013/10/22
21:55 UTC
Read the original article
Hit count: 358
I'm a self taught back end engineer so I'm learning all of this stuff as I go along. For the longest time, I've been using basic authentication for my users.
Many developers are advising against this approach since each request will contain the username & password in clear text. Anyone with the right skills can sniff on the connection between my iOS application and my Django/Gunicorn Server and obtain their password.
I wouldn't want to put my user's credentials at risk so I would like to implement a more secure way of authentication.
SSL seems to be the most viable option. My server doesn't serve any static content or anything crazy of that sort. All the server does is send and receive "json" responses from and to my iOS application. Here is my current topology.
iOS application ------> Amazon Elastic Load Balancer -------> EC2 Instances running HTTP Gunicorn.
Gunicorn runs on port 8000. I have a CNAME record from GoDaddy for the Amazon Elastic Load Balancer DNS.
So instead of using the long DNS to make requests, I just use server.example.com.
To interact with my servers I send and receive requests to server.example.com:8000/
This setup works and has been solid. However I need to have a more secure way. I would like to setup SSL between my iOS application and my Elastic Load Balancer. How can I go about doing this?
Since I am only sending json responses to my application, do I really need to buy a certificate from a CA or can I create my own? (since browsers will not be interacting with my servers. My servers are only designed to send json responses to my iOS application).
© Server Fault or respective owner