Accumulo, through Thrift’s TSSLTransport, provides the ability to encrypt wire communication between Accumulo servers and clients using secure sockets layer (SSL). SSL certificates signed by the same certificate authority control the “circle of trust” in which a secure connection can be established. Typically, each host running Accumulo processes would be given a certificate which identifies itself.

Clients can optionally also be given a certificate, when client-auth is enabled, which prevents unwanted clients from accessing the system. The SSL integration presently provides no authentication support within Accumulo (an Accumulo username and password are still required) and is only used to establish a means for secure communication.

Server configuration

As previously mentioned, the circle of trust is established by the certificate authority which created the certificates in use. Because of the tight coupling of certificate generation with an organization’s policies, Accumulo does not provide a method in which to automatically create the necessary SSL components.

Administrators without existing infrastructure built on SSL are encourage to use OpenSSL and the keytool command. An example of these commands are included in a section below. Accumulo servers require a certificate and keystore, in the form of Java KeyStores, to enable SSL. The following configuration assumes these files already exist.

In accumulo.properties, the following properties are required:

Optionally, SSL client-authentication (two-way SSL) can also be enabled by setting instance.rpc.ssl.clientAuth true in accumulo.properties. This requires that each client has access to a valid certificate to set up a secure connection to the servers. By default, Accumulo uses one-way SSL which does not require clients to have their own certificate.

Client configuration

To establish a connection to Accumulo servers, each client must also have special configuration. This is typically accomplished by creating an Accumulo client using accumulo-client.properties and setting the following the properties to connect to an Accumulo instance using SSL:

If two-way SSL is enabled for the Accumulo instance (by setting instance.rpc.ssl.clientAuth to true in accumulo.properties), Accumulo clients must also define their own certificate by setting the following properties:

Generating SSL material using OpenSSL

The following is included as an example for generating your own SSL material (certificate authority and server/client certificates) using OpenSSL and Java’s KeyTool command.

  1. # Create a private key
  2. openssl genrsa -des3 -out root.key 4096
  3. # Create a certificate request using the private key
  4. openssl req -x509 -new -key root.key -days 365 -out root.pem
  5. # Generate a Base64-encoded version of the PEM just created
  6. openssl x509 -outform der -in root.pem -out root.der
  7. # Import the key into a Java KeyStore
  8. keytool -import -alias root-key -keystore truststore.jks -file root.der
  9. # Remove the DER formatted key file (as we don't need it anymore)
  10. rm root.der

The truststore.jks file is the Java keystore which contains the certificate authority’s public key.

Generate a certificate/keystore per host

It’s common that each host in the instance is issued its own certificate (notably to ensure that revocation procedures can be easily followed). The following steps can be taken for each host.

  1. # Create the private key for our server
  2. openssl genrsa -out server.key 4096
  3. # Generate a certificate signing request (CSR) with our private key
  4. openssl req -new -key server.key -out server.csr
  5. # Use the CSR and the CA to create a certificate for the server (a reply to the CSR)
  6. openssl x509 -req -in server.csr -CA root.pem -CAkey root.key -CAcreateserial \
  7. -out server.crt -days 365
  8. # Use the certificate and the private key for our server to create PKCS12 file
  9. openssl pkcs12 -export -in server.crt -inkey server.key -certfile server.crt \
  10. -name 'server-key' -out server.p12
  11. # Create a Java KeyStore for the server using the PKCS12 file (private key)
  12. keytool -importkeystore -srckeystore server.p12 -srcstoretype pkcs12 -destkeystore \
  13. server.jks -deststoretype JKS
  14. # Remove the PKCS12 file as we don't need it
  15. rm server.p12
  16. # Import the CA-signed certificate to the keystore
  17. keytool -import -trustcacerts -alias server-crt -file server.crt -keystore server.jks

The server.jks file is the Java keystore containing the certificate for a given host. The above methods are equivalent whether the certificate is generated for an Accumulo server or a client.