Authentication
Overview
The authentication mechanism Observium uses is configured via a parameter in config.php
$config['auth_mechanism'] = "mysql";
Currently supported mechanisms are mysql, ldap, ad, radius and http-auth. If you want to change the authentication mechanism, you have to change this setting!
If the system you are using is not supported and you want to develop your own, see Developing Authentication Modules for developer information.
Debugging
Enabling Debugging
By default debugging is disabled before the user is logged in to prevent exposing data. This can make diagnosing authentication problems difficult. You can enable debugging output during login by adding the following to config.php
Text Only | |
---|---|
1 |
|
Debugging will then be enabled if you add /debug/ to the end of the URL.
MySQL Authentication
Introduction
This is the default authentication mechanism, using users internal to Observium, with their separately maintained passwords.
Configuration
No configuration is necessary; the MySQL database settings are configured for Observium already, add users via the CLI scripts or the web interface.
Apache REMOTE_USER Authentication
Introduction
This authentication module takes a server variable, by default REMOTE_USER used by Apache. It doesn't require users to be in MySQL and will give all authenticated users the configured userlevel.
Configuration
First configure observium for the remote
mechanism.
$config['auth_mechanism'] = "remote";
It takes various config options
- auth_remote_variable - what server variable to use (defaults to REMOTE_USER).
- auth_remote_userlevel - what user level to give to remotely authenticated users. All users are automatically given this privilege level.
- auth_remote_logout_url - what URL to redirect the user to in order to perform a logout. Because even if we clear our session variable, the user will just get logged back in on the next pageview. If this variable is not set, the logout button is not available.
LDAP Authentication
Introduction
The LDAP module supports various LDAP configurations. By setting this up correctly, you can authenticate your users through your centralized user directory. User creation or password changes are not possible with this module. With the correct configuration (see below) you can use Kerberos SSO through this module as well.
This module requires the php LDAP module to be installed and enabled.
Configuration
PHP | |
---|---|
LDAP server configuration.
PHP | |
---|---|
LDAP TLS setting, set to "optional" if you want to enable TLS but don't want to depend on it being supported. Set to "require" if you want to ensure that your LDAP connection supports TLS.
PHP | |
---|---|
How users are identified in your LDAP server, prefix+username+suffix will form the complete user DN.
PHP | |
---|---|
Required group to be able to access Observium. Multiple groups are possible. Unset if you don't want to use this feature.
PHP | |
---|---|
The LDAP base DN for your groups.
PHP | |
---|---|
If your LDAP server does not allow anonymous binding, set up DN and password here, so we can search for the user's dn for authentication.
If your user's DN is comprised of prefix+username+suffix, you can disable anonymous bind, and Observium will connect to LDAP using the user's specified credentials.
Attribute mapping, defaults are for a regular OpenLDAP setup.
PHP | |
---|---|
LDAP Object Class which your users are in, used to list the users to be able to give them permissions.
PHP | |
---|---|
If your LDAP group memberships use the user's full DN (CN=Joe,OU=People,DC=example,DC=com) instead of just their username (joe), set this to fulldn.
PHP | |
---|---|
Configure the user levels people get when they are in a certain LDAP group. Spaces are allowed. Using the group's name instead of the full DN is possible, as long as this group is directly within your groupbase configured above.
PHP | |
---|---|
Support recursive lookups for groups. You can disable this if you don't want it, or don't use it, as this will add extra load to your LDAP/AD server.
PHP | |
---|---|
Maximum amount of nested groups to go through before giving up.
PHP | |
---|---|
Using this setting in combination with a bit of Apache configuration, you can automatically log in to Observium from browsers supporting the GSSAPI Negotiate function (ie a Windows machine in your AD Domain or a Linux machine signed in to your Kerberos infrastructure). This replaces the log in part, required LDAP group memberships for access and user level are still checked. As we don't receive the password from the user, an LDAP bind DN must be configured.
Examples
OpenLDAP
Active Directory (AD) Authentication
Introduction
The AD module supports Microsoft's Active Directory. By setting this up correctly, you can authenticate your users through your centralized user directory. User creation or password changes are not possible with this module. With the correct configuration (see below) you can use Kerberos SSO through this module as well.
This module requires the php LDAP module to be installed and enabled.
Configuration
PHP | |
---|---|
Active Directory domain name (in FQDN format).
PHP | |
---|---|
The LDAP base DN for your directory. Optional, if you have set your domain FQDN (auth_ad_domain
).
AD domain controller configuration. Multiple hostnames are supported, which are tried in order. Leaving the server list empty (unset) will use SRV records to retrieve the DCs for the domain, if the domain name (in FQDN format) was set.
PHP | |
---|---|
TLS setting, set this when using LDAPS (usually on port 636) rather than STARTTLS which starts out in plain text (usually on port 389).
PHP | |
---|---|
STARTTLS setting, set to optional
if you want to enable TLS but don't want to depend on it being supported. Set to require
if you want to ensure that your domain controller supports TLS. Set to no
if not using TLS.
This setting is ignored if you have set auth_ad_tls
to TRUE.
PHP | |
---|---|
By default, Observium validates the TLS certificate presented by the domain controller (either via direct TLS or via STARTTLS). Disable if you do not have trusted certificates.
PHP | |
---|---|
Required group membership to be able to access Observium. Multiple groups are possible. Unset if you don't want to use this feature. You can specify either the DN (CN=...) or the actual group name ("Observium users").
If this parameter is unset, Observium will filter on the auth_ad_groups
configured below, if any.
PHP | |
---|---|
Set up an AD user's DN or UPN and password here, so we can bind to the domain controller. We cannot only bind using the user's credentials as the user's password is not available to us on anything but the logon form.
PHP | |
---|---|
Configure the user levels people get when they are member of a certain AD group. Spaces are allowed. You can specify either the DN (CN=...) or the actual group name ("Observium users").
PHP | |
---|---|
Using this setting in combination with a bit of Apache configuration, you can automatically log in to Observium from browsers supporting the GSSAPI Negotiate function (ie a Windows machine in your AD Domain or a Linux machine signed in to your Kerberos infrastructure). This replaces the log in part only, required AD group memberships for access and user level are still checked.
Examples
This will connect to dc1.contoso.com using STARTTLS, binding with the LookupUser. 2 groups are defined, giving user in them access levels 10 and 1 respectively. Users outside of these groups do not have access.
Active Directory with SSO
Same configuration as above, plus the following:
PHP | |
---|---|
This will make Observium trust your Apache server to do the correct authentication and not request username/password from your LDAP server anymore.
Then set up your Apache server to do Kerberos authentication against your AD, using mod_auth_kerb
with configuration similar to the following:
Text Only | |
---|---|
Please see Google for more information about getting service keytabs to work and other Apache/Kerberos issues. This configuration will authenticate you with the webserver through your domain ticket, if you don't have one, an HTTP Basic Auth popup will request your username and password.
HTTP Authentication
Introduction
This module was contributed by NFOrce - we know of no active users, and it is not actively maintained by us; it relies on your Apache server to pass through authentication (you could use any of the available authentication modules - pam, ldap, mysql, etc); if the user is not in the database, the guest username configured is assumed. It also uses the users table in the database that the regular MySQL authentication module uses. How well this works out for user maintenance through the Observium interface is unknown.
Configuration
PHP | |
---|---|
If the user passed by Apache is not found in the Observium (MySQL) user database, the logged in user is assigned the username set here.
RADIUS Authentication
Introduction
This module uses the RADIUS protocol to authenticate users. User creation or password changes are not possible with this module.
If groups not set in configuration (see below), than all authenticated users are level 10 automatically. But if groups set and used, then the users who aren't found in groups have no access (user level 0).
This module requires the PHP radius module. Example of install this module for PHP 5.6 in Ubuntu 14.04:
Bash | |
---|---|
For newer Installs with PHP 7.x version, module named a little different and installation is easier (Ubuntu/Debian example):
Configuration
PHP | |
---|---|
This array contains a list of RADIUS servers Observium will try to connect to. The port is identical to all servers.
PHP | |
---|---|
Set the correct RADIUS secret here to be able to connect.
PHP | |
---|---|
Retries and timeout settings before the next server is used.
PHP | |
---|---|
NAS-Identifier (32) attribute string sent to RADIUS server. When ID empty, used local server hostname. This attribute can used for identification of the client.
PHP | |
---|---|
Authentication method for sent user passwords to RADIUS server. PAP - default unencrypted, CHAP (CHAP_MD5) - basic password encryption by md5, not supported by Microsoft IAS server, MSCHAPv1 and MSCHAPv2 - can used with Microsoft IAS server.
PHP | |
---|---|
Attribute name or number, where stored string with group name. This group name compared with keys in $config['auth_radius_groups']
and sets appropriate user level.
Configure the user levels people get when they are in a certain RADIUS group. Spaces are allowed.
If $config['auth_radius_groups']
not set in config, all authenticated users are level 10 automatically.