This is the multi-page printable view of this section. .
Data Encryption (SSE)
MinIO Server-Side Encryption (SSE) protects objects as part of write operations, allowing clients to take advantage of server processing power to secure objects at the storage layer (encryption-at-rest). SSE also provides key functionality to regulatory and compliance requirements around secure locking and erasure.
MinIO SSE uses the MinIO Key Encryption Service (KES) and an external Key Management Service (KMS) for performing secured cryptographic operations at scale. MinIO also supports client-managed key management, where the application takes full responsibility for creating and managing encryption keys for use with MinIO SSE.
MinIO supports the following KMS as the central key store:
- HashiCorp KeyVault
- AWS SecretsManager
- Google Cloud SecretManager
- Azure Key Vault
- Fortanix SDKMS
- Thales Digital Identity and Security (formerly Gemalto)
MinIO SSE requires enabling Network Encryption (TLS).
Supported Encryption Types
MinIO SSE is feature and API compatible with AWS Server-Side Encryption and supports the following encryption strategies:
MinIO supports enabling automatic SSE-KMS encryption of all objects written to a bucket using a specific External Key (EK) stored on the external KMS. Clients can override the bucket-default EK by specifying an explicit key as part of the write operation.
For buckets without automatic SSE-KMS encryption, clients can specify an EK as part of the write operation instead.
MinIO encrypts backend data as part of enabling server-side encryption. You cannot disable SSE-KMS encryption once enabled.
SSE-KMS provides more granular and customizable encryption compared to SSE-S3 and SSE-C and is recommended over the other supported encryption methods.
For a tutorial on enabling SSE-KMS in a local (non-production) MinIO Deployment, see Quickstart.
MinIO supports enabling automatic SSE-S3 encryption of all objects written to a bucket using an EK stored on the external KMS. MinIO SSE-S3 supports one EK for the entire deployment.
For buckets without automatic SSE-S3 encryption, clients can request SSE encryption as part of the write operation instead.
MinIO encrypts backend data as part of enabling server-side encryption. You cannot disable SSE-KMS encryption once enabled.
For a tutorial on enabling SSE-s3 in a local (non-production) MinIO Deployment, see Quickstart.
Clients specify an EK as part of the write operation for an object. MinIO uses the specified EK to perform SSE-S3.
SSE-C does not support bucket-default encryption settings and requires clients perform all key management operations.
1 - Server-Side Object Encryption with KES
Community KES and its documentation are deprecated and archived. The Kubernetes tab below also refers to the Operator Console, which was removed in MinIO Operator 6.0.0; it is retained only as a historical migration reference and is not a current v7.1.1 deployment procedure. For a new deployment, select a maintained KMS integration and validate a migration or replacement plan before enabling irreversible server-side encryption.
This procedure assumes you have access to a Kubernetes cluster with an active MinIO Operator installation. For instructions on running KES, see the KES docs.
As part of this procedure, you will:
- Create or modify a MinIO deployment with support for SSE using KES. Defer to the Deploy Distributed MinIO tutorial for guidance on production-ready MinIO deployments.
- Use the MinIO Operator Console to create or manage a MinIO Tenant.
- Access the Encryption settings for that tenant and configure SSE using a supported Key Management System.
- Create a new EK for use with SSE.
- Configure automatic bucket-default SSE-KMS.
This procedure provides guidance for deploying MinIO configured to use KES and enable Server Side Encryption. For instructions on running KES, see the KES docs.
As part of this procedure, you will:
- Create a new EK for use with SSE.
- Create or modify a MinIO deployment with support for SSE using KES. Defer to the Deploy Distributed MinIO tutorial for guidance on production-ready MinIO deployments.
- Configure automatic bucket-default SSE-KMS
Important
Enabling SSE on a MinIO deployment automatically encrypts the backend data for that deployment using the default encryption key.
MinIO requires access to KES and the external KMS to decrypt the backend and start normally. The KMS must maintain and provide access to the MINIO_KMS_KES_KEY_NAME. You cannot disable KES later or “undo” the SSE configuration at a later point.
Prerequisites
Access to MinIO Cluster
You must have access to the Kubernetes cluster, with administrative permissions associated to your kubectl configuration.
This procedure assumes your permission sets extends sufficiently to support deployment or modification of MinIO-associated resources on the Kubernetes cluster, including but not limited to pods, statefulsets, replicasets, deployments, and secrets.
This procedure uses mc for performing operations on the MinIO cluster. Install mc on a machine with network access to the cluster. See the mc Installation Quickstart for instructions on downloading and installing mc.
This procedure assumes a configured alias for the MinIO cluster.
Ensure KES Access to a Supported KMS Target
This procedure assumes an existing supported KMS installation accessible from the Kubernetes cluster.
- For deployments within the same Kubernetes cluster as the MinIO Tenant, you can use Kubernetes service names to allow the MinIO Tenant to establish connectivity to the target KMS service.
- For deployments external to the Kubernetes cluster, you must ensure the cluster supports routing communications between Kubernetes services and pods and the external network. This may require configuration or deployment of additional Kubernetes network components and/or enabling access to the public internet.
Defer to the documentation for your chosen KMS solution for guidance on deployment and configuration.
This procedure assumes an existing KES installation connected to a supported KMS installation accessible, both accessible from the local host. Refer to the installation instructions for your supported KMS target to deploy KES and connect it to a KMS solution.
KES Operations Require Unsealed Target
Some supported KMS targets allow you to seal or unseal the vault instance. KES returns an error if the configured KMS service is sealed.
If you restart or otherwise seal your vault instance, KES cannot perform any cryptographic operations against the vault. You must unseal the Vault to ensure normal operations.
See the documentation for your chosen KMS solution for more information on whether unsealing may be required.
Refer to the configuration instruction in the KES documentation for your chosen supported KMS:
- AWS Secrets Manager
- Azure KeyVault
- Entrust KeyControl
- Fortanix SDKMS
- Google Cloud Secret Manager
- HashiCorp Vault
- Thales CipherTrust Manager (formerly Gemalto KeySecure)
Procedure
This procedure provides instructions for configuring and enabling Server-Side Encryption using your selected supported KMS solution in production environments. Specifically, this procedure assumes the following:
- An existing production-grade KMS target
- One or more KES servers connected to the KMS target
- One or more hosts for a new or existing MinIO deployment
-
Review the Tenant CRD
Review the Tenant CRD
TenantSpec.kesobject, theTenantSpec.configurationobject, and the KES Configuration reference.You must prepare all necessary configurations associated to your external Key Management Service of choice before proceeding.
-
Create or Modify your Tenant YAML to set the values of
KesConfigas necessary:You must modify your Tenant YAML or
Kustomizetemplates to reflect the necessary KES configuration. The following example is taken from the pinned MinIO Operator v7.1.1 Kustomize examples.The
kes-configurationsecret must reference a Kubernetes Opaque Secret which contains astringDataobject with the full KES configuration asserver-config.yaml. Thekeystorefield must contain the full configuration associated with your preferred Key Management System.Reference the pinned
v7.1.1Kustomize example for additional guidance. -
Create or Modify your Tenant YAML to set the values of
TenantSpec.configurationas necessary.Create an Opaque Secret whose
config.envkey contains the environment variables required by the Tenant, then reference that Secret by name. Do not commit real root credentials to source control.Keep the Secret and Tenant in the same namespace. See the pinned
v7.1.1Tenant configuration example for the upstream object shape. -
Generate a New Encryption Key
NoteUnseal Vault Before Creating Key
If required by your chosen provider, you must unseal the backing vault instance before creating new encryption keys. See the documentation for your chosen KMS solution for more information.
MinIO requires that the EK for a given bucket or object exist on the root KMS before performing SSE operations using that key. You can use the
mc admin kms key createcommand against the MinIO Tenant.You must ensure your local host can access the MinIO Tenant pods and services before using
mcto manage the Tenant. For hosts internal to the Kubernetes cluster, you can use the service DNS name. For hosts external to the Kubernetes cluster, specify the hostname of the service exposed by Ingress, Load Balancer, or similar Kubernetes network control component.Run this command in a separate Terminal or Shell:
The following commands in a new Terminal or Shell window:
- Connect a local
mcclient to the Tenant. - Create the encryption key.
See Quickstart for instructions on installing
mcon your local host. - Connect a local
-
Enable SSE-KMS for a Bucket
You can use either the MinIO Tenant Console or the MinIO
mcCLI to enable bucket-default SSE-KMS with the generated key:Connect to the MinIO Tenant Console service and log in. For clients internal to the Kubernetes cluster, you can specify the service DNS name. For clients external to the Kubernetes cluster, specify the hostname of the service exposed by Ingress, Load Balancer, or similar Kubernetes network control component.
Once logged in, create a new Bucket and name it to your preference. Select the Gear icon to open the management view.
Select the pencil icon next to the Encryption field to open the modal for configuring a bucket default SSE scheme.
Select SSE-KMS, then enter the name of the key created in the previous step.
Once you save your changes, try to upload a file to the bucket. When viewing that file in the object browser, note that in the sidebar the metadata includes the SSE encryption scheme and information on the key used to encrypt that object. This indicates the successful encrypted state of the object.
Use the MinIO API Service to create a new alias for the MinIO deployment. You can then use the
mc encrypt setcommand to enable SSE-KMS encryption for a bucket:For clients external to the Kubernetes cluster, specify the hostname of the service exposed by Ingress, Load Balancer, or similar Kubernetes network control component.
Write a file to the bucket using
mc cpor any S3-compatible SDK with aPutObjectfunction. You can then runmc staton the file to confirm the associated encryption metadata.
-
Generate a KES API Key for use by MinIO
Use the kes identity new command to generate a new API key for use by the MinIO Server:
The output includes both the API Key for use with MinIO and the Identity hash for use with the KES Policy configuration.
-
Configure the MinIO Environment File
Create or modify the MinIO Server environment file for all hosts in the target deployment to include the following environment variables:
Add the following lines to the MinIO Environment file on each MinIO host. See the tutorials for Installation and Management, Installation and Management, or Installation and Management for more detailed descriptions of a base MinIO environment file.
Replace
HOSTNAMEwith the IP address or hostname of the KES server. If the MinIO server host machines cannot resolve or reach the specifiedHOSTNAME, the deployment may return errors or fail to start.- If using a single KES server host, specify the IP or hostname of that host
- If using multiple KES server hosts, specify a comma-separated list of IPs or hostnames of each host
MinIO uses the
MINIO_KMS_KES_KEY_NAMEkey for the following cryptographic operations:- Encrypting the MinIO backend (IAM, configuration, etc.)
- Encrypting objects using SSE-KMS if the request does not include a specific EK.
- Encrypting objects using SSE-S3.
MinIO defaults to expecting this file at
/etc/default/minio. If you modified your deployment to use a different location for the environment file, modify the file at that location. -
Start MinIO
NoteKES Operations Requires Unsealed Vault
Depending on your selected KMS solution, you may need to unseal the key instance to allow normal cryptographic operations, including key creation or retrieval. KES requires an unsealed key target to perform its operations.
Refer to the documentation for your chosen KMS solution for information regarding whether sealing and unsealing the instance is required for operations.
You must start KES before starting MinIO. The MinIO deployment requires access to KES as part of its startup.
You can use the
mc admin service restartcommand to restart MinIO: -
Generate a New Encryption Key
MinIO requires that the EK exist on the KMS before performing SSE operations using that key. Use
kes key createormc admin kms key createto add a new EK for use with SSE.The following command uses the
mc admin kms key createcommand to add a new External Key (EK) stored on the KMS server for use with encrypting the MinIO backend. -
Enable SSE-KMS for a Bucket
Use the MinIO
mcCLI to enable bucket-default SSE-KMS with the generated key:The following commands:
- Create a new alias for the MinIO deployment
- Create a new bucket for storing encrypted data
- Enable SSE-KMS encryption on that bucket
Write a file to the bucket using
mc cpor any S3-compatible SDK with aPutObjectfunction. You can then runmc staton the file to confirm the associated encryption metadata.