I need to secure the communications between my frontend and backend. My frontend resides in a PHP server owned by DonDominio (web hosting) and my backend in an instance in AWS.

My public web domain is .app so I'm forced to use a certificate to secure the communications. That step is done by an SSL certificate provided by the hosting provider.

My problem begins with the communication to the backend. I managed to enable SSL configuration, and I used the same certificate (the previous one provided by my hosting). But it seems that the certificate referred to the common name of the frontend public hosted website mentioned before. Let's call it www.example.app. So no, that doesn't make it.

Amazon provides its own Certificate Manager but I'm not sure if it is the solution that fits me the most. They offer a private certificate authority (very expensive) and a public one that is like the certificate needed for hosted webs in AWS, which does not suit my case because I already have hosting. I use AWS instances as my logic processing units, therefore those instance addresses are public and exposed.

I tried to self-sign a certificate and install it in the backend but obviously every browser complains about it; so that's not a solution. So what I need to do to secure my backend communications out to internet.

Can I just simply create a CSR in the instance and use a CA to sign it, install in my spring boot instance and that's all?

I'm asking this because prices goes from 400$ each month in AWS private's solution and from 5$ or so a simple certificate with the CSR (Like I did for my public page www.example.app).

  • 3
    "I tried to self-sign a certificate and install it in the backend but obviously every browser complains about it, not a solution" - How access from a browser to the backend does even matter? You ask about protecting access between front-end and back-end, not between browser and back-end. The back-end should likely be accessed from the front-end only, so a self-signed certificate trusted by the front-end should be enough. Jun 18, 2021 at 19:48
  • Do you care if browsers complain when they connect to your backend?
    – schroeder
    Jun 19, 2021 at 15:37


You must log in to answer this question.

Browse other questions tagged .