Question

Supposed I have a scenario with a web browser and two servers: The first server (web) is internet-facing, the second (worker) is an internal one. Internally web uses worker, but every request from the outside is received by web.

So you always have:

browser -> web -> worker

Now I want to secure both connections using SSL:

  • web shall use a server-side certificate the browser can validate.
  • worker shall use a server-side certificate web can validate.
  • web shall use a client-side (!) certificate worker can validate.

In this scenario: Is it okay to re-use the server-side certificate of web as client-side certificate for worker, or is it better to use two individual certificates?

Are there any best practices I should watch out for?

Was it helpful?

Solution

There are two aspects here: security aspect and "technical" aspect.

Technical aspect is that the certificate KeyUsage and ExtKeyUsage extensions of the certificate are different for server-side and client-side certificate. Worker will inspect the value of those extensions and complain. This will happen unless you implement custom validator on the worker (in which case any certificate you want will work).

Security aspect is that if the private key leaks for whatever reason, having different certificates (and so private keys) increases security to certain extent.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top