Access to an instance or a database first requires that the user be authenticated. The authentication type for each instance determines how and where a user will be verified.
The authentication type is stored in the configuration file at the server. It is initially set when the instance is created. There is one authentication type per instance, which covers access to that database server and all the databases under its control.
If you intend to access data sources from a federated database, you must consider data source authentication processing and definitions for federated authentication types.
For CLI/ODBC and XA CLI/ODBC applications, the authentication mechanism used when processing a switch user request that requires authentication is the same as the mechanism used to originally establish the trusted connection itself. Therefore, any other negotiated security attributes (for example, encryption algorithm, encryption keys, and plug-in names) used during the establishment of the explicit trusted connection are assumed to be the same for any authentication required for a switch user request on that trusted connection. JAVA applications allow the authentication method to be changed on a switch user request (by use of a datasource property).
AES encryption can be used only when the authentication method negotiated between the client and server is SERVER_ENCRYPT.
If the user performs a local or client login, the user is known only to that local client workstation.
If the remote instance has CLIENT authentication, two other parameters determine the final authentication type: trust_allclnts and trust_clntauth.
CLIENT level security for TRUSTED clients only:
Trusted clients are clients that have a reliable, local security system.
When the authentication type of CLIENT has been selected, an additional option may be selected to protect against clients whose operating environment has no inherent security.
To protect against unsecured clients, the administrator can select Trusted Client Authentication by setting the trust_allclnts parameter to NO. This implies that all trusted platforms can authenticate the user on behalf of the server. Untrusted clients are authenticated on the Server and must provide a user ID and password. You use the trust_allclnts configuration parameter to indicate whether you are trusting clients. The default for this parameter is YES.
You may also want to complete authentication at the server even for trusted clients. To indicate where to validate trusted clients, you use the trust_clntauth configuration parameter. The default for this parameter is CLIENT.
To protect against all clients, including JCC type 4 clients on z/OS® and System i® but excluding native DB2 clients on z/OS, OS/390®, VM, VSE and System i, set the trust_allclnts parameter to DRDAONLY. Only these clients can be trusted to perform client-side authentication. All other clients must provide a user ID and password to be authenticated by the server.
The trust_clntauth parameter is used to determine where the above clients are authenticated: if trust_clntauth is "client", authentication takes place at the client. If trust_clntauth is "server", authentication takes place at the client when no user ID and password are provided and at the server when a user ID and password are provided.
TRUST_ ALLCLNTS | TRUST_ CLNTAUTH | Untrusted non- DRDA® Client Authen- tication (no user ID & password) | Untrusted non- DRDA Client Authen- tication (with user ID & password) | Trusted non- DRDA Client Authen- tication (no user ID & password) | Trusted non- DRDA Client Authen- tication (with user ID & password) | DRDA Client Authen- tication (no user ID & password) | DRDA Client Authen- tication (with user ID & password) |
---|---|---|---|---|---|---|---|
YES | CLIENT | CLIENT | CLIENT | CLIENT | CLIENT | CLIENT | CLIENT |
YES | SERVER | CLIENT | SERVER | CLIENT | SERVER | CLIENT | SERVER |
NO | CLIENT | SERVER | SERVER | CLIENT | CLIENT | CLIENT | CLIENT |
NO | SERVER | SERVER | SERVER | CLIENT | SERVER | CLIENT | SERVER |
DRDAONLY | CLIENT | SERVER | SERVER | SERVER | SERVER | CLIENT | CLIENT |
DRDAONLY | SERVER | SERVER | SERVER | SERVER | SERVER | CLIENT | SERVER |
The following user data are encrypted when using this authentication type:
Kerberos authentication works as follows:
It is possible to catalog the databases on the client machine and explicitly specify the Kerberos authentication type with the server's target principal name. In this way, the first phase of the connection can be bypassed.
If a user ID and a password are specified, the client will request the ticket-granting ticket for that user account and use it for authentication.
If the client authentication is not specified and an implicit connect is being performed (that is, the client does not supply a user ID and password when making the connection), the server returns a list of server-supported plug-ins, the Kerberos authentication scheme (if one of the plug-ins in the list is Kerberos-based), and the encrypted server authentication scheme. The client is authenticated using the first supported plug-in found in the client plug-in directory. If the client does not support any of the plug-ins that are in the list, the client is authenticated using the Kerberos authentication scheme. If the client does not support the Kerberos authentication scheme, the client is authenticated using the encrypted server authentication scheme, and the connection will fail because of a missing password. A client supports the Kerberos authentication scheme if a DB2-supplied Kerberos plug-in exists for the operating system, or a Kerberos-based plug-in is specified for the srvcon_gssplugin_list database manager configuration parameter.
If the client authentication is not specified and an explicit connection is being performed (that is, both the user ID and password are supplied), the authentication type is equivalent to SERVER_ENCRYPT. In this case, the choice of the encryption algorithm used to encrypt the user ID and password depends on the setting of the alternate_auth_enc database manager configuration parameter.
* Indicates the two most important parameters.