Table of Contents

Safety functions

Third party authentication system

Local Pandora FMS

Default authentication indicates that it will be carried out using the internal Pandora FMS database. For security, superadmin type users are always authenticated in this way, the rest of the authentication types have the local option as a backup (fallback).

Active Directory

ldap://addc.mydomain

LDAP

yum install openldap*

Or

apt install ldap-utils

Important fields:

Advanced Config LDAP

Attributes must have the following format Attribute_Name = Attribute_Value.

Double authentication

To use this feature the administrator must activate double authentication in the authentication section of Pandora FMS Web Console global configuration:

Management → Settings → System Settings → Authentication → Double authentication.

Users may choose whether to enable two-step authentication on their accounts by accessing the Edit my user option.

This feature requires for PFMS server and the mobile devices to have an accurately synchronized date and time.

It will also be necessary to have the code generator application on a mobile device owned by each user. To find out where and how to download it:

The PFMS notification system may be used to inform all users that 2FA is available and how to activate this personal option. To do this in the menu Operation → Workspace → Messages → New message you type in a message for group All similar to this one:

Force 2FA for all users is enabled

Enabling this option will force all users to use the two-step authentication.

To disable this feature to a specific user without using the graphical interface, an administrator can use the PFMS CLI.

SAML

SAML is an open XML-based authentication and authorization standard. Pandora FMS can work as a service provider with its internal SAML identity provider.

Administrators always authenticate against the local database.

Installing SimpleSAMLphp 2.0

Download SimpleSAMLphp version 2.3.2 from its official repository:

and then upload it to Pandora FMS server. If PFMS server has internet access and wget is installed, you may use the following command directly in a directory with sufficient space and write permissions:

wget https://github.com/simplesamlphp/simplesamlphp/releases/download/v2.3.2/simplesamlphp-2.3.2-full.tar.gz

Unzip the downloaded file with:

tar -xvf simplesamlphp-2.3.2-full.tar.gz

The folder must be moved to its final location:

mv simplesamlphp-2.3.2 /opt/simplesamlphp

To share access with Pandora FMS, create the following symbolic link:

ln -s /opt/simplesamlphp/public /var/www/html/simplesamlphp

SimpleSAMLphp bases its configuration on the config.php file. With the final location established above, the default template must be renamed:

mv /opt/simplesamlphp/config/config.php.dist /opt/simplesamlphp/config/config.php

This will generate the full path to the configuration file in:

/opt/simplesamlphp/config/config.php

The following values should be edited using your favorite text editor (note that pandora.local must be replaced by PFMS web console URL and keep the comma at the end of the line, as it is part of the instruction blocks):

/opt/simplesamlphp/config/config.php
'baseurlpath' => 'https://pandora.local/simplesamlphp/',
'auth.adminpassword' => '123pandora',
  • Note that pandora.local must be replaced with PFMS Web Console URL and the comma at the end of the line must stay, as it is part of the instruction blocks.
  • You should always use a URL instead of an IP address. Following the example of using pandora.local, this “URL” should be added to the operating system's /etc/hosts file (note: for educational purposes only).


Save the changes to the file and go to the command line.

If a cache permission error appears, apply the following:

mkdir /var/cache/simplesamlphp && chown apache:apache /var/cache/simplesamlphp

This will get SimpleSAMLphp up and running, and it should display the home page at URL https://pandora.local/simplesamlphp/ (replace pandora.local with PFMS web console's URL).

If you connect through HTTP instead of HTTPS, authentication will fail until the Apache web server is configured to listen on the secure port 443.

To access SimpleSAMLphp management, first rename file. authsources.php.dist:

mv /opt/simplesamlphp/config/authsources.php.dist /opt/simplesamlphp/config/authsources.php

Copy the contents of the previously downloaded XML, paste it, and process it; this will generate a configuration text for PHP, which is copied and added to file /opt/simplesamlphp/metadata/saml20-idp-remote.php. Then save these additions and exit the file editor.

It may be accessed through URL https://pandora.local/simplesamlphp/admin/ (replace pandora.local by PFMS web console's URL):

Configuring Pandora FMS with SAML

Management → Setup → Setup → Authentication menu.






The following values are common:

Some notable fields:

Before configuring any third-party services with SAML, it is recommended to test and verify locally the installation of SimpleSAMLphp.

