Authentication


The first security portal most users must pass through on their way to gaining access to a DB2 instance or database is a process known as authentication. The purpose of authentication is to verify that users really are who they say they are. Normally, authentication is performed by an external security facility that is not part of DB2. This security facility may be part of the operating system (as is the case with AIX, Solaris, Linux, HP-UX, Windows 2000/NT, and many others), may be a separate add-on product (for example, Distributed Computing Environment [DCE] Security Services), or may not exist at all (which is the case with Windows 95, Windows 98, and Windows Millennium Edition). If a security facility does exist, it must be presented with two specific items before a user can be authenticated: a unique user ID and a corresponding password. The user ID identifies the user to the security facility, while the password, which is information that is known only by both the user and the security facility, is used to verify that the user is indeed who he or she claims to be.

Tip 

Because passwords are a very important tool for authenticating users, you should always require passwords at the operating system level if you want the operating system to perform the authentication for your database. Keep in mind that on most UNIX operating systems, undefined passwords are treated as NULL, and any user who has not been assigned a password will be treated as having a NULL password. From the operating system's perspective, if no password is provided when a user attempts to log on, this will evaluate to being a valid match.

Where Does Authentication Take Place?

Because DB2 can reside in environments comprised of multiple clients, gateways, and servers, each of which may be running on a different operating system, deciding where authentication is to take place can be a daunting task. To simplify things, DB2 uses a parameter in each DB2 Database Manager configuration file (such a file is associated with every instance) to determine how and where users are authenticated. The value assigned to this configuration parameter, often referred to as the authentication type, is set initially when an instance is created. (On the server side, the authentication type is specified during the instance creation process; on the client side, the authentication type is specified when a remote database is cataloged.) Only one authentication type exists for each instance, and it controls access to that instance, as well as to all databases that fall under that instance's control.

With DB2 9, the following authentication types are available:

  • SERVER: Authentication occurs at the server workstation, using the security facility provided by the server's operating system. (The user ID and password provided by the user wishing to attach to an instance or connect to a database are compared to the user ID and password combinations stored at the server to determine whether the user is permitted to access the instance or database.) By default, this is the authentication type used when an instance is first created.

  • SERVER_ENCRYPT: Authentication occurs at the server workstation, using the security facility that is provided by the server's operating system. However, the password provided by the user wishing to attach to an instance or connect to a database stored on the server may be encrypted at the client workstation before it is sent to the server workstation for validation.

  • CLIENT: Authentication occurs at the client workstation or database partition where a client application is invoked, using the security facility that is provided by the client's operating system, assuming one is available. If no security facility is available, authentication is handled in a slightly different manner. The user ID and password provided by the user wishing to attach to an instance or connect to a database are compared to the user ID and password combinations stored at the client or node to determine whether the user is permitted to access the instance or the database.

  • KERBEROS: Authentication occurs at the server workstation, using a security facility that supports the Kerberos security protocol. This protocol performs authentication as a third-party service by using conventional cryptography to create a shared secret key. The key becomes the credentials used to verify the identity of the user whenever local or network services are requested; this eliminates the need to pass a user ID and password across the network as ASCII text. (If both the client and the server support the Kerberos security protocol, the user ID and password provided by the user wishing to attach to an instance or connect to a database are encrypted at the client workstation and sent to the server for validation.) It should be noted that the KERBEROS authentication type is supported only on clients and servers that are using the Windows 2000, Windows XP, or Windows .NET operating system. In addition, both client and server workstations must either belong to the same Windows domain or belong to trusted domains.

  • KRB_SERVER_ENCRYPT: Authentication occurs at the server workstation, using either the KERBEROS or the SERVER_ENCRYPT authentication method. If the client's authentication type is set to KERBEROS, authentication is performed at the server using the Kerberos security system. On the other hand, if the client's authentication type is set to anything other than KERBEROS or if the Kerberos authentication service is unavailable, the server acts as if the SERVER_ENCRYPT authentication type was specified, and the rules of this authentication method apply.

  • DATA_ENCRYPT: Authentication occurs at the server workstation, using the SERVER_ENCRYPT authentication method. In addition, all user data is encrypted before it is passed from client to server and from server to client.

  • DATA_ENCRYPT_CMP: Authentication occurs at the server workstation, using the SERVER_ENCRYPT authentication method; all user data is encrypted before it is passed from client to server and from server to client. In addition, this authentication type provides compatibility for down-level products that do not support the DATA_ENCRYPT authentication type. Such products connect using the SERVER_ENCRYPT authentication type, and user data is not encrypted.

  • GSSPLUGIN: Authentication occurs at the server workstation, using a Generic Security Service Application Program Interface (GSS-API) plug-in. If the client's authentication type is not specified, the server returns a list of server-supported plug-ins (found in the srvcon_gssplugin_list database manager configuration parameter) to the client. The client then selects the first plug-in found in the client plug-in directory from the list. If the client does not support any plug-in in the list, the client is authenticated using the KERBEROS authentication method.

  • GSS_SERVER_ENCRYPT: Authentication occurs at the server workstation, using either the GSSPLUGIN or the SERVER_ENCRYPT authentication method. That is, if client authentication occurs through a GSS-API plug-in, the client is authenticated using the first client-supported plug-in found in the list of server-supported plug-ins. If the client does not support any of the plug-ins found in the server-supported plug-in list, the client is authenticated using the KERBEROS authentication method. If the client does not support the Kerberos security protocol, the client is authenticated using the SERVER_ENCRYPT authentication method.

