9.2 Configure the Database for Local End-User Authentication
Complete the required configuration in your database to implement Oracle Deep Data Security (Deep Sec) when your end users are managed locally rather than through an IAM system. Your specific configuration steps vary depending on whether your local end users connect through an application or establish direct database sessions with password authentication.
9.2.1 Set Up Local Authentication for Application-Mediated Connections
If your application maintains its own user store (for example, a user registry in a separate database, LDAP directory, or an application-managed identity system) and those users connect to the database through the application, use the database configuration detailed here to implement Deep Sec, without requiring the users to have IAM accounts.
In this scenario, the local end user is identified by a user name and an optional security context lookup key supplied by the application.
Even though the end users are managed locally, the application must still be registered in your IAM system and must obtain a database-access token to authorize its own connection to the database. A TLS-secured connection, either a connection pool user account or an application identity, and the identity provider configuration in the database are therefore required. For application registration in IAM, see Register the Application in Microsoft Entra ID and Register the Application in OCI IAM.
9.2.2 Set Up Local Authentication for Direct Logon
For environments where local end users establish direct database sessions through a SQL client using credential-based authentication, perform the following configuration tasks to implement Deep Sec.
9.2.2.1 Set Up Multifactor Authentication for Local End Users
After you set up password-based direct logon, you can optionally require multifactor authentication (MFA) for local end users. The end user must enter a valid password and approve the second authentication factor before the database establishes the session.
- Cisco Duo, which uses the
duo_pushfactor. - Oracle Mobile Authenticator (OMA), which
uses the
oma_pushfactor.
On Oracle AI
Database, the MFA configuration is specific to the pluggable database
(PDB); the initialization parameters and wallet secrets apply only
to the PDB in which you configure them. On Oracle Autonomous AI Database, the notification and provider configuration applies to the
database to which the ADMIN user is connected.
After you complete the prerequisites in this section, assign the second
factor to an end user with the CREATE END USER or
ALTER END USER statement. See Create End User and Alter End User.
Note:
- On Oracle AI
Database, run the SQL and PL/SQL statements in this
section as a named user with the DBA role, and run
the statements that create credential objects as
SYS. Connect to the target PDB before applying configuration changes. - On Oracle Autonomous AI Database, run the SQL and PL/SQL statements as the
ADMINuser. UseDBMS_CLOUDto create credentials andDBMS_MFA_ADMINto configure email and authenticator notifications as shown in this section.
MFA initialization parameters (Oracle AI Database only)
Before you configure MFA with Cisco Duo or OMA on Oracle AI Database, review the required initialization parameters.
Set all MFA initialization parameters for each PDB. Use
ALTER SYSTEM to modify these dynamic
parameters. The database stores these parameters as strings, except
for MFA_SMTP_PORT, which is an integer.
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
|
None |
Host name of the Cisco Duo Auth API, used to enroll users and manage the Duo factor. Example value:
|
|
|
|
None |
OCI IAM identity domain URL, used to enroll users in the OCI IAM domain and manage the OMA factor. Example value:
|
|
|
|
None |
SMTP server that sends the device-registration email during enrollment. |
|
|
|
587 |
SMTP server port. Valid values are 25 to 587. |
|
|
|
None |
Email address that appears in the
|
|
|
|
None |
Display name that appears in the
|
Additional Oracle AI Database configuration notes
-
Provider secrets in the server wallet
Before you configure a provider, ensure that the required secrets are present in the PDB server wallet. For instructions, see Complete common prerequisites.Use the following provider secrets:
- Cisco Duo: To access Duo APIs,
provide the Duo integration key and Duo secret
key. Store the integration key in the
oracle.security.mfa.duo.integrationkeyalias and the secret key in theoracle.security.mfa.duo.secretkeyalias. - Oracle Mobile Authenticator
(OMA): To access OCI IAM administration APIs for
OMA, provide the client ID and client secret for
the database application registration in the OCI
IAM identity domain. Store the client ID in the
oracle.security.mfa.oma.clientidalias and the client secret in theoracle.security.mfa.oma.clientsecretalias. The client ID must be assigned the User Administrator and MFA Client roles.
- Cisco Duo: To access Duo APIs,
provide the Duo integration key and Duo secret
key. Store the integration key in the
-
Server wallet locations
The database searches for the PDB server wallet in this order:<WALLET_ROOT>/[pdb_guid]/mfa<WALLET_LOCATION>/[pdb_guid]<ORACLE_BASE|ORACLE_HOME>/admin/<db_unique_name>/[pdb_guid]/wallet
For the container database (CDB) root container, the database searches for the server wallet in this order:
<WALLET_ROOT>/mfa<WALLET_LOCATION><ORACLE_BASE|ORACLE_HOME>/admin/<db_unique_name>/wallet
Order of configuration tasks:
-
Set up any one of the following authenticators.
Complete common prerequisites
Complete the following prerequisite tasks once for each target PDB on Oracle AI Database or once for each Oracle Autonomous AI Database. The tasks apply to Cisco Duo and OMA.
- Store Simple Mail Transfer Protocol (SMTP)
credentials
During enrollment, the database sends a device-registration email to the end user through an SMTP server.
- On Oracle AI
Database, if the SMTP server requires authentication,
store the SMTP user name and password in the
SYS.MFA_SMTP_CREDENTIAL$credential object. Run the following PL/SQL block asSYS.BEGIN DBMS_CREDENTIAL.CREATE_CREDENTIAL( credential_name => 'MFA_SMTP_CREDENTIAL$', username => '<SMTP_username>', password => '<SMTP_password>' ); END; / - On Oracle Autonomous AI Database, create a credential for the SMTP user name and
password. Run the following block as
ADMIN.BEGIN DBMS_CLOUD.CREATE_CREDENTIAL( credential_name => 'EMAIL_CRED', username => '<SMTP_username>', password => '<SMTP_password>' ); END; /
- On Oracle AI
Database, if the SMTP server requires authentication,
store the SMTP user name and password in the
- Configure SMTP notification settings
- On Oracle AI
Database, connect to the target PDB and set the SMTP
initialization
parameters.
ALTER SESSION SET CONTAINER = <your-target-PDB>; ALTER SYSTEM SET MFA_SMTP_HOST = 'smtp.email.us-region-1.oci.oraclecloud.com' SCOPE=BOTH; ALTER SYSTEM SET MFA_SMTP_PORT = 587 SCOPE=BOTH; ALTER SYSTEM SET MFA_SENDER_EMAIL_ID = 'database_mfa_registration@supremo.com' SCOPE=BOTH; ALTER SYSTEM SET MFA_SENDER_EMAIL_DISPLAYNAME = 'Database MFA Registration' SCOPE=BOTH;The
MFA_SMTP_PORTparameter defaults to 587. Set this parameter only when your SMTP server uses a different port in the valid range of 25 through 587. - On Oracle Autonomous AI Database, configure the email notification through
DBMS_MFA_ADMIN. Thecredential_nameattribute refers to the credential created in the previous step.BEGIN DBMS_MFA_ADMIN.CONFIGURE_NOTIFICATION( notification_type => 'EMAIL', attributes => JSON_OBJECT( 'credential_name' VALUE 'EMAIL_CRED', 'smtp_host' VALUE '<SMTP_host>', 'sender' VALUE '<sender_email_address>', 'smtp_port' VALUE 587, 'sender_email_display_name' VALUE '<sender_display_name>' ) ); END; /
- On Oracle AI
Database, connect to the target PDB and set the SMTP
initialization
parameters.
- Set the inbound connection timeout (Oracle AI
Database only)
Set the
SQLNET.INBOUND_CONNECT_TIMEOUTparameter in the database server'ssqlnet.orafile to a value greater than 60 seconds. This value gives the end user enough time to approve the push notification during sign-in.SQLNET.INBOUND_CONNECT_TIMEOUT=120 - Trust the SMTP server certificate (Oracle AI
Database only)
During enrollment, the database server makes an outbound connection to the SMTP server to send the device-registration email. If the database host doesn't trust the SMTP server certificate chain, add the root certificate for the certificate authority to the database server certificate store.
- Create the server wallet for provider
secrets (Oracle AI
Database only)
Create the wallet that stores the Cisco Duo and OMA secrets in the PDB-specific MFA wallet location.
First, determine the PDB GUID.SELECT guid FROM v$containers WHERE name = SYS_CONTEXT('USERENV', 'CON_NAME');Then, create the wallet in theWALLET_ROOTlocation. Substitute the GUID value for<pdb_guid>:mkdir -p <WALLET_ROOT>/<pdb_guid>/mfa cd <WALLET_ROOT>/<pdb_guid>/mfa orapki wallet create -wallet ./ -pwd <wallet_password> \ -auto_login -compat_v12
Configure Cisco Duo
In addition to the common prerequisites, complete these tasks to enable Cisco Duo as a second authentication factor.
- Configure the Duo API endpoint and credentials
- On Oracle AI
Database, in the target PDB, set
MFA_DUO_API_HOSTto your Cisco Duo Auth API host name.ALTER SYSTEM SET MFA_DUO_API_HOST = '<Duo_API_host>' SCOPE=BOTH;In the PDB-specific MFA wallet location, store the Duo integration key and secret key under their required aliases. For details about the integration key and secret key, see MFA initialization parameters.orapki secretstore create_entry -wallet ./ -pwd <wallet_password> \ -alias oracle.security.mfa.duo.integrationkey -secret <integration_key> orapki secretstore create_entry -wallet ./ -pwd <wallet_password> \ -alias oracle.security.mfa.duo.secretkey -secret <secret_key> - On Oracle Autonomous AI Database, create the Duo credential and configure the
Duo notification endpoint as
follows.
BEGIN DBMS_CLOUD.CREATE_CREDENTIAL( credential_name => 'DUO_CRED', username => '<Duo_integration_key>', password => '<Duo_secret_key>' ); END; / BEGIN DBMS_MFA_ADMIN.CONFIGURE_NOTIFICATION( notification_type => 'DUO', attributes => JSON_OBJECT( 'credential_name' VALUE 'DUO_CRED', 'api_endpoint' VALUE '<Duo_API_host>' ) ); END; /
- On Oracle AI
Database, in the target PDB, set
- Enroll local end users with Duo
After you complete the Duo configuration, create or alter a local end user with the
duo_pushfactor. The following example creates a local end user with Duo Push as the second factor:CREATE END USER emma IDENTIFIED BY <password> AND FACTOR 'duo_push' AS 'emma.baker@supremo.com';When you create or alter a local end user with the
duo_pushfactor, the database calls the Duo Auth APIs, enrolls the user in the Duo domain, and sends an email that contains a device-registration link to the user's registered email address. The user installs the Duo Mobile application and uses the link in the email to register the device.After device registration, the end user signs in to the database with their password. When the database validates the password, it sends a push notification to the Duo Mobile application through Duo Auth APIs. When the end user approves the notification, MFA is complete and the database establishes the session.
Configure Oracle Mobile Authenticator
In addition to the common prerequisites, complete these steps to enable OMA as a second authentication factor.
- Configure the OCI IAM endpoint and credentials
The OMA client ID must be assigned the User Administrator and MFA Client roles in the OCI IAM identity domain.
- On Oracle AI
Database, in the target PDB, set
MFA_OMA_IAM_DOMAIN_URLto your OCI IAM identity domain URL.ALTER SYSTEM SET MFA_OMA_IAM_DOMAIN_URL = '<OCI_IAM_identity_domain_URL>' SCOPE=BOTH;In the PDB-specific MFA wallet location, store the OAuth client ID and client secret under their required aliases. For details about the client ID and client secret, see MFA initialization parameters.orapki secretstore create_entry -wallet ./ -pwd <wallet_password> \ -alias oracle.security.mfa.oma.clientid -secret <OMA_client_id> orapki secretstore create_entry -wallet ./ -pwd <wallet_password> \ -alias oracle.security.mfa.oma.clientsecret -secret <OMA_client_secret> - On Oracle Autonomous AI Database, create the OMA credential and configure the
OMA notification endpoint as
follows.
BEGIN DBMS_CLOUD.CREATE_CREDENTIAL( credential_name => 'OMA_CRED', username => '<OMA_client_id>', password => '<OMA_client_secret>' ); END; / BEGIN DBMS_MFA_ADMIN.CONFIGURE_NOTIFICATION( notification_type => 'OMA', attributes => JSON_OBJECT( 'credential_name' VALUE 'OMA_CRED', 'api_endpoint' VALUE '<OMA_API_endpoint>' ) ); END; /
- On Oracle AI
Database, in the target PDB, set
- Enroll local end users with OMA
After you complete the OMA configuration, create or alter a local end user with the
oma_pushfactor. The following example creates a local end user with OMA as the second factor:CREATE END USER emma IDENTIFIED BY <password> AND FACTOR 'oma_push' AS 'emma.baker@supremo.com';When you create or alter a local end user with the
oma_pushfactor, the database calls the OCI IAM administration APIs, enrolls the user in the configured OCI IAM identity domain, and sends an email that contains a device-registration link to the user's registered email address. The user installs the OMA application and uses the link in the email to register the device.After device registration, the end user signs in to the database with their password. When the database validates the password, it sends a push notification to the OMA application through OCI IAM on-demand MFA APIs. When the end user approves the notification, MFA is complete and the database establishes the session.