Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating numbered headings

...

Warning

This document describes how to use TLS certificates in a way that is only suitable for an isolated test environment.

You must follow the recommendations of your Security Expert when configuring your production environment

...

TLS use cases

Your users will connect to the Abiquo UI over HTTPS with TLS.

...

For the distributed scalable server, we recommend that you configure the communications for the API to the remote services with TLS. This means that you can easily upload and download templates.

...

Abiquo UI certificates

The server OVA has a self-signed certificate called abiquo.crt that you can find in this folder /etc/pki/tls/certs.

...

Code Block
  SSLCertificateFile /etc/pki/tls/certs/abiquo.crt
  SSLCertificateKeyFile /etc/pki/tls/private/abiquo.key
</VirtualHost>

...

...

Remote services configuration

If you have remote RS servers (which means remote services in a different location) or to allow users to upload and download templates, or to improve security, configure the communications between the Abiquo Server and the Remote services servers using TLS.

...

1. Add Server certificates to the Java keystore on the Abiquo Server

For TLS for the Abiquo server, add the server certificate to the Java keystore with these steps.

...

You will also need to configure the Remote services server and perform additional configuration on the API server.

...

...

2. Add certificates to Remote services server

To add certificates to the Remote services server.

  1. Log in to the Remote services server

  2. Go to the /etc/pki/tls/ folder

  3. For a test environment, create a self-signed certificate for the Remote services server. You can follow the steps at https://devopscube.com/create-self-signed-certificates-openssl/ (there is even a shell script that you can modify and run to automatically create the certificate! (smile)). We recommend that you put the certificate in the certs folder and the key in the private folder

  4. Import the Remote services certificate into the default cacerts keystore

    Code Block
    keytool -import -trustcacerts -alias {$REMOTE_SERVICES_FQDN} -file /etc/pki/tls/certs/{$REMOTE_SERVICES_FQDN}.crt -cacerts
  5. Check that the Remote services and Abiquo server certificates are imported the Remote services server.

    Code Block
    [root@abicloud ~]# keytool -list -cacerts -alias {$FQDN}
    Enter keystore password:  
    remoters.example.com, Dec 12, 2019, trustedCertEntry,
    Certificate fingerprint (SHA1): AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA

    If the Abiquo server certificate (abiquo.crt) is not present, copy it over and import it with the value for the Abiquo server FQDN.

    Code Block
    keytool -import -trustcacerts -alias {$ABIQUO_FQDN} -file /etc/pki/tls/certs/abiquo.crt -cacerts

...

...

3. Add certificates to the Java keystore on the Remote services server

To add Remote services and Server certificates to the Java keystore on the Remote services server.

  1. Log in to the Remote services server

  2. Go to /etc/pki/tls/certs

  3. Convert the remote RS cert to PCKS12 format, using the domain name of your Remote services server.

    Code Block
    openssl pkcs12 -export -in {$REMOTE_SERVICES_FQDN}.crt -inkey {$REMOTE_SERVICES_FQDN}.key -name {$REMOTE_SERVICES_FQDN} -out import_cert_key_rs
  4. Go the /opt/abiquo/tomcat/conf folder

  5. Create a .jks keystore using the following command and replacing {$REMOTE_SERVICES} with the hostname of your Remote services server

    Code Block
    keytool -genkey -keyalg RSA -keystore {$REMOTE_SERVICES}.jks -keysize 2048
  6. Import the certificate into the RS keystore that Tomcat will use. Remember to use your password and keystore name. (warning) For a production environment, you must configure the keystore according to advice from your Security team

    Code Block
    keytool -importkeystore -deststorepass changeit -destkeystore remoters.jks -srckeystore import_cert_key -srcstoretype PKCS12

...

...

4. Add the Remote services certificate on the Abiquo server

  1. Log in to the Abiquo server

  2. Go to the /etc/pki/tls/ folder

  3. Copy the Remote services certificate from the Remote services server

  4. Import the Remote services certificate into the default cacerts keystore

    Code Block
    keytool -import -trustcacerts -alias {$REMOTE_SERVICES_FQDN} -file /etc/pki/tls/certs/{$RE

...

...

5. Add Remote services certificates to the Java keystore on the Abiquo server

To configure the Tomcat server on the Abiquo to use TLS you will also need to import the Remote services certificates.

  1. Log in to the Abiquo server

  2. Go to /etc/pki/tls/certs

  3. Copy the certificates from the Remote services server

  4. Convert the remote RS cert to PCKS12 format, using the domain name of your Remote services server.

    Code Block
    openssl pkcs12 -export -in {$REMOTE_SERVICES_FQDN}.crt -inkey {$REMOTE_SERVICES_FQDN}.key -name {$REMOTE_SERVICES_FQDN} -out import_cert_key_rs
  5. Go the /opt/abiquo/tomcat/conf folder

  6. Import the certificate into the RS keystore that Tomcat will use. Remember to use your password and keystore name. (warning) For a production environment, you must configure the keystore according to advice from your Security team

    Code Block
    keytool -importkeystore -deststorepass changeit -destkeystore {$REMOTE_SERVICES}.jks -srckeystore import_cert_key_rs

...

...

6. Change the Tomcat connector on the Remote services to use TLS

To change the Tomcat connector on the Remote services server to use TLS, do these steps.

  1. Log in to the Remote services server

  2. Edit the Tomcat server configuration file at:

    Code Block
    /opt/abiquo/tomcat/conf/server.xml
  3. Remove the Catalina Connector for port 8009

  4. Replace it with a new Connector like the following one.
    (warning) This example is a guide only, use the correct file for your version of Tomcat

    Code Block
    <Service name="Catalina">
    
            <Connector
               protocol="org.apache.coyote.http11.Http11NioProtocol"
               port="8009" maxThreads="200"
               scheme="https" secure="true" SSLEnabled="true"
               keystoreFile="/opt/abiquo/tomcat/conf/{$REMOTE_SERVICES}.jks" keystorePass="changeit" 
               keyAlias="{$REMOTE_SERVICES_FQDN}"
               clientAuth="false" secretrequired="false" 
               sslProtocol="TLS"/>

    The important values to change are:

    • keystoreFile - e.g. use the host name of your remote RS server

    • keystorePass - use a secure password

    • keyAlias - you must use the domain name of your remote RS server

    Also configure the other parameters according to your environment.

...

...

7. Apply and verify your configuration

Now that you have finished the configuration of your Remote services server

  1. Apply your changes by restarting the Tomcat server on all services.

    Code Block
    systemctld restart abiquo-tomcat.service
  2. If you are using a self-signed certificate in a test environment, accept the remote RS certificates with these steps.

    1. In your browser, open a connection to the remote RS server using the port. In our example, this would be: https://remoters.bcn.abiquo.com:8009/

    2. On the certificate warning, go to Advanced and accept the risk.

...

V2V server

Now, while it is fresh in your mind, repeat this configuration for your V2V server!

...