5.4. Enabling passwordless sudo authentication for smart-card users
You can configure passwordless authentication to sudo and other services for smart card users in the web console.
As an alternative, if you use RHEL Identity Management, you can declare the initial web console certificate authentication as trusted for authenticating to sudo, SSH, or other services. For that purpose, the web console automatically creates an S4U2Proxy Kerberos ticket in the user session.
Prerequisites
- Identity Management is installed.
- Active Directory connected in the cross-forest trust with Identity Management.
- Your smart card is set up to log in to the web console. See Configuring smart card authentication with the web console for centrally managed users for more information.
Procedure
Set up constraint delegation rules to list which hosts the ticket can access.
예 5.1. Setting up constraint delegation rules
The web console session runs host
host.example.comand should be trusted to access its own host withsudo. Additionally, we are adding second trusted host -remote.example.com.Create the following delegation:
Run the following commands to add a list of target machines a particular rule can access:
# ipa servicedelegationtarget-add cockpit-target # ipa servicedelegationtarget-add-member cockpit-target \ --principals=host/host.example.com@EXAMPLE.COM \ --principals=host/remote.example.com@EXAMPLE.COMTo allow the web console sessions (HTTP/principal) to access that host list, use the following commands:
# ipa servicedelegationrule-add cockpit-delegation # ipa servicedelegationrule-add-member cockpit-delegation \ --principals=HTTP/host.example.com@EXAMPLE.COM # ipa servicedelegationrule-add-target cockpit-delegation \ --servicedelegationtargets=cockpit-target
Enable GSS authentication in the corresponding services:
For sudo, enable the
pam_sss_gssmodule in the/etc/sssd/sssd.conffile:As root, add an entry for your domain to the
/etc/sssd/sssd.confconfiguration file.[domain/example.com] pam_gssapi_services = sudo, sudo-iEnable the module in the
/etc/pam.d/sudofile on the first line.auth sufficient pam_sss_gss.so
-
For SSH, update the
GSSAPIAuthenticationoption in the/etc/ssh/sshd_configfile toyes.
The delegated S4U ticket is not forwarded to remote SSH hosts when connecting to them from the web console. Authenticating to sudo on a remote host with your ticket will not work.
Verification
- Log in to the web console using a smart card.
-
Click the
Limited accessbutton. - Authenticate using your smart card.
Alternatively:
- Try to connect to a different host with SSH.