Use Microsoft Active Directory with Autonomous Database
You can configure Autonomous Database to authenticate and authorize Microsoft Active Directory users. This configuration allows Active Directory users to access a database using their Active Directory credentials.
Topics
-
Configure CMU with Microsoft Active Directory on Autonomous Database
-
Connect to Autonomous Database with Active Directory User Credentials
-
Tools Restrictions with Active Directory on Autonomous Database
-
Verify Active Directory User Connection Information with Autonomous Database
-
Remove Active Directory Users and Roles on Autonomous Database
- Disable Active Directory Access on Autonomous Database
Configure CMU with Microsoft Active Directory on Autonomous Database
The integration of Autonomous Database with Centrally Managed Users (CMU) provides integration with Microsoft Active Directory. CMU with Active Directory works by mapping Oracle database global users and global roles to Microsoft Active Directory users and groups.
Note:
CMU supports Microsoft Active Directory servers but does not support the Azure Active Directory service.See Configuring Centrally Managed Users with Microsoft Active Directory for information on Centrally Managed Users (CMU).
The following are required before you configure the connection from Autonomous Database to Active Directory:
-
You must have Microsoft Active Directory installed and configured. See AD DS Getting Started for more information.
-
You must create an Oracle service directory user in Active Directory. See Connecting to Microsoft Active Directory for information on the Oracle service directory user account.
-
An Active Directory system administrator must have installed Oracle password filter on the Active Directory servers, and set up Active Directory groups with Active Directory users to meet your requirements. Only password authentication is supported with CMU for Autonomous Database, so you must use the included utility,
opwdintg.exe
, to install the Oracle password filter on Active Directory, extend the schema, and create three newORA_VFR
groups for three types of password verifier generation. See Connecting to Microsoft Active Directory for information on installing the Oracle password filter. -
The Active Directory servers must be accessible from Autonomous Database through the public internet and the port 636 of the Active Directory servers must be open to Autonomous Database in Oracle Cloud Infrastructure, so that Autonomous Database can have secured LDAP access over TLS/SSL to the Active Directory servers through the internet.
You can also extend your on-premise Active Directory to Oracle Cloud Infrastructure, where you can set up Read Only Domain Controllers (RODCs) for the on-premise Active Directory. Then you can use these RODCs in Oracle Cloud Infrastructure to authenticate and authorize the on-premise Active Directory users for access to Autonomous Databases. See Microsoft Windows: Extending Active Directory to Oracle Cloud Infrastructure for more information.
-
You need the CMU configuration database wallet,
cwallet.sso
and the CMU configuration filedsi.ora
to configure CMU for your Autonomous Database. If you have configured CMU for an on-premise database, you can obtain these configuration files from your on-premise database server. If you have not configured CMU for an on-premise database, you need to create these files on your local computer, or on an on-premise database server. You can validate the wallet and thedsi.ora
by configuring CMU for an on-premise database and verifying that an Active Directory user can successfully log on to the on-premise database with these configuration files. Then you upload these configuration files to the cloud in order to configure CMU for your Autonomous Database.For details on the wallet file for CMU, see Create the Wallet for a Secure Connection and Verify the Oracle Wallet.
For details on the
dsi.ora
file for CMU, see Creating the dsi.ora File.For details on configuring Active Directory for CMU and troubleshooting CMU for on-premise databases, see How To Configure Centrally Managed Users For Database Release 18c or Later Releases (Doc ID 2462012.1).
The following limitation applies to CMU with Active Directory on Autonomous Database:
-
Only "password authentication" is supported for CMU with Autonomous Database. Other CMU authentication methods including Kerberos and PKI are not supported with Autonomous Database.
Note:
When you perform the configuration steps, connect to the database as the ADMIN user.To configure CMU on Autonomous Database, as
the ADMIN user, you upload the CMU configuration
database wallet, cwallet.sso
, and the CMU configuration file,
dsi.ora
, to your Object Store, and then use DBMS_CLOUD.GET_OBJECT
to copy these files to
a file system directory path specified by a directory object on the database.
To configure Autonomous Database to connect to Active Directory servers:
Note:
See Disable Active Directory Access on Autonomous Database for instructions to disable the access from Autonomous Database to Active Directory.See GET_OBJECT Procedure and Function for more information on DBMS_CLOUD.GET_OBJECT
.
See DELETE_OBJECT Procedure for more information on DBMS_CLOUD.DELETE_OBJECT
.
See Configuring Centrally Managed Users with Microsoft Active Directory for more information on configuring CMU with Microsoft Active Directory.
Add Microsoft Active Directory Roles on Autonomous Database
To add Active Directory roles, map the
database global roles to Active Directory groups with CREATE ROLE
or
ALTER ROLE
statements (and include the IDENTIFIED GLOBALLY
AS
clause).
To add global roles for Active Directory groups on Autonomous Database:
See Configuring Authorization for Centrally Managed Users for more information on configuring roles with Microsoft Active Directory.
Add Microsoft Active Directory Users on Autonomous Database
To add Active Directory users to access a database, map database global
users to Active Directory groups or users with CREATE USER
or ALTER
USER
statements (with IDENTIFIED GLOBALLY AS
clause).
The integration of Autonomous Database with Active Directory works by mapping Microsoft Active Directory users and groups directly to Oracle database global users and global roles.
To add global users for Active Directory groups or users on Autonomous Database:
See Configuring Authorization for Centrally Managed Users for more information on configuring users with Microsoft Active Directory.
Connect to Autonomous Database with Active Directory User Credentials
After the ADMIN user completes the CMU Active Directory configuration steps and creates global roles and global users, users log in to the database using their Active Directory username and password.
Note:
Do not log in using a Global User name. Global User names do not have a password and connecting with a Global User name will not be successful. You must have a global user mapping in your Autonomous Database in order to log in to the database. You cannot log in to the database with only global role mappings.After configuring CMU with Active Directory on Autonomous Database and setting up Active Directory authorization, with global roles and global users, you can connect to your database using any of the connection methods described in Connecting to Autonomous Database. When you connect, if you want to use an Active Directory user then use Active Directory user credentials. For example, provide a username in this form, "AD_DOMAIN\AD_USERNAME" (double quotes must be included), and use your AD_USER_PASSWORD for the password.
If your Autonomous Database instance is in Restricted
Mode, this mode only allows users with the RESTRICTED SESSION
privilege
to connect to the database. The ADMIN user has this privilege. You can use restricted
access mode to perform administrative tasks such as indexing, data loads, or other
planned activities. See Change Autonomous Database Operation Mode to Read/Write Read-Only or Restricted for more information.
Tools Restrictions with Active Directory on Autonomous Database
Notes for using Autonomous Database tools with Active Directory:
- Oracle APEX is not supported for Active Directory users with Autonomous Database. See Create Oracle APEX Workspaces in Autonomous Database for information on using regular database users with Autonomous Database.
-
Database Actions is not supported for Active Directory users with Autonomous Database. See Provide Database Actions Access to Database Users for information on using regular database users with Autonomous Database.
-
Oracle Machine Learning Notebooks are not supported for Active Directory users with Autonomous Database. See Add Existing Database User Account to Oracle Machine Learning Components for information on using regular database users with Autonomous Database.
Verify Active Directory User Connection Information with Autonomous Database
When users log in to the database using their Active Directory username and password, you can verify and audit the user activity.
For example, when the user pfitch
logs in:
CONNECT "production\pfitch"/password@exampleadb_medium;
The Active Directory user's log on username (samAccountName) is
pfitch
and widget_sales_group
is the Active
Directory Group name, and widget_sales
is the database global user.
After pfitch
logs in to the database, the command SHOW
USER
shows the global user name:
SHOW USER;
USER is "WIDGET_SALES"
The following command shows the DN (Distinguished Name) of the Active Directory user:
SELECT SYS_CONTEXT('USERENV', 'ENTERPRISE_IDENTITY') FROM DUAL;
For example you can verify this centrally managed user's enterprise identity:
SQL> SELECT SYS_CONTEXT('USERENV', 'ENTERPRISE_IDENTITY') FROM DUAL;
SYS_CONTEXT('USERENV','ENTERPRISE_IDENTITY')
----------------------------------------------------------------------
cn=Peter Fitch,ou=sales,dc=production,dc=examplecorp,dc=com
The following command shows the
"AD_DOMAIN\AD_USERNAME
":
SELECT SYS_CONTEXT('USERENV', 'AUTHENTICATED_IDENTITY') FROM DUAL;
For example, the Active Directory authenticated user identity is captured and audited when the user logs on to the database:
SQL> SELECT SYS_CONTEXT('USERENV', 'AUTHENTICATED_IDENTITY') FROM DUAL;
SYS_CONTEXT('USERENV','AUTHENTICATED_IDENTITY')
----------------------------------------------------------------------
production\pfitch
See Verifying the Centrally Managed User Logon Information for more information.
Remove Active Directory Users and Roles on Autonomous Database
To remove Active Directory users and roles from Autonomous Databases, use standard database commands. This does not remove the related Active Directory users or groups that were mapped from the dropped database users or roles.
To remove users or roles from Autonomous Database:
Disable Active Directory Access on Autonomous Database
Describes the steps to disable the LDAP access from your Autonomous Database to Active Directory, and covers the steps to remove the CMU configuration from your Autonomous Database.
After you configure your database to access Active Directory, you can disable the access as follows:
Note:
If you no longer want to maintain the connection to Active Directory, then do the following:
-
Remove the database property
CMU_WALLET
by executing the following SQL statement:ALTER DATABASE PROPERTY REMOVE CMU_WALLET;
-
Remove the CMU configuration files, the database wallet
cwallet.sso
anddsi.ora
, from the directory that you created or chose when you configured CMU. For example, useDBMS_CLOUD.DELETE_FILE
to remove these files fromCMU_WALLET_DIR
.
See DELETE_FILE Procedure for more information on DBMS_CLOUD.DELETE_FILE
.