Home > Articles > Security > Software Security

  • Print
  • + Share This
This chapter is from the book

Authentication

The first security portal most users must pass through on their way to gaining access to a DB2 UDB instance or a database is a process known as authentication. The purpose of authentication is to verify that a user really is who they say they are. Typically, authentication is performed by an external security facility that is not part of DB2 UDB. 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), it may be a separate add-on product (for example, Distributed Computing Environment (DCE) Security Services), or it may not exist at all (which, by default, 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 they claim to be.

Note

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 that has not been assigned a password will be treated as if they have a NULL password—from the operating system's perspective, this will be evaluated as being a valid match.

Where Does Authentication Take Place?

Because DB2 UDB 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. So to simplify things, DB2 UDB uses a parameter in the DB2 Database Manager configuration file associated with every instance to determine how and where users are to be 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, which is usually performed using the Configuration Assistant.) Only one authentication type exists for each instance, and it controls access to that instance, as well as to all databases that fall under the instance's control.

In Version 8.1 of DB2 UDB, 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/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/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. The Kerberos security protocol is a protocol that 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 users 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 only supported 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.

Just as the authentication type for an instance on a server is set when the instance is first created, an authentication type is usually specified at each client workstation that will communicate with a server. Furthermore, the combination of authentication types specified at both the client and the server determine which authentication method is actually used. Figure 3-1 shows the combination of client and server authentication types that should be used when users are to be authenticated at the client workstation. Figure 3-2 shows the combinations of client and server authentication types that should be used when users are to be authenticated at the server.

03fig01.gifFigure 3-1. Authentication type combinations to use for client authentication.

03fig02.gifFigure 3-2. Authentication type combinations to use for server authentication.

Trusted Clients Versus Untrusted Clients

As you can see in Figure 3-1, 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 where the client application is invoked from (if the database is a partitioned database), using the security facility that is provided by the client'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 an 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, and 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 classified 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 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 be used 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 no untrusted clients will need access. 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. However, if the value for this parameter is changed to SERVER, authentication for all trusted clients will take place at the server.

  • + Share This
  • 🔖 Save To Your Account