Smart Card Authentication¶
Smart card authentication is supported for Linux Clients running on Ubuntu 22.04 connecting to Linux agents. The following section contains information on system requirements, limitations, agent setup, and client setup.
General Requirements¶
Component | Version | |
---|---|---|
Client |
|
25.03+ |
Agent |
|
25.03+ |
Infrastructure | (Required for brokered connections only)
|
Smart Card Certificate Requirements¶
The smart card certificate prerequisites are as follows:
-
Key usage is set to digital signature
-
The Subject common name and subject alternative name (other name) are defined
-
Enhanced key usage must include client authentication and/or smart card logon
-
Key length does not exceed 2048 bit
Tested Smart Card Readers¶
The following smart card readers have been tested:
-
Belkin USB Smart Card Reader (F1DN008U)
-
Identiv SCR3310 USB Contact Smart Card Reader
Tested Smart Card Models¶
The following smart card models have been tested:
Product Name | Type of Card | Notes |
---|---|---|
Gemalto TOP DL V2.1 144K FIPS | CAC | |
IDEMIA Cosmo v8.0 | Alternate token | |
IDEMIA ID-one 125 V8.0D | CAC | |
G+D Sm@rtCafe Expert v7.0 | CAC | |
G+D Sm@rtCafe Expert v7.0 144K DI | CAC | |
PIVkey C910 | PIV | |
PIVkey C980 | PIV | |
PIVkey C990 | PIV | |
Yubikey 5C | Using PIV interface. | |
Yubikey 5NFC | Using PIV interface. | |
Smart card verified and tested in customer environment | CoolKey applet | For accessing SIPRNet |
Note: Testing Smart Card Solutions
Solutions must be validated in user environments first, as environmental differences including network conditions or other components may impact support.
Notes¶
-
Smart Card authentication is enabled by modifying the
pcoip.enable_smart_card
directive, as described in Enabling Smartcard Authentication. -
At present, only simultaneous configuration of a single card and single reader is supported.
-
Smartcard authentication is only supported on Ubuntu 22.04 clients and Trusted Zero Clients connecting to Linux agents. It is not supported while connecting from Tera2 Zero Clients to Linux agents.
-
If available, configure the Linux Desktop Environment to use smart cards for lock screen authentication.
Known Limitations¶
-
Elliptic Curve Cryptography (ECC) Certificates are not supported.
-
Concurrent users cannot log on to agent machines using the same smart card for authentication.
-
Smart cards having multiple certificates allow only one user to log on at a time. Others users must wait until the current users logs off before attempting to log on.
-
Single sign-on is not supported. Users must authenticate twice: once on the client and again on the host machine's lock screen.
-
Session locking upon smart card removal might not work as expected.
-
Session will disconnect when authenticated smart card is removed from the reader.
-
If PCoIP sessions fail, disable SELINUX and re-establish a PCoIP session. If this does not work, contact the HP Support team.
-
If PIN prompts do not work on Linux Desktop Environments of agent machines, use the password to unlock the desktop. Smartcards will be remoted and available to be used in session.
Agent Setup¶
Note
Some card readers might require their drivers to be installed on the agent machine. Consult with the reader manual to determine whether you need to install the required drivers.
Prerequisites¶
- The host machine is domain-joined.
- If this is a brokered connection, make sure that you installed Leostream broker and Connection Manager.
- CA certificates for authenticating smart cards are available.
Step I: Prepare the Linux Machine¶
-
Connecting the machine directly to AD using SSSD. For more information, consult the following topics:
-
Enable smart card authentication on the Linux machine and configure smart card for lock screen. For more information, consult the following topics:
-
Install the Leostream agent on the Linux machine. For more information, see the Leostream® Platform Installation Guide.
Info
For common errors encountered during Leostream agent configuration, see the Leostream Install Errors article.
Example Steps to Prepare the Ubuntu Machine¶
Prepare the Ubuntu 22.04 Machine
Info
Assume your domain name as example.net
-
Sign in to the test machine, and run the following command:
sudo hostnamectl set-hostname <machine-name.example.net>
sudo reboot
Note
Modify the hostname of the test machine to include the domain name.
-
Verify that the hostname has been updated successfully.
hostnamectl
-
Install the required packages.
sudo apt -y install realmd sssd sssd-tools libnss-sss libpam-sss adcli samba-common-bin oddjob oddjob-mkhomedir packagekit
-
Join in Active Directory domain, replace SRV.WORLD with your domain name, and replace domain_join_user with your domain user that has permission to join the domain.
root@test:~# sudo realm join SRV.WORLD -U domain_join_user
Password for domain_join_user: # AD password
-
Verify that you can get AD user information.
root@test:~# id Serverworld@srv.world uid=1259201103(serverworld@srv.world) gid=1259200513(domain users@srv.world) groups=1259200513(domain users@srv.world),1259200512(domain admins@srv.world),1259200572(denied rodc password replication group@srv.world)
root@test:~# nano /etc/pam.d/common-session
-
To automatically create a home directory on initial login, add the following line at the end of Step 5:
session optional pam_mkhomedir.so skel=/etc/skel umask=077
-
Sign in to the console or an SSH session with a domain user account to verify that the domain joining was successful.
Enable Smart Card Authentication in Ubuntu 22.04 Machine
-
Install the PKCS#11 Driver for Your Smart Card:
-
Identify the PKCS#11 driver that supports your smart card device.
-
To install the OpenSC PKCS#11 driver, enter the following command:
sudo apt install opensc-pkcs11 -y
Note
If your device requires a different PKCS#11 driver, install the appropriate package instead.
-
-
Install PCSCD to enable the smart card reader.
sudo apt install pcscd -y
-
Extract the CA chain that signs the smart card user certificate, and include the CA certificates in the SSSD CA database.
sudo mkdir -p /etc/sssd/pki -m 600
sudo su cat test_ca_chain.pem >> /etc/sssd/pki/sssd_auth_ca_db.pem
-
Add pam_cert_auth = True to the
/etc/sssd/sssd.conf
file.[pam] pam_cert_auth = True
-
Add
certmap/<you_domain_name>/upn
section to the/etc/sssd/sssd.conf
file. Edit the/etc/sssd/sssd.conf
file and add the following section. Replace<your_domain_name>
with your actual domain name:[certmap/<you_domain_name>/upn] maprule=(|(userPrincipalName={subject_nt_principal})(samAccountName={subject_nt_principal.short_name}))
-
Restart the SSSD service.
sytemctl restart sssd
-
Check if the SSSD service is running.
systemctl status sssd
Example Steps to Prepare the Rocky Linux Machine¶
Prepare for Rocky Linux 8/9 Machine
Info
Assume your domain name as example.net
-
Log in to the test machine
-
Run the following command to modify the hostname of the test machine to include domain name:
sudo hostnamectl set-hostname <machine-name.example.net> sudo reboot
-
Run the following command to verify that the hostname has been update successfully
hostnamectl
-
Install required packages for domain joining
sudo yum install samba-common-tools realmd oddjob oddjob-mkhomedir sssd adcli krb5-workstation -y realm discover example.net sudo realm join example.net -U <domain admin that has permission to join domain>
-
Run the following command to check if domain join works:
getent passwd <domain user name>
-
Verify with the following command if the domain user could access the machine:
ssh domain_user@example.net@machine_ip_address
Note
If ssh session failed, check system log for any errors
Enable Smart Card Authentication in Rocky Linux 8/9 Machine
-
Run the following commands to fix
failed to verify CMS error
:sudo update-crypto-policies --set DEFAULT:SHA1 sudo reboot sudo dnf install opensc gnutls-utils krb5-pkinit -y
Info
-
Use
sudo update-crypto-policies --set DEFAULT:SHA1
andsudo reboot
only on RHEL/Rocky Linux 9. Usesudo dnf install opensc gnutls-utils krb5-pkinit -y
on RHEL/Rocky Linux 8 and 9. -
This is required for RHEL or Rocky Linux 9, to fix
failed to verify CMS error
. For more information refer to Red Hat Bugzilla - Bug 2060798.
-
-
Add the following to
/etc/krb5.conf
in [libdefaults] section:pkinit_kdc_hostname = example.net
Note
For more information, refer to MIT Kerberos Documentation.
-
Add or modify the following configuration in
/etc/sssd/sssd.conf
file:[domain/example.net]
Adjust this setting if DoD CAC card does not work in the test environment:
krb5_auth_timeout = 30
-
Get CA chain that signs the smart card user certificate. Ensure that the CA chain is in
pem
format. -
Assume the smart card user cert is signed by Ca-Auth-root-CERT.pem and Ca-Auth-leaf-CERT.pem.
-
Include the CA certificates in the SSSD CA database
sudo mkdir -p /etc/sssd/pki -m 600 (Create /etc/sssd/pki if it does not exist) sudo su cat Ca-Auth-root-CERT.pem Ca-Auth-leaf-CERT.pem >> /etc/sssd/pki/sssd_auth_ca_db.pem
-
Add the CA chain to the system's trust anchors
sudo trust anchor /etc/sssd/pki/sssd_auth_ca_db.pem
-
Run the following command to restart SSSD to apply changes:
sudo systemctl restart sssd
-
Allow both smart card and password authentication with the following command:
sudo authselect select sssd with-smartcard --force
Step II: Install and Configure Anyware Agent¶
-
Make sure that you downloaded Anyware Agent 25.03 or later to the remote machine.
-
Install the agent following instructions in Installing the agent
-
Enable smart card authentication on the agent:
-
Navigate to
/etc/pcoip/
. -
Open the
pcoip-agent.conf
file. -
Locate the
pcoip.enable_smart_card
directive. -
Set its value to "1".
-
Save your changes.
-
Add root and intermediate CA certificates to the agent's trusted certificate store:
-
Ubuntu - using
update-ca-certificates
, see Install a PEM-format certificate. -
RHEL/Rocky - using
update-ca-trust
, see Adding new certificates.
-
-
Add the following setting to the domain section in the sssd.conf file, available at the following location: /etc/sssd/
For example:
[domain/example.net] ad_gpo_map_permit = +pcoip-session
-
Restart the PCoIP Agent service by running the following command:
systemctl restart pcoip
Note
The following steps 9 to 17 are only applicable for Ubunutu 22.04.
-
Ensure that smart card is showing in the lock screen. Create a user file in the
/etc/dconf/profile
.cat << EOF | sudo tee -a /etc/dconf/profile/user user-db:user system-db:local EOF
-
Create the
local.d
directory.sudo mkdir -p /etc/dconf/db/local.d
-
Disable the password authentication.
cat << EOF | sudo tee -a /etc/dconf/db/local.d/00_gdm-password-disable [org/gnome/login-screen] enable-password-authentication=false EOF
-
Enable the smart card authentication.
cat << EOF | sudo tee -a /etc/dconf/db/local.d/00_gdm-smartcard-enable [org/gnome/login-screen] enable-smartcard-authentication=true EOF
-
Create the locks directory.
sudo mkdir -p /etc/dconf/db/local.d/locks
-
Make enable-password-authentication and enable-smartcard-authentication non-user configurable. Add the following lines to the locks directory to prevent users from changing these settings:
cat << EOF | sudo tee -a /etc/dconf/db/local.d/locks/00_gdm-smartcard-locks
-
Make these options non-user configurable:
/org/gnome/login-screen/enable-password-authentication /org/gnome/login-screen/enable-smartcard-authentication EOF
-
To update the system dconf database after making changes, run the following command:
sudo dconf update
-
Restart the machine.
sudo reboot
-
Client Setup¶
-
Download Anyware Linux Client version 25.03 or later on the Ubuntu 22.04 client machine.
-
Configure the client machine to connect to the agent machine. Follow the instructions in the topic "Connecting to an Agent Machine " in the Anyware Linux Client guide.
-
Plug the smart card reader into the client machine.
-
Use your smart card to authenticate the session. For a full set of instructions on using smart cards to authenticate PCoIP sessions, consult "Using Smart Card Authentication to Connect to a Session" in the Anyware Linux Client guide.
Configuring Smartcard Removal Behavior¶
This policy determines the action to be taken when the smart card used to authenticate the session is removed from the card reader, or the card reader is disconnected.
Info
If the smart card removal behavior is not configured, removing the card will disconnect the session.
-
On the agent machine, navigate to
/etc/pcoip/
. -
Open the
pcoip-agent.conf
file. -
Set the
smart_card_removal_behavior
directive to configure the smart card removal behavior:-
To disconnect session on smart card removal (default behavior), set
pcoip.smart_card_removal_behavior
to "1". -
To take no action on removal of smart card, set
pcoip.smart_card_removal_behavior
to "0".
-
-
Restart the system.
Disabling Smart Card Support¶
-
On the agent machine, navigate to
/etc/pcoip/
. -
Open the
pcoip-agent.conf
file. -
Set the
pcoip.enable_smart_card
directive to "0". -
Save your changes.
-
Reboot the agent machine.
Troubleshooting Issues¶
For higher latency networks where the latency between the client and host is higher than 100 milliseconds, authentication using smart cards on lock screen may fail.
This occurs because an SSSD component called p11_child
times out before the pin gets validated. To workaround this issue,
increase the SSSD p11_child time-out
by making these changes in the /etc/sssd/sssd.conf
file:
-
In the [pam] section, increase the p11_child_timeout value to 60 seconds.
-
Restart SSSD service.
systemctl restart sssd.service
Reporting Issues¶
To report issues with this feature, enable additional debugging capabilities before creating a support bundle as below:
-
On the host machine, uncomment the following line from the /etc/default/pcoip-pcscd-args file:
PCSCD_ARGS=–debug
-
Save your changes.
-
Reproduce the issue.
-
Generate support bundle and send it to the HP Anyware support team.