-
Notifications
You must be signed in to change notification settings - Fork 933
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
Metrics certificates are not restricted by project #13200
Comments
Also related lxc/incus#648 |
We should add a test to https://github.com/canonical/lxd-ci/blob/main/tests/cluster to check for certificate functionality after upgrades here. |
I am wondering if we should introduce a If a user queries Having another metrics endpoint |
This would be an API breaking change would it not? |
If you query Additionally to allow having a |
Lets log an issue for this separately as sounds like a feature/improvement rather than related to this bug fix. |
This commit ae092f4 changed the permissions of
GET /1.0/metrics
fromcontainers
view
on the project, tocan_view_metrics
on the server.As a result, metrics certificates can now view metrics for all projects, and restricting them by project does not change this.
Subsequently in the schema change from
certificates
toidentities
therestricted
field of metric type certificates was ignored, so it is now no longer possible to distinguish between metrics certificates that can view metrics for all instances in all projects, or metrics certificates that are restricted to a subset of projects.Possible steps to fix:
IdentityTypeCertificateMetrics
toIdentityTypeCertificateMetricsUnrestricted
.IdentityTypeCertificateMetricsRestricted
.can_view_metrics
onproject
, andcan_view_metrics
on instance.can_view_metrics
on server, filter project metrics bycan_view_metrics
on project, and filter instance metrics bycan_view_metrics
on instance.can_view_metrics
(regardless of entity type). Restricted certificates allow all instances, filter projects, and disallow server.The text was updated successfully, but these errors were encountered: