3

I have a fixed number of web servers. Each web server represents a company and the users of the company talk to their assigned web server. I have this setup to decentralise the databases. So if one web server got hacked, the hacker only acquires a small amount of the total data. My clients are not willing to upload their information to one database on a single web server. The webservers run the django webframework for python. I am thinking of one-way SSL as the standard communication protocol between the users and the web servers. This seems to be the most logical choice as it provides a good way to identify the web servers of the companies for the users.

I also need to have communication between the web servers to exchange data. Here I am thinking of the Two-Way SSL protocol. I want to use the python 3 ssl module from one web server to communicate with django on another web server. The ssl module will provide a client certificate. Then django will act as server on the other web server and receive the client certificate. I want to use the following module for django to use the client certificate for authentication: https://github.com/kimvais/django-ssl-client-auth.

By this way I have a Two-Way SSL implementation which authenticates the web servers to each other.

I don't think VPN is a good solution because the web servers don't trust each other. That's why I don't want to go for OpenVPN or IPSec.

Is the Two-way SSL a good way or should I use something different like IPSec?

2
  • Why should TLS be any better than VPN if the webservers don't trust each other? From the security aspect, there is not much difference between a VPN connection with certificate authentication and two way TLS.
    – Josef
    Commented Jul 19, 2016 at 6:23
  • @Josef: VPN makes the foreign server part of your network. Any software on the foreign server can therefore connect to any service on your network, not just the public ones. Direct HTTP-HTTP connection only does service to service communications. You can of course architect your network to be isolated so the VPN is safe but direct server-to-server communications means you can rely on the regular web app firewall tactics
    – slebetman
    Commented Aug 18, 2016 at 10:00

1 Answer 1

1

This sounds like a good plan. Some things to consider are:

  1. Private keys need to be private. That likely means a secure store with some kind of password/key to unlock the store. Frequently OS or framework support is easiest. HSMs will be a more secure alternative but I'm guessing that they would be overkill in your situation.
  2. You need to provide authorization when one server is talking to another. Having a special user account for the remote servers frequently makes sense (and looks like what the library supports).
  3. Adding firewall or other authentication rules to restrict IPs for cross server communication can add security.

It sounds like you're on the right track.

1
  • Thank you for the answer. I do authorization between the servers with the two way SSL. The user is logged in with the library via the client certificate as you point out in 2. Should i provide alternative authorization with username and password for extra authentication? Commented May 24, 2015 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .