Search code examples
sslwakanda

Wakanda and SSL: Server Name and how to gracefully handle HTTP requests?


I am running Wakanda Enterprise Studio/Server v10, and the documentation for setting up SSL shows the use of the below command to generate the Private Key and Certificate Signing Request:

openssl req -new -nodes -newkey rsa:2048 -keyout myServer.key -out myServer.csr

The document says to use the name of my server for myServer- is that the Domain Name?

Secondly, I'd like to gracefully handle HTTP requests. Can you suggest a strategy for this? It'd be nice to handle any requests to http://example.com by redirecting them to https://example.com so the upgrade is transparent to our users.

I had the idea of using my request handler (which just is used to log IPs now), to redirect. I am not sure yet how I would code that but if that sounds like a good strategy then I will pursue that solution.


Solution

  • Further down in the documentation it says the files should be named cert.pem and key.pem

    If you want to use the SSL/TLS protocol in your Wakanda application, the following files must be installed:
    * key.pem: This file contains the private key.
    If necessary, rename your private key file name manually to "key.pem".
    * cert.pem: This file contains the certificate.
    It must be named "cert.pem" and be in PKCS format. If you get a file in a different format, you must convert it into .pem format (see above).


    You will need a CSR for either path, self signed or an official Certificate Authority.

    After issuing the openssl req -new -nodes -newkey rsa:2048 -keyout myServer.key -out myServer.csr command you will be presented numerous questions from OpenSSL that will be used for the CSR, one of those questions is the ServerName:

    enter image description here