Enable Network Encryption
MinIO AIStor implements Transport Layer Security (TLS) 1.2+ encryption with support for Server Name Indication (SNI) for selecting relevant TLS certificates in response to client requests.
You must set up TLS before you can enable data encryption, also called server-side encryption.
MinIO AIStor supports the following types of certificate signatures:
-
self-signed
-
internal or private certificate authorities (CAs)
-
third-party CAs
Multiple certificates are implemented with SNI to determine which certificate to return to a client based on the hostname in the request.
This procedure uses the MinIO certgen tool to generate self-signed certificates for local testing and development purposes.
Certificate path
MinIO AIStor searches by default for certificates at ~/.minio/certs.
When MinIO AIStor detects public.crt and private.key files in this directory, it automatically enables TLS.
If the private.key is password protected, set the MINIO_CERT_PASSWD environment variable so AIStor can decrypt it at startup, and ensure the encrypted key uses the PKCS-1 format.
See Encrypted private keys for the key conversion procedure.
If you work with a user-specified path, use the --certs-dir flag:
minio server --certs-dir /path/to/custom/certs /dataPrerequisites
- The certgen tool for generating self-signed certificates.
- Alternatively, TLS certificates from your organization’s certificate authority.
Procedure
This procedure assumes you have
- previously completed the Install MinIO AIStor procedure.
- have the necessary directories with full write access.
- have a valid MinIO AIStor License, such as the MinIO AIStor Free license.
1. Generate TLS certificates
Use certgen to generate self-signed TLS certificates for testing and development.
For production environments, use certificates issued by a trusted certificate authority.
Install certgen
Download the certgen binary for your Mac.
curl -L https://github.com/minio/certgen/releases/latest/download/certgen-darwin-arm64 -o certgen
chmod +x certgen
sudo mv certgen /usr/local/bin/curl -L https://github.com/minio/certgen/releases/latest/download/certgen-darwin-amd64 -o certgen
chmod +x certgen
sudo mv certgen /usr/local/bin/Generate certificates
Generate a certificate that includes the hostnames and IP addresses clients use to connect to MinIO AIStor.
mkdir -p ~/.minio/certs
cd ~/.minio/certs
certgen -host "127.0.0.1,localhost"This creates public.crt and private.key files in the ~/.minio/certs directory.
For additional hostnames or IP addresses, include them as a comma-separated list:
certgen -host "127.0.0.1,localhost,minio.example.com,192.168.1.100"2. Run MinIO AIStor with TLS
MinIO AIStor automatically enables TLS when it detects public.crt and private.key files in the ~/.minio/certs directory.
minio server /tmp/minio --license ~/minio/minio.licenseThe output indicates TLS is enabled when the URLs use https://:
MinIO Enterprise Object Store
API: https://192.168.86.35:9000 https://127.0.0.1:9000
RootUser: minioadmin
RootPass: minioadmin
WebUI: https://192.168.86.35:9001 https://127.0.0.1:9001
RootUser: minioadmin
RootPass: minioadmin3. Trust additional certificate authorities
If you need MinIO AIStor to trust certificates from additional certificate authorities, such as when connecting to MinIO KMS with self-signed certificates, place the CA certificates in the ~/.minio/certs/CAs directory.
mkdir -p ~/.minio/certs/CAs
cp /path/to/ca-certificate.crt ~/.minio/certs/CAs/4. Connect using HTTPS
When TLS is enabled, use https:// instead of http:// when connecting to MinIO AIStor.
Configure mc to trust the certificate
The mc client must trust the MinIO AIStor server’s certificate.
The self-signed certificate generated by certgen acts as both the certificate and Certificate Authority (CA).
Copy the certificate to the mc configuration directory:
mkdir -p ~/.mc/certs/CAs
cp ~/.minio/certs/public.crt ~/.mc/certs/CAs/Then create an alias using HTTPS:
mc alias set myaistor https://localhost:9000 minioadmin minioadminAlternatively, use the --insecure flag to skip certificate verification (not recommended for production):
mc alias set myaistor https://localhost:9000 minioadmin minioadmin --insecureAccess the Console
Open your browser to https://localhost:9001 to access the Console.
When using self-signed certificates, your browser displays a security warning. You can proceed by accepting the certificate or add it to your system’s trusted certificates.
Recommendations for generating certificates
The following table provides MinIO's recommendations for TLS certificates for MinIO AIStor:
| Recommendation | |
|---|---|
| TLS Version | 1.3 |
| TLS cipher suite | AES-128-GCM_SHA2-256 or CHACHA20-POLY1305_SHA2-256 |
| X.509 public key | ECDSA P-256 or Ed25519 |
| X.509 signature hash | SHA2-256 |
Supported TLS cipher suites
MinIO AIStor supports the following TLS 1.2 and 1.3 cipher suites. Recommended algorithms are marked with an asterisk (*):
TLS_CHACHA20_POLY1305_SHA256*TLS_AES_128_GCM_SHA256*TLS_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305*TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256*TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384*TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Setting the MINIO_API_SECURE_CIPHERS environment variable to off enables the following additional cipher suites for backward compatibility with older clients.
By default, MinIO AIStor uses only the secure cipher suites listed in the other tabs.
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHATLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHATLS_ECDHE_RSA_WITH_AES_256_CBC_SHATLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHATLS_RSA_WITH_AES_128_GCM_SHA256TLS_RSA_WITH_AES_256_GCM_SHA384TLS_RSA_WITH_AES_128_CBC_SHATLS_RSA_WITH_AES_256_CBC_SHA