It is important to note that if the authentication type used by the client workstation encrypts user ID and password information before sending it to a server for authentication (i.e., SERVER_ENCRYPT, KRB_SERVER_ENCRYPT, etc.), the server must be configured to use a compatible authentication method. Otherwise, it will not be able to process the encrypted data received and an error will occur.

It is also important to note that if the authentication type is not specified for a client workstation, the SERVER_ENCRYPT authentication method is used by default. If such a client tries to communicate with a server that does not support the SERVER_ENCRYPT authentication method, the client will attempt to use the authentication type that is being used by the server-provided the server has been configured to use only one authentication type. If the server supports multiple authentication types, an error will be generated.

Trusted Clients versus Untrusted Clients

If both the server and the client are configured to use the CLIENT authentication type, authentication occurs at the client workstation (if the database is a nonpartitioned database) or at the database partition from which the client application is invoked (if the database is a partitioned database), using the security facility provided by the client workstation's operating system. But what happens if the client workstation is using an operating system that does not contain a tightly integrated security facility, and no separate add-on security facility has been made available? Does such a configuration compromise security? The answer is no. However, in such environments, the DB2 Database Manager for the instance at the server must be able to determine which clients will be responsible for validating users and which clients will be forced to let the server handle user authentication. To make this distinction, clients that use an operating system that contains a tightly integrated security facility (for example, Windows NT, Windows 2000, all supported versions of UNIX, MVS, OS/390, VM, VSE, and AS/400) are classified as trusted clients, whereas clients that use an operating system that does not provide an integrated security facility (for example, Windows 95, Windows 98, and Windows Millennium Edition) are treated as untrusted clients.

The trust_allclnts parameter of a DB2 Database Manager configuration file helps the DB2 Database Manager for an instance on a server anticipate whether its clients are to be treated as trusted or untrusted. If this configuration parameter is set to YES (which is the default), the DB2 Database Manager assumes that any client that accesses the instance is a trusted client and that some form of authentication will take place at the client. However, if this configuration parameter is set to NO, the DB2 Database Manager assumes that one or more untrusted clients will try to access the server; therefore, all users must be authenticated at the server. (If this configuration parameter is set to DRDAONLY, only MVS, OS/390, VM, VSE, and OS/400 clients will be treated as trusted clients.) It is important to note that, regardless of how the trust_allclnts parameter is set, whenever an untrusted client attempts to access an instance or a database, user authentication always takes place at the server.

In some situations, it may be desirable to authenticate users at the server, even when untrusted clients will not be used. In such situations, the trust_clntauth configuration parameter of a DB2 Database Manager configuration file can be used to control where trusted clients are to be validated. By accepting the default value for this parameter (which is CLIENT), authentication for trusted clients will take place at the client workstation. If however, the value for this parameter is changed to SERVER, authentication for all trusted clients will take place at the server.




DB2 9 Fundamentals Certification Study Guide
DB2 9 Fundamentals: Certification Study Guide
ISBN: 1583470727
EAN: 2147483647
Year: 2007
Pages: 93

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net