-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add trace query RBAC #789
base: main
Are you sure you want to change the base?
Add trace query RBAC #789
Conversation
6740db9
to
84b9bcd
Compare
e7a5666
to
c22d039
Compare
Signed-off-by: Pavol Loffay <[email protected]>
c22d039
to
15cd838
Compare
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
matchersTyped := matchers.(AuthzResponseData) | ||
|
||
var namespaces []string | ||
for _, m := range matchersTyped.Matchers { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does matchersTyped.Matchers
always contain a list of |
-separated namespace names?
It's not directly related to this PR, but I wonder why the attribute is called Matchers
and not Namespaces
.
} | ||
level.Debug(log).Log("AllowedNamespaces", allowedNamespaces) | ||
|
||
if strings.Contains(response.Request.URL.Path, "/api/traces/") || strings.Contains(response.Request.URL.Path, "/api/search") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we send a 403 error for other API endpoints?
https://grafana.com/docs/tempo/latest/api_docs/#endpoints
https://grafana.com/docs/tempo/latest/api_docs/#search-tag-values-v2 could leak private data (but this will also disable the auto-complete in the tracing UI :/)
Flag
--traces.query-rbac=true
enables query RBAC. The user will be able to see span/resource/scope attributes and events only from namespaces it can access (the list of namespaces is returned form opa-openshift).