SecSign ID Plugin: FTP PAM

2016-11-28 5 minutes to read

Two-Factor Authentication for FTP 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 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
2FA blind
2FA no AP
2SA no AP
2SA blind
Custom ID
IDP Custom Website
Enrollment initiated by SP
Enrollment with IDM
Show Network
Hide Network
Request Solution
The authentication was successful
Installation and Configuration

Installation and Configuration

Please read the SecSign ID PAM Tutorial before using the SecSign ID PAM for SSH Authentication. Follow steps 3 to 5 to configure and install PAM correctly.

Note: Using the FTP protocol without additional security measurements results in unencrypted data transfer and is regarded as unsafe. Passwords and other data are transmitted in plain text and can be wiretapped. Using FTP with SSL/TSL generates encrypted data transfer with FTPS and the SecSign ID Two-Factor Authentication acts as additional security measurement.

Since there are several ways to encrypt FTP connections we use the term FTP in the following tutorial – an encrypted connection is implied, even with the additional protection of the SecSign ID Two-Factor Authentication eliminating the thread of user data compromise.

We use the common FTP server “ProFTPd” for this tutorial. Other FTP server, for example “vsftpd” support PAM as well and are connected as or similar to the following description.

Overview on the configuration and installation:

  1. libcurl and gcc are required
  2. inquire SecSignID PAM and unpack
  3. Adjust the path to the configuration file in secsign.c
  4. Add all user names and corresponding SecSign IDs in secsignid.config
  5. make
  6. Copy the compiled file in the PAM library (usually /lib/security)

Configuration with PROFTPD

Install the ProFTPd as standalone version via apt-get install proftpd openssl. Open the configuration file/etc/proftpd/proftpd.conf and adjust all envirnomental settings for the FTP like data transfer via TLS.

The ProFTPd configuration script verifies the system’s support for PAM and runs mod_auth_pam automatically.

With other FTP server (like “vsftpd”) you may have to stare the utilization of PAM manually.

To grant the user some time to accept the login on his smartphone the values in TimeoutNoTransfer, TimeoutStalled und TimeoutIdle should be extended accordingly, providing at least two minutes.

Open the configuration file for the ProFTPd PAM settings/etc/pam.d/proftpd and change the following parameter:

auth [success=1 default=ignore]
auth requisite
auth required
#auth required item=user sense=deny file=/etc/ftpusers onerr=$
#@include common-auth 

Save the file and reboot the FTP server by employing service proftpd restart.

In the next step the FTP server can be tested. Please adjust the timeout value in the FTP client program (for example FileZilla) to two minutes to allow the user to accept the session on his smartphone.




Compilation errors

The library libcurl needs to be installed in the standard path, otherwise make fails. If libcurl is not on the standard path the compilation needs to be executed manually.

Authentication errors

If the authentication fails the debug- and logmodus should be activated (see PAM debug- and logmodus) and the output should be written in a file. This is necessary since PAM normally needs to be silent and does not allow for output for security reasons. If no log- or debug-files are generated the paths provided in secsignid.c are incorrect or no read-and-write authorizations are available.

A log-file is produced stating all errors. It is determined if libcurl works accurate, if the SecSign ID server is available, if port 443 is available to communicate with the server, if the configuration file is available and if PAM has reading authorization.

A debug file is created which records the interface communication. It is determined wether errors in the communication persists because no SecSign ID for the specific user was found or if there are errors in a different parameter, for example the service name.

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

SecSign ID Server passed FIDO Certification

We are happy to announce that the SecSign ID server has passed the official FIDO certification program of the FIDO Alliance. This will allow you to use the complete FIDO2/WebAuthn standard for passwordless 2FA sign-ins in your exi ...

Mehr Lesen

Two-Factor Authentication with Fido2 / WebAuth

The FIDO2 Project is a set of standards developed by the FIDO Alliance and the World Wide Web Consortium (W3C) to create a strong authentication protocol for the web. It consist mainly of the WebAuth standard for the browser part ...

Mehr Lesen

Protecting the Home Office VPN with 2FA

In the recent weeks, home office work has increased potentially. And while employees are practicing social distancing from their home computer, attackers are working hard to exploit security issues in this situation that is unfami ...

Mehr Lesen
SecSign 2FA