Alternate authentication method

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
User avatar
psyber
Cacti User
Posts: 84
Joined: Tue Aug 02, 2005 7:18 pm

Alternate authentication method

Post by psyber »

I am running my install behind a password protected https page. I like the fact that you can give users rights and they can save settings but I don't want them to have to login 2 times or keep track of yet another password. It seemed easy enough to hack in a checkbox and tweak the authentication so I did it.

I'm using SERVER["REMOTE_USER"] to nab the username and if that user doesn't exist then they default to guest. I'm using almost the same hack at my other job (using mod_bluestem and nabbing the BLUESTEM_ID ENVAR) and haven't heard any complaints. It should (in theory) work with most any auth system that sets the ENV properly though I haven't tested this on a windows platform with IIS

I'm not much of a PHP person but it seems to work ok. Have a look at the patch and see if its to your liking. I'd really like to see this or something very similar make it into a production version.

Thanks
~p
Attachments
auth.patch
(3.58 KiB) Downloaded 462 times
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

intresting ;)
it would be nice to be included in cacti ;)
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Web Basis, that's what "SERVER["REMOTE_USER"]" is known as, is part of the authenication system in the next release of cacti, version 0.9.0.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
tmoore
Posts: 9
Joined: Tue Nov 08, 2005 10:32 am
Location: Raleigh, NC

error?

Post by tmoore »

I'm getting this error when I use your patch.. Pls advise

Undefined index: REMOTE_USER
User avatar
psyber
Cacti User
Posts: 84
Joined: Tue Aug 02, 2005 7:18 pm

Post by psyber »

check your environment variables using a phpinfo script
sounds like the authentication method you are using isn't setting the variable
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Or there is no authenication from the web server occuring. That is usually the cause of that field not be available.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests