Replies: 5 comments 1 reply
-
Hey @shachakz thanks for your suggestion here! 🙌 @SpencerTorres Do you have any thoughts on this issue? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the contribution! Sounds like it could be useful as long as it is something that can be toggled on/off by the user. We do have a new version of the plugin that contains some changes involving headers in the clickhouse driver (#633) I would recommend developing with that branch in mind since there will likely be significant merge conflicts. Perhaps you could open a draft PR with your PoC and we can iterate from there? |
Beta Was this translation helpful? Give feedback.
-
Here is my ready for review PR - #670
|
Beta Was this translation helpful? Give feedback.
-
Hi @SpencerTorres , @adamyeats I saw that you merged http headers changes. I resolved all the conflicts and added the "forward grafana headers" option under the http configuration section and added some relevant tests. |
Beta Was this translation helpful? Give feedback.
-
Merged in #670, available in v4.0.3 Closing this, thanks for the contribution! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋
I'm currently working on a project that involves passing Grafana queries through an authorization proxy. This allows us to restrict the data accessible to each user. We've successfully implemented this with various data sources by enabling the global configuration flag dataproxy.send_user_header on, so the user id is attached as a header on every Grafana request.
Currently, the clickhouse-datasource plugin doesn't support this out of the box, and I would like to add this to support forwarding those headers.
I have an E2E working POC, which is implemented as such:
ForwardHeaders
(inDriverSettings
) configuration from sqlds if the flagforwardHeaders
istrue
(inDataSourceInstanceSettings
) inside the pluginSettings
functionsqlds.HeaderKey
and pass it toclickhouse.Options.HttpHeaders
ds.EnableMultipleConnections
totrue
if forward headers is on (otherwise the sqlds lib won't forward the headers)I'll support changing this config from the settings UI as well. (didn't get to it yet)
I would love to know what do you think about the feature and the suggested implementation.
If it's cool, I'll be glad to contribute this feature 💪
Beta Was this translation helpful? Give feedback.
All reactions