Network Encryption (TLS)
SSL is Deprecated
TLS is the successor to Secure Socket Layer (SSL) encryption. SSL is fully deprecated as of June 30th, 2018.
Overview
MinIO supports Transport Layer Security (TLS) 1.2+ encryption of incoming and outgoing traffic. MinIO can automatically detect certificates specified to either a default or custom search path and enable TLS for all connections. MinIO supports Server Name Indication (SNI) requests from clients, where MinIO attempts to locate the appropriate TLS certificate for the hostname specified by the client.
MinIO requires at minimum a single default TLS certificate and can support multiple TLS certificates in support of SNI connectivity. MinIO uses the TLS Subject Alternate Name (SAN) list to determine which certificate to return to the client. If MinIO cannot find a TLS certificate whose SAN covers the client-requested hostname, MinIO uses the default certificate and attempts to establish the handshake.
You can specify a single TLS certificate which covers all possible SANs for which the MinIO deployment accepts connections.
This configuration requires the least configuration, but necessarily exposes all hostnames configured in the TLS SAN to connecting clients. Depending on your TLS configuration, this may include internal or private SAN domains.
You can instead specify multiple TLS certificates separated by domain(s) with a single default certificate for any non-matching hostname requests. This configuration requires more configuration, but only exposes those hostnames configured in the returned TLS SAN array.
MinIO TLS on Kubernetes
The MinIO Kubernetes Operator provides three approaches for configuring TLS on MinIO Tenants:
Automatic TLS using Cluster Signing API
For Kubernetes clusters with a valid TLS Cluster Signing Certificate,the MinIO Kubernetes Operator can automatically generate TLS certificates while deploying or modifying a MinIO Tenant.
The Kubernetes TLS API uses the Kubernetes cluster Certificate Authority (CA) signature algorithm when generating new TLS certificates. See Supported TLS Cipher Suites for a complete list of MinIO’s supported TLS Cipher Suites and recommended signature algorithms.
Before using the CA bundle at
/var/run/secrets/kubernetes.io/serviceaccount/ca.crtto connect to a Tenant, verify that it contains the actual issuer of the Tenant TLS certificate; do not assume the issuers always match. If they differ, supply the correct CA certificate to clients separately, and ensure the certificate covers the Service DNS name used by the client.NoteSubject Alternative Name Certificates
If you have a custom Subject Alternative Name (SAN) certificate that is not also a wildcard cert, the TLS certificate SAN must apply to the hostname for its parent node. Without a wildcard, the SAN must match exactly to be able to connect to the tenant.
cert-manager Certificate Management
The MinIO Operator supports using cert-manager as a full replacement for its built-in automatic certificate management or user-driven manual certificate management. For instructions for deploying the MinIO Operator and tenants using cert-manager, refer to the cert-manager page.
Manual Certificate Management
The Tenant CRD field
spec.externalCertsSecretreferences the TLS certificate Secrets. Use the Secret type and certificate/key filenames required by your Operator version.You can specify multiple certificates to support Tenants which have multiple assigned hostnames.
Self-signed, Internal, Private Certificates, and Public CAs with Intermediate Certificates
If deploying MinIO Tenants with certificates minted by a non-global or non-public Certificate Authority, or if using a global CA that requires the use of intermediate certificates, you must provide those CAs to the Operator to ensure it can trust those certificates.
The Operator may log warnings related to TLS cert validation for Tenants deployed with untrusted certificates.
The following procedure attaches a secret containing the public.crt of the Certificate Authority to the MinIO Operator. You can specify multiple CAs in a single certificate, as long as you maintain the BEGIN and END delimiters as-is.
-
Create the
operator-ca-tlssecretThe following creates a Kubernetes secret in the MinIO Operator namespace (
minio-operator).The
public.crtfile must correspond to a valid TLS certificate containing one or more CA definitions. -
Restart the Operator
Once created, you must restart the Operator to load the new CAs:
Third-Party Certificate Authorities
The MinIO Kubernetes Operator can automatically attach third-party Certificate Authorities when deploying or modifying a MinIO Tenant.
You can add, update, or remove CAs from the tenant at any time. You must restart the MinIO Tenant for the changes to the configured CAs to apply.
The Operator places the specified CAs on each MinIO Server pod such that all pods have a consistent set of trusted CAs.
If the MinIO Server cannot match an incoming client’s TLS certificate issuer against any of the available CAs, the server rejects the connection as invalid.
MinIO TLS on Baremetal
The MinIO Server searches for TLS keys and certificates for each node and uses those credentials for enabling TLS. MinIO automatically enables TLS upon discovery and validation of certificates. The search location depends on your MinIO configuration:
By default, the MinIO server looks for the TLS keys and certificates for each node in the following directory:
Here ${HOME} is the home directory of the user running SILO. New installations use .silo/certs; the legacy .minio/certs is used only when .minio exists and .silo does not. If both exist, SILO selects .silo and logs a warning. Service accounts should set --certs-dir explicitly. See the certificate directory rules.
For systemd managed deployments this must correspond to the USER running the MinIO process. If that user has no home directory, use the Custom Path option instead.
You can specify a path for the MinIO server to search for certificates using the silo server --certs-dir or -S parameter.
For example, the following command fragment directs the MinIO process to use the /opt/minio/certs directory for TLS certificates.
The user running the MinIO service must have read and write permissions to this directory.
Place the TLS certificates for the default domain (e.g. minio.example.net) in the /certs directory, with the private key as private.key and public certificate as public.crt.
For distributed MinIO deployments, each node in the deployment must have matching TLS certificate configurations.
Self-signed, Internal, Private Certificates, and Public CAs with Intermediate Certificates
If using Certificates signed by a non-global or non-public Certificate Authority, or if using a global CA that requires the use of intermediate certificates, you must provide those CAs to the MinIO Server. If the MinIO server does not have the necessary CAs, it may return warnings or errors related to TLS validation when connecting to other services.
Place the CA certificates in the /certs/CAs folder. The root path for this folder depends on whether you use the default certificate path or a custom certificate path (silo server --certs-dir or -S)
The following example assumes the MinIO Server was started with --certs-dir /opt/minio/certs:
To trust a self-signed certificate, install its public X.509 certificate; for an internal CA, install the public CA certificate. Never place a signing private key in CAs or distribute it to clients.
For certificates signed by an internal, private, or other non-global Certificate Authority, use the same CA that signed the cert. A non-global CA must include the full chain of trust from the intermediate certificate to the root.
If the provided file is not an X.509 certificate, MinIO ignores it and may return errors for validating certificates signed by that CA.
Third-Party Certificate Authorities
SILO uses the host system’s trusted roots and the certificates in CAs to validate TLS server certificates presented by peer nodes and external services it connects to. Adding a CA certificate does not itself enable S3 client-certificate authentication.
Place the CA certificates in the /certs/CAs folder. The root path for this folder depends on whether you use the default certificate path or a custom certificate path (silo server --certs-dir or -S)
The following example assumes the MinIO Server was started with --certs-dir /opt/minio/certs:
Place the certificate file for each CA into the /CAs subdirectory. Ensure all hosts in the MinIO deployment have a consistent set of trusted CAs in that directory. If the MinIO Server cannot match an incoming client’s TLS certificate issuer against any of the available CAs, the server rejects the connection as invalid.
Supported TLS Cipher Suites
MinIO recommends generating ECDSA (e.g. NIST P-256 curve) or EdDSA (e.g. Curve25519) TLS private keys/certificates due to their lower computation requirements compared to RSA.
MinIO supports the following TLS 1.2 and 1.3 cipher suites as supported by Go. The lists mark recommended algorithms with a icon:
TLS_CHACHA20_POLY1305_SHA256TLS_AES_128_GCM_SHA256TLS_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384