SSL/TLS configuration
We recommend using public TLS certificates wherever possible. Private certificates are supported, but require additional configuration during Tower installation and Nextflow execution.
Configure Nextflow Tower to trust your private certificate
If you secure related infrastructure (such as private git repositories) with certificates issued by a private Certificate Authority, these certificates must be loaded into the Tower Enterprise containers. You can achieve this in several ways.
??? example "Options" 1. This guide assumes you are using the original containers supplied by Seqera. 2. Replace TARGET_HOSTNAME
, TARGET_ALIAS
, and PRIVATE_CERT.pem
with your unique values. 3. Previous instructions advised using openssl
. As of April 2023, the native keytool
utility is preferred as it simplifies steps and better accommodates private CA certificates.
=== "Use Docker volume"
-
Retrieve the private certificate on your Tower container host.
keytool -printcert -rfc -sslserver TARGET_HOSTNAME:443 > /PRIVATE_CERT.pem
-
Modify the
backend
andcron
container configuration blocks in docker-compose.yml.CONTAINER_NAME:
# -- Other keys here like `image` and `networks`--
# Add a new mount for the downloaded certificate.
volumes:
- type: bind
source: /PRIVATE_CERT.pem
target: /etc/pki/ca-trust/source/anchors/PRIVATE_CERT.pem
# Add a new keytool import line PRIOR to 'update-ca-trust' for the certificate.
command: >
sh -c "keytool -import -trustcacerts -storepass changeit -noprompt -alias TARGET_ALIAS -file /etc/pki/ca-trust/source/anchor/TARGET_HOSTNAME.pem &&
update-ca-trust &&
/wait-for-it.sh db:3306 -t 60 &&
/tower.sh"
=== "Use K8s ConfigMap"
-
Retrieve the private certificate on a machine with CLI access to your Kubernetes cluster.
keytool -printcert -rfc -sslserver TARGET_HOSTNAME:443 > /PRIVATE_CERT.pem
-
Load the certificate as a ConfigMap in the same namespace where your Tower instance will run.
kubectl create configmap private-cert-pemstore --from-file=/PRIVATE_CERT.pem
-
Modify both the
backend
andcron
Deployment objects:-
Define a new volume based on the certificate ConfigMap.
spec:
template:
spec:
volumes:
- name: private-cert-pemstore
configMap:
name: private-cert-pemstore -
Add a volumeMount entry into the container definition.
spec:
template:
spec:
containers:
- name: CONTAINER_NAME
volumeMounts:
- name: private-cert-pemstore
mountPath: /etc/pki/ca-trust/source/anchors/PRIVATE_CERT.pem
subPath: PRIVATE_CERT.pem -
Modify the container start command to load the certificate prior to running Tower.
spec:
template:
spec:
containers:
- name: CONTAINER_NAME
command: ["/bin/sh"]
args:
- -c
- |
keytool -import -trustcacerts -cacerts -storepass changeit -noprompt -alias TARGET_ALIAS -file /PRIVATE_CERT.pem;
./tower.sh
-
=== "Download on Pod start"
-
Modify both the
backend
andcron
Deployment objects to retrieve and load the certificate prior to running Tower.spec:
template:
spec:
containers:
- name: CONTAINER_NAME
command: ["/bin/sh"]
args:
- -c
- |
keytool -printcert -rfc -sslserver TARGET_HOST:443 > /PRIVATE_CERT.pem;
keytool -import -trustcacerts -cacerts -storepass changeit -noprompt -alias TARGET_ALIAS -file /PRIVATE_CERT.pem;
./tower.sh