Skip to content

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Jan 17, 2024

fixes: #3192

In Web UI, when configuring minio setting only the MINIO_KMS_SECRET_KEY, the Encryption section tries to perform /metrics, /apis and /version API requests but since the static key has no version nor metrics nor list apis, they return 500 error.

This change disables the tabs and only makes the requests when MINIO_KMS_SECRET_KEY is not set.

If KMS Secret Key not set and using KES
Screenshot 2024-01-16 at 4 19 08 PM

If KMS Secret Key set:
Screenshot 2024-01-16 at 4 20 13 PM

Test Steps:

Using Console from branch in MinIO Build:

  1. Set KES like defined in docs
export MINIO_KMS_KES_ENDPOINT=https://play.min.io:7373    
export MINIO_KMS_KES_KEY_FILE=root.key
export MINIO_KMS_KES_CERT_FILE=root.cert
export MINIO_KMS_KES_KEY_NAME=my-minio-sse-kms-key
./minio server ~/Data
  1. Go to Monitoring/Encryption (Metrics and APIs should be enabled and corresponding APIs need to be requested)

//// Setting only MINIO_KMS_SECRET_KEY

  1. Set env like:
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw= ./minio server ~/Data
  1. Go to Monitoring/Encryption (Metrics and APIs should be disabled and no extra callas apart from kms/status should be done)

@cesnietor cesnietor force-pushed the disale-kms-endpoints-metrics branch from 060fd88 to 8804c75 Compare January 17, 2024 00:26
@cesnietor cesnietor force-pushed the disale-kms-endpoints-metrics branch from 8804c75 to f162287 Compare January 17, 2024 00:27
@cesnietor cesnietor changed the title Disale kms endpoints metrics Disable KMS Endpoints and Metrics Tabs if using KMS Secret Key Jan 17, 2024
@cesnietor cesnietor self-assigned this Jan 17, 2024
@cesnietor cesnietor merged commit 76c596c into minio:master Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server error when MINIO_KMS_SECRET_KEY set on Encryption page
4 participants