You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before reporting an issue on Gnocchi, please be sure to provide all necessary
information.
Which version of Gnocchi are you using
Latest master.
How to reproduce your problem
RBAC policy definitions for the relevant functions:
"is_metric_viewer": "role:_member_ or role:metric_viewer""resource_in_project": "project_id:%(project_id)s""metric_in_project": "project_id:%(resource.project_id)s""resource_read": "rule:context_is_admin or (rule:is_metric_viewer and rule:resource_in_project)""metric_read": "rule:context_is_admin or (rule:is_metric_viewer and rule:metric_in_project)""search resource": "rule:resource_read""get metric": "rule:metric_read"
This does not work, however, when I give it the metric ID directly, and do not use the resource metric code path.
Looking at the code, it looks like details=True is not set when querying for the metrics from the index using the aggregates API, causing the Resource relation to not be populated. Not sure if this is actually the cause of the issue as I'd think the filtering would be done in the database query itself, but it was something I noticed.
Looking at the code, it looks like details=True is not set when querying for the metrics from the index using the aggregates API, causing the Resource relation to not be populated. Not sure if this is actually the cause of the issue as I'd think the filtering would be done in the database query itself, but it was something I noticed.
i think you're right. seems like it's missing details=True similar to #464.
Before reporting an issue on Gnocchi, please be sure to provide all necessary
information.
Which version of Gnocchi are you using
Latest
master
.How to reproduce your problem
RBAC policy definitions for the relevant functions:
The user has the correct roles assigned:
I have a metric that is associated with a resource:
When I use the aggregates API against it querying by metric name as a project member, everything works correctly:
This does not work, however, when I give it the metric ID directly, and do not use the resource metric code path.
Looking at the code, it looks like
details=True
is not set when querying for the metrics from the index using the aggregates API, causing theResource
relation to not be populated. Not sure if this is actually the cause of the issue as I'd think the filtering would be done in the database query itself, but it was something I noticed.What is the result that you get
What is result that you expected
The text was updated successfully, but these errors were encountered: