Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Modern browsers like "chrome" require you to have more secure certificates with 3072 bits / sha256 and higher encryption. In order for HAproxy to support multiple storage domains we need to enable additional extensions and include subject alternate names to the certificate.

These steps are meant to be used on CentOS 6/7 OS


Instructions

Please follow these steps exactly:

  1. First we need to edit /etc/pki/tls/openssl.cnf
    1. in the section "[ req ]" add or uncomment  req_extensions = v3_req
    2. add the following just underneath

      ```
      [ v3_req ]
      subjectAltName = @alt_names

      [ alt_names ]
      DNS.1 = example.demo.sales.local
      DNS.2 = master.acme.org
      ```

    3. Note: You can add as many alternative names as you wish to the alt_names section.
    4. You may optionally also wish to fill in countryName_default , localityName_default etc.. if you want to see sensible defaults.
  2. Generate a private key: openssl genrsa -des3 -out YOURDOMAIN.key 3072
  3. Generate a CSR key with the newly created private key: openssl req -new -key YOURDOMAIN.key -out YOURDOMAIN.csr -config /etc/pki/tls/openssl.cnf -sha256 -newkey rsa:3072
  4. Generate the final certificate: openssl x509 -req -sha256 -days 3650 -in YOURDOMAIN.csr -signkey YOURDOMAIN.key -out YOURDOMAIN.crt -extensions v3_req -extfile /etc/pki/tls/openssl.cnf
  5. Combine YOURDOMAIN.key and YOURDOMAIN.crt into a single YOURDOMAIN.pem file and configure haproxy to use it.
  6. Now you can restart HAproxy service.
  7. From a Windows Client/Server, connect with Chrome , at first it will say its an untrusted certificate, download it locally and install it by double-clicking on it.
  8. Restart the browser and navigate to the secure URI, you should now see the browser accept the certificate.




  • No labels