Open sudeephb opened 10 months ago
(by phausman)
Actually only load-balancer_admin
role is required. Alternatively, nagios user should be a system admin and requests should be made in system scope (instead of project scope). See related policies for Octavia's /octavia/amphorae API below:
"system-admin": "role:admin and system_scope:all" "load-balancer:admin": "is_admin:True or role:load-balancer_admin or rule:system-admin" "os_load-balancer_api:amphora:get_all": "rule:load-balancer:admin"
(by eric-chen)
I am worry that to provide load-balancer_admin permission to nagios user. Does that mean nagios user can modify/create/delete the load balancer? Could we find the least privilege to run check_octavia.py ?
https://www.beyondtrust.com/blog/entry/what-is-least-privilege
(by eric-chen)
We need to review all the actions that can be done after we apply load-balancer_admin
to nagios. Could nagios delete/create/modify the load-balancer after we apply the role? If yes, then it is not the least-privileged. We can discuss it offline.
Thanks for providing the two links. However, it seems not related the risk if we provide bigger permission to nagios user.
(by yoshikadokawa) I'm still seeing the same with openstack-service-checks charm from latest/edge channel (rev 33) on Yoga-Jammy.
$ /usr/local/lib/nagios/plugins/check_octavia.py --check loadbalancers
Traceback (most recent call last):
File "/usr/local/lib/nagios/plugins/check_octavia.py", line 308, in
$ /usr/local/lib/nagios/plugins/check_octavia.py --check pools
Traceback (most recent call last):
File "/usr/local/lib/nagios/plugins/check_octavia.py", line 308, in
(by fandanbango) This was confirmed at least twice on Jammy/Yoga environments already. Not sure is the exact same issue but it looks like it.
(by aieri) yoshikadokawa, fandanbango: the loadbalancers endpoint is different from the amphorae one. It should be sufficient to grant nagios the load-balancer_global_observer role. See https://docs.openstack.org/octavia/latest/configuration/policy.html#default-octavia-policies-api-effective-rules
(by mastier1) I can confirm that fixes the issue, the question is, can we incorporate that in nagios charm for instance
openstack role add --user-domain service_domain --user nagios --project-domain service_domain --project services load-balancer_global_observer
(by eric-chen) We will migrate LMA to COS soon. Therefore, we won't maintain/modify nagios charm anymore. What we can do it to update the document in short term is to update the documentation of charm-openstack-service-check. For long term, we should collect metrics from openstack-exporter and create related alert from prometheus and alert manager.
The openstack user stored in /var/lib/nagios/nagios.novarc doesn't seem to have enough privilege to run check_octavia.py
Imported from Launchpad using lp2gh.
date created: 2022-03-02T21:19:21Z
owner: gustavosr98
assignee: txiao
the launchpad url