-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 external credentials support #80
Feat: Add external credentials support #80
Conversation
kirillmakhonin-brt
commented
Jun 11, 2024
- Adds support for OAuth2 Client Credentials Grant - can be used to use external HTTP endpoint for pulling Databricks credentials (instead of using fixed PAT token).
Hello @mullerpeter, could you please review this Pull Request? |
Thanks for opening the PR, but I have a few questions.
|
Support for OAuth machine-to-machine (M2M) authentication is now added in v1.2.6 |
@mullerpeter unfortunately this (M2M) requires you to still have your databricks credentials (in this case client id and secret) stored in Grafana, so you still need to go through credentials rotation protocol in secured envinronments. |
2fc3233
to
7a2aef0
Compare
@mullerpeter updated, please review
This covers use cases when token provider is deployed on a side (e.g. in sidecar) and reads token from secure place (e.g. Hashicorp vault etc) where it is rotated on shedule
This is standard OAuth2 Client Credentials Grant
Oauth2 library automatically pulls new token
This is a special case where users levelrage any external OAuth2 compatible provider to store Databricks access tokens |
In general this PR looks good to me, I just think it needs a bit more documentation so that other people understand how to use this.
|
Another work around would be a sidecar to rotate the secret in grafana directly via update-an-existing-data-source API Endpoint, have you thought of that? |
Thank you!
I believe any OAuth2 provider should support this, e.g. keycloak, but problem is that Databricks token should be returned (which no one of public systems support afaik), so this is more a usage of open-source industry standard protocol for ability to extend authentication for Databricks
This is really well documented in RFC6749
I dont know such details
Yes, that's why we've tried to find some open source standard protocol which can be easily implemented for secret storage providers (as a proxy) |
Yes, we are considering this as a backup, but it requires Grafana specific solution (which we try to avoid) |
Ok thanks for your reply. Don't think this is a heavily requested feature for this plugin, especially since no other plugins seems to support this kind of auth flow. But as it's not introducing any downsides, I'm fine with merging it, I mean you need it apparently and maybe someone else will also make use of it. Thanks a lot for the contribution, will create a new release. |