-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Ability to require tenant in queries #3822
Comments
One other thing to consider is to have a special configurable |
That's actually really interesting, I had not thought about that! That way we wouldn't even have to parse the PromQL query but just do it at selection time. That indeed makes it much more efficient. I love it! More secure and more efficient! :D |
I think it is much easier to use a proxy for authentication that adds a http header than that alters a promql query to add a label. |
Yep that's the idea of the first class feature! :) |
So essentially this proposes embedding prom-label-proxy. 🤔 So I don't think it's needed technically, it works just fine outside. However, agree that there is this perception and configuration complexity that makes people think Thanos is not multi-tenant. I think I would be fine to consider this. I like the HTTP parameter idea more than fuzzy header. Parameter feels more "typed". I would only suggest looking on other aspects too: Injecting tenant isolation is one thing, but we also need other things like instrumentation (metrics, logs, traces) and limits per tenant, which might be orthogonal to what data tenant is asking for and have access to 🤔 I would vote on defining some strategy for those things. cc @prmsrswt who is working on cross tenant views for prom-label proxy nowadays. |
I think that it is the opposite of the original request, which is about requiring a http header. It would then work with any proxy, and not prom-label-proxy. |
As @kakkoyun mentioned, with a tighter integration we could actually push it further down into the store API request and ensure it there, without even having to parse the query. |
Thoughts on contributor hours from @brancz We can make it more efficient with selectors on already parsed queries etc, no need to work around. More efficient, simpler and more secure. Other potentially orthogonal discussion:
|
Open question: Header vs Param? |
As agreed offline, looks like header is what people consistently use for this kind of metadata - we can make sure it's versioned and somehow typed (has proto for it?) as well. |
Would it also be possible to expose the tenant/labelset information in the query UI somehow? A drop-down or multi-select perhaps? One problem I have with Thanos is that while I sometimes want to query data across multiple clusters, I'd prefer if that was not the default and you had to select one/multiple/all tenants/labelsets explicitly to avoid accidentally evaluating the queries in all clusters. It would also be great if the query UI supported a url like https://my-thanos-instance/{some-tenant-or-labelset-segment}/query as this would allow me to set prometheus Anyway, thanks everyone for all the work on this project, aside from these small issues, it's been quite easy to set up and pleasant to work with. |
I think exposing it in the UI would be reasonable. |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Closing for now as promised, let us know if you need this to be reopened! 🤗 |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
This would be a great feature. I am a bit confused that the PR tackling this is closed #4141 |
How is going here? looking forward for the same feature also. As grafana stack support X-Scope-OrgID header, I think it's good to use header for Thanos to make it compatible to other tools. |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Any news regarding this feature? This is still relevant for me.
I would prefer query parameter |
Help wanted 🤗 |
It looks like this has been completed in #6756, or is there anything else missing? |
GOod point @NotAFile, let's close this. I think all requests have been implemented. |
Is your proposal related to a problem?
The most questions we get about Thanos are around multi tenancy, and I think it's worth considering that we could have more first class multi tenancy features. This is about the query path.
Describe the solution you'd like
Allow (optionally via a flag) requiring the
THANOS_TENANT
header on queries against the querier, that enforces the query towards that tenant, rejecting queries that do not specify it.Describe alternatives you've considered
Just do it entirely outside of Thanos, but as I said in the first sentence, that does not seem like a real possibility to people outside of the maintainer group.
@thanos-io/thanos-maintainers
The text was updated successfully, but these errors were encountered: