42.3. Single Sign-on (SSO)

The Red Hat Enterprise Linux SSO functionality reduces the number of times Red Hat Enterprise Linux desktop users have to enter their passwords. Several major applications leverage the same underlying authentication and authorization mechanisms so that users can log in to Red Hat Enterprise Linux from the log-in screen, and then not need to re-enter their passwords. These applications are detailed below.

In addition, users can log in to their machines even when there is no network (offline mode) or where network connectivity is unreliable, for example, wireless access. In the latter case, services will degrade gracefully.

Before you can use your smart card to log in to your system and take advantage of the increased security options this technology provides, you need to perform some basic installation and configuration steps. These are described below.

Note

This section provides a high-level view of getting started with your smart card. More detailed information is available in the Red Hat Certificate System Enterprise Security Client Guide.

  1. Log in with your Kerberos name and password

  2. Make sure you have the nss-tools package loaded.

  3. Download and install your corporate-specific root certificates. Use the following command to install the root CA certificate:

    certutil -A -d /etc/pki/nssdb -n "root ca cert" -t "CT,C,C" -i ./ca_cert_in_base64_format.crt
    
  4. Verify that you have the following RPMs installed on your system: esc, pam_pkcs11, coolkey, ifd-egate, ccid, gdm, authconfig, and authconfig-gtk.

  5. Enable Smart Card Login Support

    1. On the Gnome Title Bar, select System->Administration->Authentication.

    2. Type your machine's root password if necessary.

    3. In the Authentication Configuration dialog, click the Authentication tab.

    4. Select the Enable Smart Card Support check box.

    5. Click the Configure Smart Card... button to display the Smartcard Settings dialog, and specify the required settings:

      • Require smart card for login — Clear this check box. After you have successfully logged in with the smart card you can select this option to prevent users from logging in without a smart card.

      • Card Removal Action — This controls what happens when you remove the smart card after you have logged in. The available options are:

        • Lock — Removing the smart card locks the X screen.

        • Ignore — Removing the smart card has no effect.

  6. If you need to enable the Online Certificate Status Protocol (OCSP), open the /etc/pam_pkcs11/pam_pkcs11.conf file, and locate the following line:

    enable_ocsp = false;

    Change this value to true, as follows:

    enable_ocsp = true;

  7. Enroll your smart card

  8. If you are using a CAC card, you also need to perform the following steps:

    1. Change to the root account and create a file called /etc/pam_pkcs11/cn_map.

    2. Add the following entry to the cn_map file:

      MY.CAC_CN.123454 -> myloginid

      where MY.CAC_CN.123454 is the Common Name on your CAC and myloginid is your UNIX login ID.

  9. Logout

You can configure Firefox to use Kerberos for Single Sign-on. In order for this functionality to work correctly, you need to configure your web browser to send your Kerberos credentials to the appropriate KDC.The following section describes the configuration changes and other requirements to achieve this.

  1. In the address bar of Firefox, type about:config to display the list of current configuration options.

  2. In the Filter field, type negotiate to restrict the list of options.

  3. Double-click the network.negotiate-auth.trusted-uris entry to display the Enter string value dialog box.

  4. Enter the name of the domain against which you want to authenticate, for example, .example.com.

  5. Repeat the above procedure for the network.negotiate-auth.delegation-uris entry, using the same domain.

    Note

    You can leave this value blank, as it allows Kerberos ticket passing, which is not required.

    If you do not see these two configuration options listed, your version of Firefox may be too old to support Negotiate authentication, and you should consider upgrading.

Figure 42.6. Configuring Firefox for SSO with Kerberos

You now need to ensure that you have Kerberos tickets. In a command shell, type kinit to retrieve Kerberos tickets. To display the list of available tickets, type klist. The following shows an example output from these commands:

[user@host ~] $ kinit
Password for user@EXAMPLE.COM:

[user@host ~] $ klist
Ticket cache: FILE:/tmp/krb5cc_10920
Default principal: user@EXAMPLE.COM

Valid starting     Expires            Service principal
10/26/06 23:47:54  10/27/06 09:47:54  krbtgt/USER.COM@USER.COM
        renew until 10/26/06 23:47:54

Kerberos 4 ticket cache: /tmp/tkt10920
klist: You have no tickets cached

If you have followed the configuration steps above and Negotiate authentication is not working, you can turn on verbose logging of the authentication process. This could help you find the cause of the problem. To enable verbose logging, use the following procedure:

  1. Close all instances of Firefox.

  2. Open a command shell, and enter the following commands:

    export NSPR_LOG_MODULES=negotiateauth:5
    export NSPR_LOG_FILE=/tmp/moz.log
    
  3. Restart Firefox from that shell, and visit the website you were unable to authenticate to earlier. Information will be logged to /tmp/moz.log, and may give a clue to the problem. For example:

    -1208550944[90039d0]: entering nsNegotiateAuth::GetNextToken()
    -1208550944[90039d0]: gss_init_sec_context() failed: Miscellaneous failure
    No credentials cache found
    

    This indicates that you do not have Kerberos tickets, and need to run kinit.

If you are able to run kinit successfully from your machine but you are unable to authenticate, you might see something like this in the log file:

-1208994096[8d683d8]: entering nsAuthGSSAPI::GetNextToken()
-1208994096[8d683d8]: gss_init_sec_context() failed: Miscellaneous failure
Server not found in Kerberos database

This generally indicates a Kerberos configuration problem. Make sure that you have the correct entries in the [domain_realm] section of the /etc/krb5.conf file. For example:

.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM

If nothing appears in the log it is possible that you are behind a proxy, and that proxy is stripping off the HTTP headers required for Negotiate authentication. As a workaround, you can try to connect to the server using HTTPS instead, which allows the request to pass through unmodified. Then proceed to debug using the log file, as described above.