Skip to content

Add ability to authenticate to grafana using AAD auth. #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KnicKnic
Copy link

@KnicKnic KnicKnic commented Jun 27, 2025

Addresses #192

  1. Adds USE_AAD_AUTH to use aad for grafana.
  2. Adds to GrafanaConfig a AAD default credential if USE_AAD_AUTH is set.
  3. Changed storage of GrafanaClient to a functor to allow computation of the grafana client
    1. This seemed like the cleanest way to update the code
    2. Updated GrafanaClient functor to allow returning errors and fixed up all call sites to deal with errors.
  4. updated the promClientFromContext to assume it is goign to a Azure Monitor workspace and login again with AAD auth
    1. I didn't add logic to cache this client as it isn't being cached today, but it is a potential source of improvement.

@KnicKnic KnicKnic requested a review from a team as a code owner June 27, 2025 07:23
@CLAassistant
Copy link

CLAassistant commented Jun 27, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants