[SOLVED] Tab shows even for users that don't have access?
Moderators: Developers, Moderators
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
[SOLVED] Tab shows even for users that don't have access?
Cacti 0.8.7a, Thold 0.3.8
When a user has no access to THold (even to view), the tab still shows up.
Looks like thold_show_tab calls this new-fangled api_user_realm_auth() function, to decide whether or not to show it, which presumably is returning the wrong thing.
monitor has the same problem, incidentally.
When a user has no access to THold (even to view), the tab still shows up.
Looks like thold_show_tab calls this new-fangled api_user_realm_auth() function, to decide whether or not to show it, which presumably is returning the wrong thing.
monitor has the same problem, incidentally.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- chrisgapske
- Cacti User
- Posts: 278
- Joined: Tue May 22, 2007 7:56 am
- Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I don't know, because it doesn't go down It's on a customer site with only 5 switches, as a test before we move our main Cacti to 0.8.7mcutting wrote:Either of you guys have UP and DOWN notifications working with your version of THOLD ? Sorry it's a bit off topic, but I was curious.
Thanks
I don't seem to have gotten any thold-breach mails either though, and I have certainly had breaches for error rate on a couple of ports.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I've just been looking at this some more, and it seems that the api_user_realm_auth() function in plugins.php only works if a cacti setting called global_auth is set to 'on'. That setting doesn't exist at all in my 0.8.7a install.
When it doesn't exist (or isn't 'on'), then api_user_realm_auth only checks if the permission for that file has been defined, not whether the current user actually has it - it doesn't use the sess_user_id at all.
Since I don't know what global_auth does, I don't really know what the solution is, except to say that in my Cacti 0.8.7a install, nothing refers to global_auth apart from thold, monitor and plugins.php, and the database conversion scripts for upgrades. The database upgrade scripts appear to be deleting the setting during the move from 0.8.6x to 0.8.7x, so I guess it's an obsolete setting. Looks like it should really be using auth_method, if anything.
When it doesn't exist (or isn't 'on'), then api_user_realm_auth only checks if the permission for that file has been defined, not whether the current user actually has it - it doesn't use the sess_user_id at all.
Since I don't know what global_auth does, I don't really know what the solution is, except to say that in my Cacti 0.8.7a install, nothing refers to global_auth apart from thold, monitor and plugins.php, and the database conversion scripts for upgrades. The database upgrade scripts appear to be deleting the setting during the move from 0.8.6x to 0.8.7x, so I guess it's an obsolete setting. Looks like it should really be using auth_method, if anything.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Changing line 68 of include/plugins.php to
appears to resolve this for me.
Code: Select all
if (read_config_option('global_auth') == 'on' || read_config_option('auth_method') == 1) {
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- chrisgapske
- Cacti User
- Posts: 278
- Joined: Tue May 22, 2007 7:56 am
- Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
- chrisgapske
- Cacti User
- Posts: 278
- Joined: Tue May 22, 2007 7:56 am
- Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
Still broke for LDAP auth
This still leaves it broke when using LDAP auth, which has an auth_method = 3. The easiest/dirtiest way to fix is to just continue what Howie mentioned:Howie wrote:Changing line 68 of include/plugins.php toappears to resolve this for me.Code: Select all
if (read_config_option('global_auth') == 'on' || read_config_option('auth_method') == 1) {
Code: Select all
if (read_config_option('global_auth') == 'on' || read_config_option('auth_method') == 1) || read_config_option)'auth_method') == 3) {
Who is online
Users browsing this forum: No registered users and 0 guests