Questo contenuto non è disponibile nella lingua selezionata.
Chapter 6. Logging in to IdM in the Web UI: Using a Kerberos ticket
Authenticate to the Identity Management (IdM) Web UI automatically with a valid Kerberos ticket from a local system. You can use the single sign-on (SSO) method to access the graphical interface without entering a password in the browser.
6.1. Kerberos authentication in Identity Management Copia collegamentoCollegamento copiato negli appunti!
Identity Management (IdM) uses the Kerberos protocol to support single sign-on (SSO). You can use SSO to provide a username and password only once to obtain a ticket.
The IdM server provides Kerberos authentication immediately after the installation if the DNS and certificate settings have been configured properly. For details, see Installing Identity Management.
To use Kerberos authentication on hosts, install:
The IdM client:
For details, see Preparing the system for IdM client installation.
-
The
krb5confpackage.
6.2. Using kinit to log in to IdM manually Copia collegamentoCollegamento copiato negli appunti!
Authenticate to an Identity Management (IdM) environment manually by using the kinit utility. You can use this utility to obtain and cache a Kerberos ticket-granting ticket (TGT) if your initial ticket has expired or was destroyed.
As an IdM user, when logging onto your local machine you are also automatically logging in to IdM. This means that after logging in, you are not required to use the kinit utility to access IdM resources.
Procedure
To authenticate as the current local user, use
kinitwithout specifying a user name. For example, if you are logged in as<example_user>on the local system:kinit
[example_user@server ~]$ kinitCopy to Clipboard Copied! Toggle word wrap Toggle overflow Password for example_user@EXAMPLE.COM: [example_user@server ~]$
Password for example_user@EXAMPLE.COM: [example_user@server ~]$Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the user name of the local user does not match any user entry in IdM, the authentication attempt fails:
kinit
[example_user@server ~]$ kinitCopy to Clipboard Copied! Toggle word wrap Toggle overflow kinit: Client 'example_user@EXAMPLE.COM' not found in Kerberos database while getting initial credentials
kinit: Client 'example_user@EXAMPLE.COM' not found in Kerberos database while getting initial credentialsCopy to Clipboard Copied! Toggle word wrap Toggle overflow To authenticate as a different IdM principal, specify the username with the
kinitcommand. For example, to log in as theadminuser:kinit admin
[example_user@server ~]$ kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow Password for admin@EXAMPLE.COM: [example_user@server ~]$
Password for admin@EXAMPLE.COM: [example_user@server ~]$Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteRequesting user tickets using
kinit -kt KDB: user@EXAMPLE.COMis disabled. For more information, see the Why kinit -kt KDB: user@EXAMPLE.COM no longer work after CVE-2024-3183 solution.
Verification
To verify that the login was successful, use the
klistutility to display the cached TGT. In the following example, the cache contains a ticket for the<example_user>principal, which means that on this particular host, only<example_user>is currently allowed to access IdM services:klist
$ klistCopy to Clipboard Copied! Toggle word wrap Toggle overflow Ticket cache: KEYRING:persistent:0:0 Default principal: example_user@EXAMPLE.COM Valid starting Expires Service principal 11/10/2019 08:35:45 11/10/2019 18:35:45 krbtgt/EXAMPLE.COM@EXAMPLE.COM
Ticket cache: KEYRING:persistent:0:0 Default principal: example_user@EXAMPLE.COM Valid starting Expires Service principal 11/10/2019 08:35:45 11/10/2019 18:35:45 krbtgt/EXAMPLE.COM@EXAMPLE.COMCopy to Clipboard Copied! Toggle word wrap Toggle overflow
6.3. Configuring the browser for Kerberos authentication Copia collegamentoCollegamento copiato negli appunti!
Prepare your web browser for Kerberos authentication to the Identity Management (IdM) server. You can use this configuration to pass your local Kerberos ticket to the Web UI for automatic, single sign-on (SSO) access. Proper browser settings ensure that the system recognizes the IdM domain as a trusted source for credential exchange.
Each browser supports Kerberos in a different way and needs a different configuration. The IdM Web UI includes guidelines for the following browsers:
- Firefox
- Chrome
Procedure
- Open the IdM Web UI login dialog in your web browser.
Click the link for the browser configuration on the Web UI login screen.
Follow the steps on the configuration page.
After the setup, go back to the IdM Web UI and click Log in.
6.4. Logging in to the web UI using a Kerberos ticket Copia collegamentoCollegamento copiato negli appunti!
Access the Identity Management (IdM) Web UI automatically by using a Kerberos ticket-granting ticket (TGT). The TGT remains valid for a predefined interval, which defaults to 24 hours. You can modify this duration in the IdM Web UI configuration settings.
After the time interval expires, you need to renew the ticket:
-
Using the
kinitcommand. - Using IdM login credentials in the Web UI login dialog.
Procedure
Open the IdM Web UI.
If Kerberos authentication works correctly and you have a valid ticket, you can automatically authenticate and the Web UI opens.
If the ticket is expired, you must authenticate yourself with credentials first. However, next time the IdM Web UI will open automatically without opening the login dialog.
If you see an error message
Authentication with Kerberos failed, verify that your browser is configured for Kerberos authentication. See Configuring the browser for Kerberos authentication.
6.5. Configuring an external system for Kerberos authentication Copia collegamentoCollegamento copiato negli appunti!
Configure an external system that is not enrolled in the Identity Management (IdM) domain to support Kerberos authentication. By defining an IdM-specific Kerberos configuration file and setting the KRB5_CONFIG environment variable, users on external systems can authenticate against the IdM server and obtain Kerberos tickets.
Enabling Kerberos authentication on external systems is especially useful when your infrastructure includes multiple realms or overlapping domains. It is also useful if the system has not been enrolled into any IdM domain through ipa-client-install.
Prerequisites
The
krb5-workstationpackage is installed on the external system. To verify the installation, use the following CLI command:dnf list installed krb5-workstation
# dnf list installed krb5-workstationCopy to Clipboard Copied! Toggle word wrap Toggle overflow Installed Packages krb5-workstation.x86_64 1.16.1-19.el8 @BaseOS
Installed Packages krb5-workstation.x86_64 1.16.1-19.el8 @BaseOSCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure
Copy the
/etc/krb5.conffile from the IdM server to the external system. For example:scp /etc/krb5.conf root@externalsystem.example.com:/etc/krb5_ipa.conf
# scp /etc/krb5.conf root@externalsystem.example.com:/etc/krb5_ipa.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow WarningDo not overwrite the existing
krb5.conffile on the external system.On the external system, set the terminal session to use the copied IdM Kerberos configuration file:
export KRB5_CONFIG=/etc/krb5_ipa.conf
$ export KRB5_CONFIG=/etc/krb5_ipa.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
KRB5_CONFIGvariable exists only temporarily until you log out. To prevent this loss, export the variable with a different file name.-
Copy the Kerberos configuration snippets from the
/etc/krb5.conf.d/directory to the external system. Configure the browser on the external system, as described in Configuring the browser for Kerberos authentication.
Users on the external system can now use the
kinitutility to authenticate against the IdM server.
6.6. Enabling Web UI login for Active Directory users Copia collegamentoCollegamento copiato negli appunti!
Configure the Identity Management (IdM) Web UI to verify Active Directory (AD) user credentials through a cross-forest trust to maintain a single source of identity.
To enable Web UI login for Active Directory users, define an ID override for each Active Directory user in the Default Trust View.
Procedure
To define an ID override for
ad_user@ad.example.com:ipa idoverrideuser-add 'Default Trust View' ad_user@ad.example.com
[admin@server ~]$ ipa idoverrideuser-add 'Default Trust View' ad_user@ad.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow