sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.
http://www.thruk.org
Other
408 stars 148 forks source link

After 2.26-2 update Contactgroup show all hosts and not only defined hosts #902

Closed lb-dei closed 5 years ago

lb-dei commented 5 years ago

Describe the bug Hi, After Thruk 2.26-2 update with Naemon 1.0.9, the contactgroup on an host not working : So, an user of a contactgroup will show all hosts, not only hosts of his contactgroup

Thruk Version 2.26-2

To Reproduce In Thruk 2.24-2 I use this :

define contactgroup { contactgroup_name admin_sys alias System admins members bob, john }

define contactgroup { contactgroup_name admin_net alias Network admins members jeff, justin }

On a host : define host { host_name router alias router.lan address 192.168.0.1 use modele_host_net }

define host { host_name system alias system.lan address 192.168.0.2 use modele_host_sys }

And templates :

define host { name modele_host_sys check_command check-host-alive contact_groups admin_sys event_handler_enabled 0 flap_detection_enabled 0 max_check_attempts 2 notification_interval 30 notification_options d,u,r notification_period 24x7 notifications_enabled 1 process_perf_data 1 register 0 retain_nonstatus_information 1 retain_status_information 1 }

define host { name modele_host_net use host-cacti check_command check-host-alive contact_groups admin_net event_handler_enabled 0 flap_detection_enabled 0 max_check_attempts 2 notification_interval 30 notification_options d,u,r notification_period 24x7 notifications_enabled 1 process_perf_data 1 register 0 retain_nonstatus_information 1 retain_status_information 1 }

With this working configuration In Thruk 2.24-2, Bob & John will only view the system host and Jeff & Justin will only view the router host

But in Thruk 2.26-2, all of thems got system and router which is not good :(

Expected behavior Jeff and Justin users got router and only router Bob and John users got system and only system

Screenshots Production screenshots : My user got all of hosts and not only my hosts :

image

image

Desktop (please complete the following information):

sni commented 5 years ago

i am unable to reproduce this issue. Could you make sure there are no global roles or permissions involved. You can also check the users permissions, roles and groups with the config tool. Then make sure thoses uses are really not listed as contacts for those hosts, also throught templates.

lb-dei commented 5 years ago

i am unable to reproduce this issue. Could you make sure there are no global roles or permissions involved. You can also check the users permissions, roles and groups with the config tool. Then make sure thoses uses are really not listed as contacts for those hosts, also throught templates.

Hi, Thanks for your answer, I'm sure that hosts have only contacts that it will display

image

My user start with B and end with R, there's no contact attached for this host with my user ... why does it display in Thruk 2.26-2 where in 2.24-2 no ?? Thanks

lb-dei commented 5 years ago

Ok I Found the problem In cgi.cfg : authorized_contactgroup_for_system_information=system_admins,network_admins authorized_contactgroup_for_configuration_information=system_admins,network_admins authorized_contactgroup_for_system_commands=system_admins,network_admins authorized_contactgroup_for_broadcasts=system_admins,network_admins authorized_contactgroup_for_reports=system_admins,network_admins authorized_contactgroup_for_business_processes=system_admins,network_admins

When I delete the group network_admins in authorized_contactgroup_for_system_commands and authorized_contactgroup_for_system_information I only see my hosts, but I can't use the Config Tool

But why does it worked with 2.24 ? Is it possible to use again the Config Tool but with only my hosts ?