Configuring Azure with SAML

In Azure® services, you must access the Extra ID section:

Then go to Business Applications:

A new application is created (or an existing one is used):

Single sign-on access:

Edit the basic SAML configuration:

Fill in the following fields with the ID for the application, the address of the installed SimpleSAMLphp (replace pandora.local with the URL of the PFMS web console) and the address to which Azure® will redirect when the session is closed:

Download the XML file with federation metadata, which will be used later:

Finally, save the ID from the previous step and the URL of the extra identifier:

Configuration in SimpleSAMLphp

The file /opt/simplesamlphp/config/authsources.php must be edited with the following values:

And on the SimpleSAMLphp website, go to the Federation menu and then to the Tools section for converting XML to PHP:

The name saml20-idp-remote.php.dist must be changed to:

mv /opt/simplesamlphp/metadata/saml20-idp-remote.php.dist /opt/simplesamlphp/metadata/saml20-idp-remote.php

Copy the contents of the previously downloaded XML file, paste it, and process it. This will generate a configuration text for PHP, which you should copy and paste into the file /opt/simplesamlphp/config/authsources.php, replacing all of its contents.

If everything is correct, proceed to perform a test:

Obtaining the following result:

The email address and user ID can be taken from the attributes returned by Azure® in the test performed above:

For advanced configuration, you can delve deeper into the mapping of properties or select a default one if none match:

Password encryption

Pandora FMS allows to encrypt the passwords stored in the database.

The encryption key is generated from a user-supplied password and is not stored in the database (neither the password nor the key), so that passwords cannot be recovered from a database dump.

Once the user sets the password, the encryption works transparently to the user.

If the password provided by the user is lost, you will not be able to recover the passwords stored in the Pandora FMS database. Save in a safe place or make a backup of the config.php and pandora_server.conf files.

Technical details

Passwords are encrypted using the Rijndael cipher with 128-bit blocks in ECB mode. A 256-bit key is generated at startup from the MD5 of the password set by the user.

Configuration in a new Pandora FMS installation

To enable key encryption, the password must be configured both in the Pandora FMS Server and in the Web Console.

The steps to follow for encryption are as follows:

$config["encryption_passphrase"]="passphrase";
/usr/bin/pandora_encrypt_db /etc/pandora/pandora_server.conf

The Pandora FMS server should be restarted after making the changes and launching the script.

Changing the encryption password

It is possible to change the encryption password in case it has been compromised. You must first decrypt the passwords stored in the database:

/usr/bin/pandora_encrypt_db -d /etc/pandora/pandora_server.conf

Then, after having changed the encryption password (as described in the section for configuration in a new installation), you can encrypt it again:

/usr/bin/pandora_encrypt_db /etc/pandora/pandora_server.conf

From 7.0 NG 739 onwards, the secure credential manager is included. Please refer to the following section to finish this process correctly.

Credential store:

If you have an encrypted database, in order to continue using the credential manager without losing data decrypt everything except the tcredential_store table.

To do so, execute the following commands:

/usr/bin/pandora_encrypt_db -d -m /etc/pandora/pandora_server.conf

It will be deciphered.

Once decrypted, it will be re-encrypted again:

/usr/bin/pandora_encrypt_db /etc/pandora/pandora_server.conf

If you only want to encrypt from scratch, just execute the last command.

Removing the encryption password

It is recommended to keep every password stored in Pandora FMS encrypted.

/usr/bin/pandora_encrypt_db -d /etc/pandora/pandora_server.conf
# $config["encryption_passphrase"]="your encryption passphrase";

The Pandora FMS server should be restarted after making the changes and launching the script.

User password policy

Management → Settings → System Settings → Password policy menu.






To activate the password policy, you must have an administrator profile (Pandora administrator) or be a superadmin .

Important fields:

Audit Log

Management → Admin tools → System Audit Log menu.






Pandora FMS stores a log with all changes and important actions carried out in the Pandora FMS Console. There you can see a series of entries related to Console activity, including user information, type of action, date, and a brief description of the recorded events.

You can filter which entries are displayed by different criteria, including actions, user, and IP address. You can also perform a text search and define the maximum time range to search, with the option to save that filter if it is frequently used.

You should use the right-side filter and set a start date and an end date, then run the filtering.

Back to the Pandora FMS documentation index