Skip to content
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

feat: add middleware to accept auth in http transport #25

Closed

Conversation

sd2k
Copy link
Collaborator

@sd2k sd2k commented Feb 14, 2025

This commit adds an ASGI middleware which extracts Grafana URL and auth headers from the incoming request to the MCP server:

  • X-Grafana-Url
  • X-Grafana-Api-Key
  • X-Access-Token
  • X-Grafana-Id

and updates the current task's Grafana settings & client to use the appropriate authorization scheme depending on the headers present.

It's the equivalent of #21 but for the simpler HTTP transport.

sd2k added 4 commits February 14, 2025 11:15
This commit adds an ASGI middleware which extracts auth headers from
the incoming request to the MCP server:

- X-Grafana-Api-Key
- X-Access-Token
- X-Grafana-Id

and uses the appropriate authorization scheme depending on the headers
present.
@sd2k sd2k closed this Mar 12, 2025
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.

1 participant