SSL Authentication (code included)

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
ecarlseen
Posts: 2
Joined: Tue Dec 13, 2011 4:23 am

SSL Authentication (code included)

Post by ecarlseen »

We prefer to use SSL authentication for our intranet web servers. I've found that this can be accomplished with two lines of code added to auth_login.php while checking for the user info:

}elseif (isset($_SERVER["SSL_CLIENT_S_DN_CN"])) {
$username = str_replace("\\", "\\\\", $_SERVER["SSL_CLIENT_S_DN_CN"]);

After this, the CN from the user's certificate is used for the user name (assuming you have SSL authentication activated in Apache). Adding this permanently to the code base would be much appreciated.

Thanks!
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: SSL Authentication (code included)

Post by TheWitness »

Its more an SSO passthru issue.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
ecarlseen
Posts: 2
Joined: Tue Dec 13, 2011 4:23 am

Re: SSL Authentication (code included)

Post by ecarlseen »

TheWitness wrote:Its more an SSO passthru issue.
Exactly. There are some good reasons not to use "Fake Basic Auth" with Apache - you still have to maintain an htpasswd file, and the DNs passed for user IDs are insanely long; the user name field would have to be extended. This is just so quick and easy it seems like it's probably the best answer. But it's your code base. :-)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: SSL Authentication (code included)

Post by gandalf »

As I described in my internal mail, we are using a similar approach to do SSO. Of course, we may define a hook here. But this would make a two liner plugin. Bad mojo, or shall we call this "the super-power of cacti plugin architecture"? (chapeau, Jimmy)
R.
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: SSL Authentication (code included)

Post by TheWitness »

gandalf wrote:As I described in my internal mail, we are using a similar approach to do SSO. Of course, we may define a hook here. But this would make a two liner plugin. Bad mojo, or shall we call this "the super-power of cacti plugin architecture"? (chapeau, Jimmy)
R.
Yea, PIA is like cocaine.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest