Authenticate Autonomous AI Database Users with Kerberos

You can configure Autonomous AI Database on Dedicated Exadata Infrastructure to use Kerberos network authentication protocol to authenticate database users. Kerberos is a strong network authentication protocol. It uses secret-key cryptography to enable strong authentication by providing user-to-server authentication.

Components of the Kerberos Authentication System

Provides an overview of the Kerberos authentication system.

Component of Service Principal Value in Autonomous AI Database
kinstance

You can obtain this value from the attribute PUBLIC_DOMAIN_NAME in the CLOUD_IDENTITY column of V$PDBS. This value is different from the Fully Qualified Domain Name (FQDN) for a database on a private endpoint.

Use the following query to obtain the kinstance:

sql SELECT json_value(cloud_identity, '$.PUBLIC_DOMAIN_NAME') "KINSTANCE" FROM v$pdbs;

Note: This will be the value of the host parameter found in the TNS connect string.

kservice

On Autonomous AI Database you have two options for the kservice value:

  • Use the database GUID: If you do not provide a Kerberos service name with DBMS_CLOUD_ADMIN.ENABLE_EXTERNAL_AUTHENTICATION, the default service name used is the GUID of the Autonomous AI Database instance. In this case, when you create the keytab file, use the GUID as the value for the service name.

    Because in the default case the Keytab file uses a service name that is a GUID, which is instance specific, when you use the default service name you must generate different Keytab files for each Autonomous AI Database instance.

    Use the following command to obtain the GUID (case is significant):

    sql SELECT GUID FROM v$pdbs;

  • Use a custom name: Set the service name when you want to use the same Keytab files on multiple Autonomous AI Database instances. When you use a custom name you do not need to create and upload different Keytab files for each Autonomous AI Database instance. When you use a custom name you must specify the params kerberos_service_name parameter with DBMS_CLOUD_ADMIN.ENABLE_EXTERNAL_AUTHENTICATION. Specifying this parameter is not required when you use the GUID for the service name.

After Kerberos is enabled on your Autonomous AI Database instance, use the following query to view the Kerberos service name:

sql SELECT SYS_CONTEXT('USERENV', 'KERBEROS_SERVICE_NAME') FROM DUAL;

REALM Any realm supported by your KDC. REALM must always be in uppercase.

To enable Kerberos authentication for your Autonomous AI Database, you must keep your Kerberos configuration files (krb.conf) and service key table file (v5srvtab) ready. For more information on these files and steps to obtain them, please see Configuring Kerberos Authentication.

Notes About Kerberos Authentication on Autonomous AI Database

Before proceeding with Kerberos authentication on Autonomous AI Database on Dedicated Exadata Infrastructure, review the following notes:

Note: The only exception is that Kerberos authentication can be configured on top of CMU-AD to provide CMU-AD Kerberos authentication for Microsoft Active Directory users.

Enable Kerberos Authentication on Autonomous AI Database

Follow the below-listed steps to enable Kerberos authentication for Autonomous AI Database on Dedicated Exadata Infrastructure:

See Navigate to Oracle Cloud Infrastructure Object Storage and Create Bucket for more information on Object Storage.

See ENABLE_EXTERNAL_AUTHENTICATION Procedure for more information.

Disable Kerberos Authentication on Autonomous AI Database

Before enabling any other external authentication scheme on your database, you must disable the Kerberos authentication running the DBMS_CLOUD_ADMIN.DISABLE_EXTERNAL_AUTHENTICATION procedure.

To run this procedure, you must be logged in as ADMIN user or have the EXECUTE privilege on DBMS_CLOUD_ADMIN.

BEGIN
    DBMS_CLOUD_ADMIN.DISABLE_EXTERNAL_AUTHENTICATION;
END;
/

See DISABLE_EXTERNAL_AUTHENTICATION Procedure for more information.

Note: To provide CMU-AD Kerberos authentication for the Microsoft Active Directory users, you must continue to configure CMU-AD authentication without disabling Kerberos authentication.