Oracle Advanced Security Administrator's Guide Release 8.1.7 Part Number A85430-01 |
|
This chapter describes how to configure Oracle Advanced Security for Oracle8i, or for the Oracle8i server, for use with Kerberos authentication, and how to configure Kerberos to authenticate Oracle database users. This chapter contins the following sections:
To enable Kerberos authentication:
Install Kerberos on the system that functions as the authentication server
To enable the Oracle database server to validate the identity of clients that authenticate themselves using Kerberos, you must create a service principal for Oracle8i.
The name of the principal should have the following format:
kservice/kinstance@REALM
For example, if kservice is oracle, the fully-qualified name of the system on which Oracle8i is running is dbserver.someco.com
, and the realm is SOMECO.COM
; the principal name is:
oracle/dbserver.someco.com@SOMECO.COM
It is a convention to use the DNS domain name as the name of the realm. To create the service principal, run kadmin.local. The following example is UNIX-specific (enter as root user):
# cd /kerberos-install-directory/sbin
# ./kadmin.local
To add a principal named oracle/dbserver.someco.com@SOMECO.COM
to the list of server principals known by Kerberos, enter the following:
kadmin.local:addprinc -randkey oracle/dbserver.someco.com@SOMECO.COM
Extract the service table from Kerberos and copy it to the Oracle database server/Kerberos client system.
For example, to extract a service table for dbserver.someco.com:
kadmin.local: ktadd -k /tmp/keytab oracle/dbserver.someco.com
Entry for principal oracle/dbserver.someco.com with kvno 2, encryption DES-CBC-CRC added to the keytab WRFILE: 'WRFILE:/tmp/keytab
kadmin.local: exit
oklist -k -t /tmp/keytab
kadmin.local
to append the them.
If you do not enter a realm when using ktadd, it uses the realm of the current host and displays it in the command output, as shown above.
The following example is UNIX-specific.
# mv /tmp/keytab /etc/v5srvtab
The default name of the service file is /etc/v5srvtab.
Install the Oracle database server and client software.
Install Net8 and Oracle Advanced Security on the Oracle database server and Oracle client systems.
Configure Net8 on the Oracle database server and client.
Perform these tasks to set certain parameters in the Oracle database server and client sqlnet.ora
files:
Perform the following steps to configure Kerberos authentication service parameters on the client and on the database server:
The Oracle Advanced Security tabbed window appears:
The sqlnet.ora
file is updated with the following entries:
SQLNET.AUTHENTICATION_SERVICES=(KERBEROS5)
SQLNET.AUTHENTICATION_KERBEROS5_SERVICE=kservice
To set parameters in the initialization parameter file:
REMOTE_OS_AUTHENT=FALSE
OS_AUTHENT_PREFIX=""
Setting this parameter to null overrides the default value of OPS$.
In addition to the required parameters, you can optionally set the following sqlnet.ora parameters on the client and the Oracle database server:
To create Oracle users that Kerberos can authenticate, perform this task on the Kerberos authentication server where the administration tools are installed. The realm must already exist.
Run /krb5/admin/kadmin.local
as root to create a new Kerberos user, such as krbuser
.
The following example is UNIX specific:
# ./kadmin.local
kadmin.local: addprinc krbuser
Enter password for principal: "krbuser@SOMECO.COM":
(password does not display)
Re-enter password for principal: "krbuser@SOMECO.COM":
(password does not display)
kadmin.local: exit
Run SQL*Plus on the Oracle database server to create the Oracle user that corresponds to the Kerberos user. In the following example, OS_AUTHENT_PREFIX is set to null (""). The Oracle user name is in uppercase enclosed in double quotation marks.
SQL> CONNECT / AS SYSDBA;
SQL> CREATE USER "KRBUSER@SOMECO.COM" IDENTIFIED EXTERNALLY;
SQL> GRANT CREATE SESSION TO "KRBUSER@SOMECO.COM";
Before you can connect to the database, you must ask the Key Distribution Center (KDC) for an initial ticket. To do so, run the following on the client:
% okinit user_name
If, when making a database connection, a reference such as the following follows a database link, you must use the forwardable flag (-f
) option:
sqlplus /@oracle
Executing okinit -f enables credentials that can be used across database links. Run the following commands on the Oracle client:
% okinit -f
Password for krbuser@SOMECO.COM:password
Three utilities are shipped with the Oracle Kerberos authentication adapter. These utilities are intended for use on an Oracle client with Oracle Kerberos authentication support installed.
okinit
to obtain an initial ticket.
oklist
to display credentials
okdstry
to remove credentials from the credentials cache.
The okinit utility obtains and caches Kerberos tickets. This utility is typically used to obtain the ticket-granting ticket, using a password entered by the user to decrypt the credential from the key distribution center (KDC). The ticket-granting ticket is then stored in the user's credential cache.
The options available with okinit are listed in Table 6-1:
Table 6-1 Options for the okinit Utility
Run the oklist utility to display the list of tickets held; available oklist options are listed in Table 6-2:
Table 6-2 Options for the oklist Utility
The show flag option (-f) displays additional information, as shown in the following example:
% oklist -f
27-Jul-1999 21:57:51 28-Jul-1999 05:58:14
krbtgt/SOMECO.COM@SOMECO.COM
Flags: FI
Use the okdstry utility to remove credentials from the credentials cache file:
$ okdstry -f
where the -f
command option lets you specify an alternative credential cache. For UNIX, the default is /tmp/krb5cc_uid.
You can also specify the alternate credential cache by using the SQLNET.KRB5_CC_NAME
parameter in the sqlnet.ora
file.
You can now connect to an Oracle database server without using a user name or password. Enter a command similar to the following:
$ sqlplus /@net_service_name
where net_service_name is a Net8 service name. For example:
$ sqlplus /@oracle_dbname
See Also:
Chapter 1, Introduction to Oracle Advanced Security, for information about external authentication and Oracle8i Distributed Database Systems |
This section lists some common configuration problems and explains how to resolve them.
sqlnet.ora
file on the database server side has a service name that corresponds to a service known by Kerberos.
sqlnet.ora
file).
sqlnet.ora
parameters).
sqlnet.ora
file on the database server side.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|