Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (1611 KB)
Chapter 23 SEAM ReferenceThis chapter includes information on getting, viewing and destroying tickets and choosing or changing a Kerberos password on a system running SEAM. In addition, this chapter lists many of the SEAM product files. Also, a more detailed description of how the Kerberos authentication system works is provided. Ticket ManagementThis section explains how to obtain, view, and destroy tickets. For an introduction to tickets, see "How SEAM Works". Do You Need to Worry About Tickets?PAM can be set up to automatically get tickets when you log in. It is possible that your SEAM configuration does not include this automatic forwarding of tickets, but it is the default behavior. Most of the Kerberized commands also automatically destroy your tickets when they exit. However, you might want to explicitly destroy your Kerberos tickets with kdestroy when you are through with them, just to be sure. See "How to Destroy Tickets" for more information on kdestroy. For information on ticket lifetimes, see "Ticket Lifetimes". How to Create a TicketNormally a ticket is created automatically when you log in and you need not do anything special to obtain one. However, you might need to create a ticket in the following cases:
To create a ticket, use the kinit command.
kinit prompts you for your password. For the full syntax of the kinit command, see the kinit(1) man page. Example--Creating a TicketThis example shows a user, jennifer, creating a ticket on her own system.
Here the user david creates a ticket good for three hours with the -l option.
This example shows david creating a forwardable ticket (with -f) for himself. With this forwardable ticket, he can (for example) log in to a second system, and then telnet to a third system.
For more on how forwarding tickets works, see "Types of Tickets". How to View TicketsNot all tickets are alike. One ticket might be, for example, forwardable; another might be postdated; while a third might be both. You can see which tickets you have, and what their attributes are, by using the klist command with the -f option:
The following symbols indicate the attributes associated with each ticket, as displayed by klist:
"Types of Tickets" describes the various attributes a ticket can have. Example--Viewing TicketsThis example shows that the user jennifer has an initial ticket, which is forwardable (F) and postdated (d), but not yet validated (i).
The example below shows that the user david has two tickets that were forwarded (f) to his host from another host. The tickets are also (re)forwardable (F):
How to Destroy TicketsTickets are generally destroyed automatically when the commands that created them exit; however, you might want to explicitly destroy your Kerberos tickets when you are through with them, just to be sure. Tickets can be stolen, and if this happens, the person who has them can use them until they expire (although stolen tickets must be decrypted). To destroy your tickets, use the kdestroy command.
kdestroy destroys all your tickets. You cannot use it to selectively destroy a particular ticket. If you are going to be away from your system and are concerned about an intruder using your permissions, you should either use kdestroy or a screensaver that locks the screen. Note - One way to help ensure that tickets are always destroyed is to add the kdestroy command to the .logout file in your home directory. In cases where the PAM module has been configured, tickets are destroyed automatically upon logout, so adding a call to kdestroy to your .login file is not necessary. However, if the PAM module has not been configured, or if you don't know whether it has or not, you might want to add kdestroy to your .login file to be sure that tickets are destroyed when you exit your system. Password ManagementWith SEAM installed, you now have two passwords: your regular Solaris password, and a Kerberos password. You can make both passwords the same or they can be different. Non-Kerberized commands, such as login, can be set up through PAM to authenticate with both Kerberos and UNIX. If you have different passwords, you must provide both passwords to log on with the appropriate authentication. However, if both passwords are the same, the first password you enter for UNIX is also accepted by Kerberos. Unfortunately, using the same password for both can compromise security. That is, if someone discovers your Kerberos password, then your UNIX password is no longer a secret. However, using the same passwords for UNIX and Kerberos is still more secure than a site without Kerberos, because passwords in a Kerberos environment are not sent across the network. Usually, your site will have a policy to help you determine your options. Your Kerberos password is the only way Kerberos has of verifying your identity. If someone discovers your Kerberos password, Kerberos security becomes meaningless, for that person can masquerade as you -- send email that comes from "you," read, edit, or delete your files, or log into other hosts as you -- and no one will be able to tell the difference. For this reason, it is vital that you choose a good password and keep it secret. You should never reveal your password to anyone else, not even your system administrator. Additionally, you should change your password frequently, particularly any time you believe someone might have discovered it. Advice on Choosing a PasswordYour password can include almost any character you can type (the main exceptions being control keys and the Return key). A good password is one that you can remember readily, but which no one else can easily guess. Examples of bad passwords include:
A good password is at least eight characters long. Moreover, a password should include a mix of characters, such as upper- and lower-case letters, numbers, and punctuation marks. Examples of passwords that would be good if they didn't appear in this manual include:
Don't use these examples. Passwords that appear in manuals are the first ones an intruder will try. Changing Your PasswordYou can change your Kerberos password in two ways:
Using kpasswd requires the use of the SEAM 1.0 administration system which is included in the SEAS 3.0 release. In addition, privacy support must be loaded to protect the requests to change the password. After you change your password, it takes some time for the change to propagate through a system (especially over a large network). Depending on how your system is set up, this might be anywhere from a few minutes to an hour or more. If you need to get new Kerberos tickets shortly after changing your password, try the new password first. If the new password doesn't work, try again using the old one. Kerberos V5 allows system administrators to set criteria about allowable passwords for each user. Such criteria is defined by the policy set for each user (or by a default policy)-- see XREF for more on policies. For example, suppose that jennifer's policy (call it jenpol) mandates that passwords be at least eight letters long and include a mix of at least two kinds of characters. kpasswd will therefore reject an attempt to use sloth as a password:
Here jennifer uses slothrop49 as a password. slothrop49 meets the criteria, because it is over eight letters long and contains two different kinds of characters (numbers and lowercase letters):
Examples--Changing Your PasswordThe following example shows david changing both his UNIX and Kerberos passwords with passwd.
In the above example passwd asks for both the UNIX and Kerberos password; however, if try_first_pass is set in the PAM module, the Kerberos password is automatically set to be the same as the UNIX password. (That is the default configuration.) In that case, david must use kpasswd to set his Kerberos password to something else, as shown next. This example shows him changing only his Kerberos password with kpasswd:
In this example, david changes the password for the Kerberos principal david/admin (which is not a valid UNIX user). To do this he must use kpasswd.
SEAM FilesThis section lists the files included in the SEAM product. Table 23-1 SEAM Files
PAM Configuration FileThe default PAM configuration file delivered with SEAM includes commented out entries to use the Kerberos capabilities. The new file includes entries for the authentication service, account management, session management, and password management modules. For the authentication module, the new entries are for rlogin, login, and dtlogin. An example of these entries is shown below. All of these services use the new PAM library, /usr/lib/security/pam_krb5.so.1, to provide Kerberos authentication. The first three entries employ the try_first_pass option, which requests authentication using the user's initial password. Using the initial password means that the user is not prompted for another password even if multiple mechanisms are listed. An other entry is included as the default entry for all entries requiring authentication that are not specified.
For the account management, dtlogin has a new entry that uses the Kerberos library, as shown below. An other entry is included to provide a default rule. Currently no actions are taken by the other entry.
The last two entries in the /etc/pam.conf file are shown below. The other entry for session management destroys user credentials. The new other entry for password management selects the Kerberos library.
SEAM CommandsThis section lists some of the commands included in the SEAM product. Table 23-2 SEAM Commands
Changes to the share CommandIn addition to the new SEAM commands, the Solaris 8 release includes new security flavors to be used with the share command. These modes are defined in the /etc/nfssec.conf file. These new security modes can be used by the share command:
When multiple modes are included with the share command, the first mode listed is used by default if the client does not specify a security mode. Otherwise, the mode that the client selected is used. If a mount request using a Kerberos mode fails, the mount completes using none as the security mode. This often occurs when the root principal on the NFS client is not authenticated. The mount request might succeed, but the user will be unable to access the files unless they are authenticated through Kerberos. Any transactions between the client and the server require Kerberos authentication, even if the file system is not mounted using a Kerberos security mode. SEAM DaemonsThe daemons that are used by the SEAM product are listed in the following table. Table 23-3 SEAM Daemons
Ticket ReferenceThe following section presents additional information about tickets. Types of TicketsTickets have properties that govern how they can be used. These properties are assigned to the ticket when it is created, although you can modify a ticket's properties later. (For example, a ticket can change from forwardable to forwarded.) You can view ticket properties with the klist command (see "How to View Tickets"). Tickets can be described by one or more of the following terms:
For information on how to view tickets to see what their attributes are, see "How to View Tickets". Ticket LifetimesAny time a principal obtains a ticket, including a ticket-granting ticket, the ticket's lifetime is set as the smallest of the following lifetime values:
The following figure shows how a TGT's lifetime is determined and illustrates where the four lifetime values come from. Even though the figure shows how a TGT's lifetime is determined, basically the same thing happens when any principal obtains a ticket. The only differences are that kinit doesn't provide a lifetime value, and the service principal providing the ticket provides a maximum lifetime value (instead of the krbtgt/realm principal). Figure 23-1 How a TGT's Lifetime Is Determined
The renewable ticket lifetime is also determined from the minimum of four values, but renewable lifetime values are used instead:
Principal NamesEach ticket is identified by a principal name. The principal name can identify a user or a service. Here are examples of several of the principal names. Table 23-4 Examples of Principal Names
How the Authentication System WorksApplications allow you to log on to a remote system if you can provide a ticket that proves your identity and a matching session key. The session key contains information that is specific to the user and the service being accessed. A ticket and session key are created by the KDC for all users when they first log in. The ticket and matching session key form a credential. While using multiple networking services, a user can gather many credentials. The user needs to have a credential for each service running on a particular server. For instance, access to the ftp service on a server named boston requires one credential, and access to the ftp service on another server requires its own credential. The process of creating and storing the credentials is transparent. Credentials are created by the KDC that sends the credential to the requestor. When received, the credential is stored in a credential cache. Gaining Access to a Service Using SEAMIn order for a user to access a specific service on a specific server, the user must obtain two things. The first is a credential for the ticket-granting service (known as the TGT). Once the ticket-granting service has decrypted this credential, the service creates a second credential for the server for which the user requests access. This second credential can then be used to request access to the service on the server. After the server has successfully decrypted the second credential, the user is given access. This process is described in more detail below, and in the figures that follow. Obtaining a Credential for the Ticket-Granting Service
Normally during this process, a user is prompted for a password. If the password entered is the same as the one used to build the private key stored in the KDC database, then the client can successfully decrypt the information sent by the authentication service. Now the client has a credential to be used with the ticket-granting service. The client is ready to request a credential for a server. Figure 23-2 Obtaining a Credential for the Ticket-Granting Service
Obtaining a Credential for a Server
Figure 23-3 Obtaining a Credential for a Server
Obtaining Access to a Specific Service
Figure 23-4 Obtaining Access to a Specific Service
Using the gsscred TableThe gsscred table is used by an NFS server when the server is trying to identify a SEAM user. The NFS services use UNIX IDs to identify users and these IDs are not part of a user principal or credential. The gsscred table provides a mapping from UNIX UIDs (from the password file) to principal names. The table must be created and administered after the KDC database is populated. When a client request comes in, the NFS services try to map the principal name to a UNIX ID. If the mapping fails, the gsscred table is consulted. With the kerberos_v5 mechanism, a root/hostname principal is automatically mapped to UID 0, and the gsscred table is not consulted. This means that there is no way to do special remappings of root through the gsscred table. Which Mechanism to Select for the gsscred TableChoosing the correct mechanism for the gsscred table depends on several factors.
This is a list of all of the back-end mechanisms that can be selected along with a description of advantages of the mechanism.
For the files back-end mechanism, the initial lookup can be slow. For the other mechanisms, the initial lookup can be faster using a name service. For all of the mechanisms, after the data is cached the retrieval time should be about the same. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||