Grant Roles to the Oracle Data Safe Service Account on Your Target Database
The Oracle Data Safe features that you can use with your target database depend on the roles you grant to the Oracle Data Safe service account on that target database. You can grant and revoke roles as needed.
The roles are different for Autonomous Databases versus non-Autonomous Databases. For non-Autonomous databases, you can grant roles to the Oracle Data Safe service account prior to or after registering your database. For Autonomous Databases, you first need to register your database, which unlocks the Oracle Data Safe preseeded service account, and then grant and revoke roles as needed. By default, the Oracle Data Safe service account on an Autonomous Database is already granted some of the roles.
Roles for the Oracle Data Safe Service Account
Oracle Recommendation:
Grant only the roles needed to the Oracle Data Safe service on your target databases. How you grant roles depends on the type of target databases that you have.The following table describes the roles for non-Autonomous Databases and Autonomous Databases. If you are registering a non-Autonomous Database (for example, a DB system, on-premises Oracle Database, or an Oracle Database on a compute instance), you can grant the roles in the first column. If you are registering an Autonomous Database, you can grant the roles in the second column. By default, some or most of the roles are granted by default so it is best to refer to each type of target registration.
Roles for Non-Autonomous Databases | Roles for Autonomous Databases | Description |
---|---|---|
|
|
Privileges required for the User Assessment and Security Assessment features |
|
|
Privileges required for accessing audit trails for the target database |
|
|
Privileges required for the Data Discovery feature (discovering sensitive data in the target database) |
|
|
Privileges required for the Data Masking feature (masking sensitive data in the target database) |
|
|
Privileges required for updating target database audit policies |
|
|
Privileges required for the SQL Firewall feature (collect, monitor, and allow and block SQL traffic) Only for Oracle Database 23ai or later |
Grant Roles to the Oracle Data Safe Service on an Autonomous Database
By default, an Autonomous Database comes with a database account
specifically created for Oracle Data Safe named DS$ADMIN
. The roles that you grant to this account
determine the Oracle Data Safe features that you can use with your Autonomous Database.
For an Autonomous Database, all roles are already granted by default, except for DS$DATA_MASKING_ROLE
and DS$SQL_FIREWALL_ROLE
.
Note:
If Database Vault is enabled on your Autonomous Database, be aware that there are specific steps to take in the procedure below to get Oracle Data Safe to work with Database Vault.To grant or revoke roles from the Oracle Data Safe service account on an Autonomous Database database, you can run the
DS_TARGET_UTIL
PL/SQL package on the Autonomous Database. You
need to run this package as the PDB Admin user (ADMIN
) or as a user
that has execute permission on the DS_TARGET_UTIL
PL/SQL
package.
You can grant or revoke roles as often as needed.
Grant Roles to the Oracle Data Safe Service on a Non-Autonomous Database
To grant or revoke roles from the Oracle Data Safe service account on a non-Autonomous Database, you need to run a SQL privileges
script called datasafe_privileges.sql
. You can download this script
from Oracle Data Safe in Oracle Cloud Infrastructure. To run the script, you need to be connected to
your database as the SYS
user.
You can run the script as many times as needed. For example, suppose that in the beginning you only need to use the Activity Auditing feature in Oracle Data Safe. You can run the SQL privileges script to grant the database access to only Activity Auditing. Later, you decide you want to use the Data Discovery feature too. You can run the SQL privileges script again on the database to grant the database access to Data Discovery.
Example 3-1 Grant all privileges and make all Oracle Data Safe features available
@datasafe_privileges.sql <DATASAFE_ADMIN> GRANT ALL -VERBOSE
Example 3-2 Grant the privileges required to use the making feature
@datasafe_privileges.sql <DATASAFE_ADMIN> GRANT MASKING