Store HSM on MinIO KMS
MinIO KMS supports using an independent MinIO KMS deployment for storing the Hardware Security Module (HSM) key associated with a Root Encryption Key (REK).
The independent MinIO KMS stores the HSM such that a user with access to the cluster MinIO KMS has no immediate access to the plaintext key value. You can enable the external HSM MinIO KMS at any time after completing the initial installation.
Prerequisites
- The local or cluster MinIO KMS deployment for supporting AIStor Object Store Server Side Encryption
- The external MinIO KMS deployment for storing the HSM.
- MinKMS Operator chart 1.1.2 or later
- MinKMS chart 2.0.2 or later
See the installation instructions for further guidance on deploying MinIO KMS. For existing installations, see the upgrade instructions.
Procedure
-
Create an enclave and identity for cluster MinIO KMS
The cluster MinIO KMS requires an enclave and identity for storing and retrieving the HSM key on the external MinIO KMS.
Use the following commands to generate the necessary resources. Change
minkmsto reflect the name or label you want to associate with the cluster MinIO KMS. Modify the example values to reflect the hostnames, API keys, and resource names of your deployment and infrastructure.export MINIO_KMS_SERVER=https://hsm-cluster.example.net:7373 minkms add-enclave -k -a k1:`root` or superadmin_API_KEY minkms minkms add-identity -k -a k1:`root` or superadmin_API_KEY --enclave minkms --adminPrevious versions of MinIO KMS (prior to RELEASE.2025-11-12T19-14-51Z) require the
MINIO_LICENSEenvironment variable to be set before runningminkmscommands.For license configuration instructions for previous versions, see the Legacy License Installation Guide.
The command returns the API key and identity for use with the cluster MinIO KMS. Copy the
k1:prefixed value for use with the HSM storage configuration. -
Create an encryption key for use with seal/unseal operations
Use the
minkms add-keycommand to create a new encryption key for use by the cluster MinIO KMS:minkms add-key --enclave minkms minkms-hsmYou must specify the key name in the next step.
-
Modify the values file for the cluster MinIO KMS
Open the chart values file in your preferred text editor and add the
minkms.configuration.hsm.minio.minkmssection:# minkms-values.yaml # Other configuration settings above this line minkms: configuration: hsm: minio: minkms: server: - kms0.hsm-cluster.example.net:7373 - kms1.hsm-cluster.example.net:7373 - kms2.hsm-cluster.example.net:7373 enclave: minkms key: minkms-hsm auth: key: k1:`root` or superadmin_API_KEY -
(Optional) Disable the local HSM
You can disable the local HSM used to initialize the cluster MinIO KMS after configuring the external HSM. This prevents using that HSM or its associated Root Encryption Key (REK) for accessing the encryption key database.
To disable the local HSM, comment out or remove the
minkms.configuration.hsm.keyvalue from thevalues.yamlfile. -
Update the chart with the new
values.yaml:Use the
helm upgradecommand to upgrade the chart with the newvalues.yaml:helm upgrade minkms minio/minkms \ -n minkms \ -f minkms-values.yaml