web analytics

How to implement SSL on Resin 4.0.8

Pre-installation notes
The guide bellow is based on the previous guide Hardening guide for Resin Professional 4.0.8 on RHEL 5.4

  1. Login to the server using Root account.
  2. Change permissions on the keys folder:
    chmod 640 /usr/local/resin/keys
  3. Run the command bellow to generate a key pair:
    /usr/bin/openssl genrsa -des3 -out /usr/local/resin/keys/server.key 1024Specify a complex pass phrase for the private key (and document it)
  4. Run the command bellow to generate the CSR:
    /usr/bin/openssl req -new -newkey rsa:1024 -nodes -keyout /usr/local/resin/keys/server.key -out /tmp/resin.csrNote: The command above should be written as one line.
  5. Send the file /tmp/resin.csr to a Certificate Authority server.
  6. As soon as you receive the signed public key from the CA server via email, copy all lines starting with “Begin” and ending with “End” (include those two lines), into notepad, and save the file as “server.crt
  7. Copy the file “server.crt” using SCP into /usr/local/resin/keys/
  8. Follow the link on the email from the CA server, to create the Root CA chain, and save it as “ca-bundle.crt” (Note: The file must be PEM (base64) encoded).
  9. Copy the file “ca-bundle.crt” using SCP into /usr/local/resin/keys/
  10. Edit using VI, the file /usr/local/resin/conf/resin.xml and replace the section bellow from:
    <!-- SSL port configuration: -->
    <http address="*" port="8443">
    <jsse-ssl self-signed-certificate-name="resin@localhost"/>
    </http>
    To:
    <http address="Server_DNS_Name" port="443">
    <openssl>
    <certificate-key-file>/usr/local/resin/keys/server.key</certificate-key-file>
    <certificate-file>/usr/local/resin/keys/server.crt</certificate-file>
    <certificate-chain-file>/usr/local/resin/keys/ca-bundle.crt</certificate-chain-file>
    <password>my-password</password>
    </openssl>
    </http>
    Note: Replace “my-password” with the password for the “server.key” file.
  11. Restart the Resin services:
    /etc/init.d/resin restart
  12. Backup the file
    /usr/local/resin/keys/server.key

One Response to “How to implement SSL on Resin 4.0.8”

Leave a Reply