SecureAuth Workforce Authority

PAM for Linux

You can integrate Multi-Factor Authentication (MFA) and other elements of the SecureAuth Workforce Authority system with Linux through the Workforce Authority pluggable authentication module (PAM). It's easy to deploy, customizable, and secure.

Prerequisites

  • Configured Workforce Authority instance and user account with administrative privileges for Workforce Authority.

  • Supported Linux operating systems:

    • Red Hat Enterprise Linux (RHEL) 8.0+

      This includes downstream distributions, such as Rocky Linux 8+

    • Debian 11+

    • Ubuntu 20.04+

    Note

    The PAM module supports amd64 (x86-64) and arm64 (aarch64) architectures for each supported operating system.

Security-Enhanced Linux considerations

If you are running Security-Enhanced Linux (SELinux), please note the following:

  • The Workforce Authority PAM communicates with SecureAuth servers over HTTPS. On systems with SELinux enabled and in enforcing mode, the SELinux policy must allow service processes like sshd to make HTTPS requests.

  • When installing the PAM module's RPM package on Red Hat Enterprise Linux or downstream distributions, like Rocky Linux, the pam_arculix-selinux package is included to add SELinux rules that enable communication with SecureAuth for services like sshd or login. Services like su and sudo don’t require additional policies, but for other services running with SELinux enforced, you may need to manually add policies to allow network access.

Add Linux application in Workforce Authority

Add an application in Workforce Authority for Linux.

  1. Log in to Workforce Authority with an administrative account and go to Applications.

  2. Click Create New Application.

    Create new application

  3. In the New Application form, on the General tab, set the following configurations:

    Name Set the name of the application. This is the name to display for push notifications, in the Admin panel, Application portal, and audit logs. For example, Linux-SSH.
    Type Set to OAuth/OIDC Application.
    Template Set to SSH Plugin [ssh].
    Out of Band Methods Select the allowed methods end users can choose to approve MFA requests. For example, Workforce Authority Mobile app (push notifications), SMS, or Security Key.
    Message for MFA Requests Optional. Type a message displayed to end users when sending an MFA request via push notification, SMS, or email.

    General tab of the new Linux application with its name and type

  4. Save your changes.

  5. Open the Linux application again and go to the OAuth/OIDC Configuration tab.

  6. Copy the UID and Secret.

    You will need these values to configure the Workforce Authority PAM for Linux.

    Important

    Treat your UID and Secret code like any sensitive credential. Do not share this with unauthorized individuals or send it in an email.

Install Workforce Authority PAM for Linux

  1. From the Workforce Authority Download Center, download Workforce Authority PAM for Linux specific to your Linux operating system.

  2. Upload the module files to your Linux machine.

  3. Install the package files specific to your Linux operating system.

    RHEL

    Use the DNF package manager to install the RPM package with this command:

    sudo dnf install ./pam_arculix-*.rpm
    

    Debian / Ubuntu

    Use the APT package manager to install the package with this command:

    sudo apt install ./libpam_arculix-*.deb
    

Linux configuration

This section provides instructions for how to enable the Workforce Authority PAM on your Linux machine for ssh, su, sudo, and console authentications.

To get started quickly, use the pam_arculix_configure tool for basic configuration.

For more configuration options, such as user mapping and setting a custom token URL, continue to Advanced configuration.

Basic configuration

Follow the steps below to run the pam_arculix_configure tool for basic configuration.

  1. Run the Workforce Authority configurator using the following command:

    sudo pam_arculix_configure
    
  2. Type 1 to insert the UID and Secret you obtained earlier when creating the Linux application in Workforce Authority.

    PAM configurator prompting for the application UID and secret

  3. Re-run the Workforce Authority configurator using the following command:

    sudo pam_arculix_configure
    
  4. Type the number of a service to which you want enable Workforce Authority MFA. Repeat this for each service that you want to enable.

    PAM configurator service list with option 2 chosen to enable MFA for sshd

    Type 2 to enable Workforce Authority MFA for SSH

    PAM configurator with option 3 chosen to enable MFA for su

    Type 3 to enable Workforce Authority MFA for su

    PAM configurator with option 4 chosen to enable MFA for sudo

    Type 4 to enable Workforce Authority MFA for sudo

    PAM configurator with option 5 chosen to enable MFA for login

    Type 5 to enable Workforce Authority MFA for login

    PAM configurator with option 6 chosen to enable MFA for gdm-password

    Type 6 to enable Workforce Authority MFA for gdm-password

    Note

    The configurator does not automatically restart the SSH service to prevent any unwanted disconnections. You will need to apply the changes and restart the service in the next step.

  5. Once you've made the changes, apply them to the SSH service using the following command:

    sudo systemctl restart sshd
    

Advanced configuration

For advanced configuration options, edit the configuration file located in /etc/arculix/arculix_pam.conf

The file is divided into sections, with each section labeled in square brackets. The only required options are uid and secret.

Example configuration:

[arculix]
uid = <SecureAuth application uid>
secret = <SecureAuth application secret>
poll_interval_secs = 5

[arculix.user_mapping]
use_comment_field = true
comment_field_number = 2
comment_field_separator = ,

[arculix.oauth]
token_url = https://oidc.acceptto.com/tenant_name/oauth2/v1/token
cache_enable = false

[arculix]

The [arculix] section provides the necessary credentials for authenticating the module with the SecureAuth Workforce Authority service. The following configuration options are available:

uid The UID of the application configured in Workforce Authority.
secret The secret of the application configured in Workforce Authority.
poll_interval_secs The interval (in seconds) the module waits while checking Workforce Authority for the user's approval or rejection of authentication. The minimum setting is 2

[arculix.user_mapping]

By default, the module assumes the user's Linux username matches their SecureAuth username. If they differ, administrators can include the SecureAuth username in the Linux comment field, which the module will use for authentication.

Use the following configuration options to enable this feature:

use_comment_field When set to true, enables the use of the comment field to map the username. The default value is false
comment_field_number The number indicating which sub field of the comment field should be used. The default is 1
comment_field_separator The character used to delimit the comment field into sub fields. The default is ,

[arculix.oauth]

When making API calls to our service, the module acquires an OAuth token from an OAuth authorization server and uses it to authenticate to our service.

Use the following configuration options to set a custom token URL and enable token caching:

token_url The URL where Workforce Authority will acquire the token. The token URL may point to SecureAuth's OIDC service, or any other OAuth authorization server you have provisioned.
cache_enable Enables the PAM to cache acquired tokens for reuse until expiration. The default is true

Test your setup

  1. Connect to your Linux machine via the console or SSH, or try to use su or sudo commands on your Linux box.

  2. After successful authentication, it prompts you to select your preferred Workforce Authority MFA method.

    Linux terminal listing the MFA methods to choose from

  3. Approve the authentication request in Workforce Authority Mobile.

    Push request in the Workforce Authority Mobile app for the Linux login

  4. You are now authenticated in Linux.

    Linux shell prompt after a successful authentication