Import SSL certificates in Themis

The import of certificate in the JVM of Themis takes place at the start of the application. To do this, place all your certificates in the directory of the host machine, that we will appoint "certs".

Then, edit the docker-compose.yml configuration file. In the section matching the Themis service, update the "volumes" sections:

  themis:
    image: themis-registry.promyze.com/themis
    container_name: themis-container
    environment:
      - THEMIS_URL=http://localhost:3001 #REPLACE WITH THE FULL URL OF THEMIS
      - WEB_SOCKET_PORT=3000 #REPLACE BY THE PORT USED BY THE SOCKET EXPOSED BY DOCKER
      - SERVER_HOST=localhost #REPLACE BY THE URL OF THE MACHINE
      - SERVER_PORT=3001 #REPLACE BY THE PORT USED BY THEMIS EXPOSED BY DOCKER 
    depends_on:
      - mongodb
    ports:
      - 3000:3000 # Replace the left part by the port of your choice
      - 3001:3001 # Replace the left part by the port of your choice
    volumes_from:
      - dataonly
    volumes:
      - ./certs:/data/certs

by replacing "./certs" by the full path of a directory containing the different certificates. If the directory is at the same level as the docker-compose.yml file, you may simply update the "certs" value by name of the depository.

If you have already performed Themis, it will be necessary to recreate the container thank to the order:

docker-compose up -d

Due to that, wait a few seconds and observe the result of the import of the certificates like this:

$> cat log/certificates.log
--------------------------------------------
Remove previous certificate your_certificate.com
✔ /data/certs/your_certificate.com imported successfully
--------------------------------------------
Remove previous certificate your_certificate_bis.net
✔ /data/certs/your_certificate_bis.net imported successfully
--------------------------------------------
2 certificates found - 2 imported
--------------------------------------------

It is in that file that will go up the potential errors of import of certificates.

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.