SecSign ID Plugin: Unix PAM - Integration Tutorial

2016-11-28 5 minutes to read

Two-Factor Authentication for PAM

The Pluggable Authentication Modules (PAM) is a software library which offers a general programming interface for authentication services. By using the PAM-API one does no longer need to define the settings for every single authentication application. Instead, individual standarized modules can be used. The modules can be assigned to individual services in the configuration file. There is no need to change the compilation of the corresponding software. PAM is available for AIX, HP-UX, Solaris, Linux, FreeBSD, NetBSD, Mac OS X and DragonFly BSD.

PAM Overview
Integration

Integration of the plugin into your setup

SecSign ID Integration

Please configure your desired integration of the SecSign ID Two Factor Authentication

Choose a system, where you want to add the secure login

Do you need your own ID Server inside your protected network or prefer if we manage and maintain it for you

The location to save the assigned SecSign IDs to a user account or the IDM alltogether

System to protect
?
The System you want to protect - Choose a system, where you want to add the secure login
SecSign ID Server location
?
Do you need your own ID Server inside your protected network or prefer if we manage and maintain it for you
User account location
?
The system to save the assigned SecSign IDs to a user account or the IDM alltogether
edit the settings to change the integration
Authentication
2FA
2FA blind
2FA no AP
2SA
2SA no AP
2SA blind
OTP
Enrollment
Custom ID
Pattern
IDP Custom Website
Enrollment initiated by SP
Enrollment with IDM
Show Network
Hide Network
Fullscreen
Request Solution
x
The authentication was successful
Application

Areas of application

There are several areas of application for secure Two-Factor Authentication with the SecSign ID Pluggable Authentication Module.

We offer the SecSign ID RADIUS Proxy for authentication services using the RADIUS Server and Active Directory. This way the SecSign IDs are requested from the Active Directory as compared to the configuration file.

  • SSH
  • FTP
  • Apache HTTP Auth
  • Desktop Logins
Authentication Process

Authentication Process

The user provides, with an SSH connection for this example, his user name and password. He receives a push-notification to his smartphone within seconds, providing the service name and address of the service he wants to log in to. As soon as he confirms the request the SSH connection is established.

That is everything there is to do for the user to enjoy truly secure Two-Factor Authentication and prevent access to the system even with leaked password information.

That is how the authentication for the SSH example works:

pam-sequence-1

  1. A SSH client opens the SSH connection to the server.
  2. The SSHd application accepts the request and in turn places an authentication request to the PAM library.
  3. The corresponding configuration file is reviewed for the correct PAMs. In the example it is asked for the user password, just like for SSH connections.
  4. In the second step the SecSign ID PAM is called.
  5. The SecSign ID PAM loads the configuration file and looks for the corresponding user’s SecSign ID.
  6. In the next step the SecSign ID Server is notified about the SecSign ID authentication request.
  7. The SecSign ID Server sends a push-notification to the user’s smartphone.
  8. The user can now accept the login on his smartphone.
  9. The PAM requests the authentication status from the SecSign ID Server. If the login is accepted that information is forwarded to the PAM.
  10. The SecSign ID PAM evaluates the server’s answer and determines if the authentication is valid. The PAM status is sent to the PAM library if the authentication is verified.
  11. The PAM library checks for additional authentication routines and forwards the authentication confirmation to the application, in this case SSHd.
  12. SSHd receives confirmation from the PAM about the valid authentication and establishes a SSH connection.
Setup

Setup

Download the SecSign ID PAM archive and unpack it. The library contains four files:

  • Makefile: Is used to compile the source library
  • libsecsinid.c: C library for the SecSign ID Two-Factor Authentication
  • libsecsinid.h: Corresponding header-file with type definitions and function prototypes
  • secsignid.c: PAM to use the SecSign ID
  • secsignid.config: Comfiguration file which combines user name and corresponding SecSign ID

To compile and accurately render the program the following requirements must be met:

  • Unix Platform or Mac
  • gcc compiler
  • libcurl installed
  • libpam installed
  • Internet connection (the SecSignID server communicates via Port 443)

The gcc compiler and libcurl can be installed with Debian:

and with Ubuntu:

The easiest way to install the compiler gcc, libcurl and libpam on Mac OS X is via Homebrew.

PAM Configuration

PAM Configuration

The file secsignid.c contains configuration settings for the module. Paths to the configuration file and the log- and debug files can be adjusted.

Configuration file

The configuration file secsignid.config combines the user name and corresponding SecSign ID. The file should be stored at /etc/secsignid/secsignid.config or at a location with root- or admin access rights. The path to the configuration file is set in the file secsignid.c with the constant CONFIGFILE.

The SecSign ID transmits several information to the smartphone, including service name, the corresponding IP-address or URL:

The configuration file has the following schema for mapping the linux username and the SecSignId:

ID Server endpoints

If you want to use your own On-Premise ID Server, you can change the endpoints in libsecsignid.c. The predefined cloud endpoints are the following:

Modify the urls to fit your On-Premise ID Server configuration.

Debugging

The library contains a debug modus, which releases any interface communication. That enables the verification of request transmission and requests for session status. To activate the debug modus the following constants have to be adjusted.

DEBUGTYPE specifies how the debug output is handled:

  • NO = No debugging
  • YES = Output on StdOut
  • FILEDEBUG = Output in file

DEBUGFILEPATH describes the path for the debug-file. The file has to be be writeable with the program. If no debug-file exists one is automatically generated.

Logging

Logging is meant for interface error. Technical errors (for example wrong syntax for the parameter) and API error (for example nonexistent user) are logged. Logs are either defined in the Syslog or a separate file:

  • FILELOG = Errors are written in a file, the second parameter is the file name.
  • SYSLOG = Errors are written in the Syslog, the second parameter is ignored but must be present.
  • NO = No log is written, the second parameter is ignored but must be present.

Compilation and Installation

Compilation and Installation

To compile the PAM open the shell or the terminal, respectively, switch to the unpacked directory containing the C-script and enter make. The program pam_secsignid.so is created.

The program can be compiled manually:

After the successful compilation the file has to be stored in the PAM directory. Normally, it is /lib/security or /lib/x86_64-linux-gnu/security:

[/box][/col][/section]

Your own ID-Server

On premise installations of SecSign ID offer the flexibility to connect with your preferred servers, services, and devices. And you can customize the SecSign ID with your own organization’s branding.

Learn More
On Premise 2FA ID

Latest Blog Posts, Updates & Features

Options for secure SSO for Atlassian products

Options for securing Atlassian SSO Your users and passwords and services are all over the place? You want to simplify your security and authentication setup but you don’t know where to start? Move beyond your authentication ...

Mehr Lesen

Multi-Factor Authentication powered IdM/IAM

Multi-Factor Authentication powered IdM/IAM with SecSign ID Your users and passwords and services are all over the place? You want to simplify your security and authentication setup but you don’t know where to start? Move bey ...

Mehr Lesen

Atlassian JIRA and Confluence Two-Step Authentication and IP-SafeZone

With SecSign ID you can protect all your logins with a secure Two-Factor Authentication based on a challenge response. The authentication offers the highest protection for the company data while being incredibly simple to us ...

Mehr Lesen