1
0
mirror of https://github.com/minio/docs.git synced 2025-05-28 00:41:14 +03:00
docs/source/includes/linux/steps-configure-minio-kes-hashicorp.rst
Ravind Kumar 20403a7464
DOCS-912: Part 1: Cleaning up Vault (#949)
Staged:
http://192.241.195.202:9000/staging/DOCS-912/linux/operations/server-side-encryption/configure-minio-kes-hashicorp.html

---------

Co-authored-by: Andrea Longo <feorlen@users.noreply.github.com>
Co-authored-by: Daryl White <53910321+djwfyi@users.noreply.github.com>
2023-08-11 17:08:36 -04:00

5.5 KiB

Procedure

This procedure provides instructions for configuring and enabling Server-Side Encryption using Hashicorp Vault in production environments. Specifically, this procedure assumes the following:

  • An existing production-grade Vault deployment
  • One or more hosts for deploying KES
  • One or more hosts for a new or existing MinIO deployment

1) Download KES and Create the Service File

  1. Download KES
  2. Create the Service File

2) Generate TLS Certificates for KES

Depending on your Vault configuration, you may also need to specify the CA used to sign the KES certificates to the Vault server. See the Hashicorp Vault Configuration Docs for more information. Defer to the client documentation for instructions on trusting a third-party CA.

3) Generate a KES API Key for use by MinIO

Starting with KES version 2023-02-15T14-54-37Z <kes/releases/tag/2023-02-15T14-54-37Z>, you can generate an API key to use for authenticating to the KES server.

Use the kes identity new <cli/kes-identity/new> command to generate a new API key for use by the MinIO Server:

kes identity new

The output includes both the API Key for use with MinIO and the Identity hash for use with the KES Policy configuration <tutorials/configuration/#policy-configuration>.

4) Create the KES and MinIO Configurations

Important

Starting with RELEASE.2023-02-17T17-52-43Z, MinIO requires expanded KES permissions for functionality. The example configuration in this section contains all required permissions.

  1. Create the KES Configuration File

    Create the configuration file using your preferred text editor. The following example uses nano:

    nano /opt/kes/config.yaml
    • Set MINIO_IDENTITY_HASH to the identity hash of the API Key generated in the previous step.

      The following command recomputes the necessary hash from the API key:

      kes identity of kes:v1:KEY/KEY
    • Replace the keystore.vault.endpoint with the hostname of the Vault server(s).

    • Replace keystore.vault.engine and keystore.vault.version with the path and version of the KV engine used for storing secrets.

    • Replace the VAULTAPPID and VAULTAPPSECRET with the appropriate Vault AppRole credentials <minio-sse-vault-prereq-vault>.

    • Modify the keystore.vault.tls.ca value to correspond to the path to the Vault CA (Certificate Authority) certificate used to sign the Vault TLS keys.

  2. 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:

    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.

5) Start KES and MinIO

You must start KES before starting MinIO. The MinIO deployment requires access to KES as part of its startup.

This step uses systemd for starting and managing both the KES and MinIO server processes:

  1. Start the KES Service on All Hosts
  2. Start the MinIO Server

5) Generate a New Encryption Key

6) Enable SSE-KMS for a Bucket