Disable KMS Endpoints and Metrics Tabs if using KMS Secret Key #3193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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

If KMS Secret Key set:

Test Steps:
Using Console from branch in MinIO Build:
//// Setting only MINIO_KMS_SECRET_KEY