console icon indicating copy to clipboard operation
console copied to clipboard

Issue with Authentication when Accessing Prometheus

Open viniciusbressaneli opened this issue 2 years ago • 3 comments

Description

There seems to be an issue with authentication when the MinIO Console attempts to access Prometheus. The MinIO documentation here recommends the creation of a basic token, referencing the Prometheus documentation here. However, upon inspecting the code here, it appears that the MinIO Console utilizes the method { "Authorization" : "Bearer <token>"}.

Problem Statement

The discrepancy arises as the MinIO Console documentation recommends a Basic token, while the code implementation suggests the use of a Bearer token. This inconsistency prompts the following questions:

  1. Should the MinIO Console code be updated to utilize { "Authorization" : "Basic <token>"} to align with the recommended method in the documentation?
  2. Alternatively, should users configure their Prometheus instance for JWT authentication to accommodate the existing MinIO Console authentication method?

Steps to Reproduce

  1. Set up a MinIO instance with the MinIO Console.
  2. Configure the MinIO instance to access Prometheus using the provided environment variable MINIO_PROMETHEUS_AUTH_TOKEN.
  3. Observe the attempt to access Prometheus using the specified authentication method.

Expected Behavior

The MinIO Console should be able to access Prometheus using the appropriate authentication method as per the documentation.

Actual Behavior

Authentication issues arise due to discrepancies between the recommended authentication method in the MinIO Console documentation and the implemented method in the codebase. Message "Prometheus URL is unreachable" o console.

Proposed Solution

Please advise on the recommended approach to resolve this authentication issue, whether it involves modifying the MinIO Console's codebase to utilize Basic authentication or configuring Prometheus for JWT authentication.

Thank you for your attention to this matter.

Best regards,

viniciusbressaneli avatar Feb 26 '24 14:02 viniciusbressaneli

Hi @viniciusbressaneli this is not a priority for us right now. But we welcome PRs and we can help testing. Thanks.

cesnietor avatar Feb 26 '24 17:02 cesnietor

Hi @cesnietor

Thank you for your response and clarification. I understand the current priorities. I'll be happy to contribute by working on a PR. I'll keep you updated on the progress and would appreciate any assistance with testing once the PR is ready.

viniciusbressaneli avatar Feb 27 '24 14:02 viniciusbressaneli

for now, as a workaround, it is possible to add username and password in the prometheus url

for example, MINIO_PROMETHEUS_URL: http://username:password@localhost:9090

HellLord77 avatar May 12 '24 19:05 HellLord77

Sorry, we're discontinuing Prometheus support in MinIO Console

bayasdev avatar Aug 19 '24 16:08 bayasdev