k8spin / prometheus-multi-tenant-proxy

Prometheus multi-tenant Proxy. Needed to deploy Prometheus in a multi-tenant way
GNU General Public License v3.0
67 stars 13 forks source link

Deny request if no namespace nor labels #70

Closed derlin closed 1 year ago

derlin commented 1 year ago

Ensure every request has at least a namespace or a labels set.

NOTE: I would rather use nil, so that we can support "superuser" privileges. That is, if in JWT the claims are missing => denied, but if they are there and empty => ok (superuser). We could do the same for the basic auth. What do you think?

(I do this PR anyway, it is a good base for discussions).

angelbarrera92 commented 1 year ago

🤔

I would say we must manage super users in a different fashion, What about adding another flag? Like... --superuser derlin?

This way is clearer who is a superuser and who isn't. Looking at the labels/namespaces could be complex to debug. WDYT?