Configure a secure connection

Configure a secure connection (using a protocol such as TLS) on the Codar node for communication from the load balancer node and between each node in the Codar cluster.

Note Codar recommends secure connections using the TLSv1.2 protocol. If you are integrating with an application and are using secure connections, you must configure the application to use the TLSv1.2 protocol with Codar.

You can also set up connections using TLSv1.1 or TLSv1.0 by manually changing the Codar configurations. However, it is not recommended for security reasons.

  1. To configure a secure connection between Codar and the load balancer node:

    1. If you have not already done so, copy the certificate from the load balancer node (load_balancer.crt) to the <codar_home>/jboss-as/standalone/configuration directory.
    2. Import the certificate into the JVM on the Codar node using the following command:

      For Linux:

      <codar_jre_home>/bin/keytool -importcert -file <codar_home>/jboss-as/
      standalone/configuration/load_balancer.crt -alias load_balancer_codar
      -keystore <codar_jre_home>/lib/security/cacerts

      For Windows:

      <codar_jre_home>\bin\keytool -importcert -file <codar_home>\jboss-as\
      standalone\configuration\load_balancer.crt -alias load_balancer_codar
      -keystore <codar_jre_home>\lib\security\cacerts
  2. Copy and import the certificate of each Codar node to every other Codar node in the cluster:

    1. Copy the certificate of each Codar node to every other Codar node in the cluster. The certificate file on each Codar node is <codar_home>\jbossas\standalone\configuration\jboss.crt (in Microsoft Windows) or <codar_home>/jbossas/standalone/configuration/jboss.crt (in Linux).

      For example, copy the certificates from codar_node2 and codar_node3 to codar_node1 to the directory C:\Codar-Certificates. Rename the certificate files with unique names, such as jboss-codar_node2.crt and jboss-codar_node3.crt.

    2. Import each certificate into the JVM of that Codar node. For example, on codar_node1, run the following commands:

      For Linux:

      <codar_jre_home>/bin/keytool -importcert -file /tmp/Codar-Certificates/jboss-codar_ node2.crt -alias codar_node2 -keystore <codar_jre_home>/lib/security/cacerts

      <codar_jre_home>/bin/keytool -importcert -file /tmp/Codar-Certificates/jboss-codar_ node3.crt -alias codar_node3 -keystore <codar_jre_home>/lib/security/cacerts

      For Windows:

      "<codar_jre>\bin\keytool" -importcert -file C:\Codar-Certificates\jboss-codar_ node2.crt -alias codar_node2 -keystore "<codar_jre>\lib\security\cacerts"

      "<codar_jre>\bin\keytool" -importcert -file C:\Codar-Certificates\jboss-codar_ node3.crt -alias codar_node3 -keystore "<codar_jre>\lib\security\cacerts"