Security

12 Questions
Study Guide: This page shows the correct answers and explanations for all questions in this topic. Review these to understand the key concepts.

Question:

Which two methods can be used to purge audit records of the Unified Audits?

Correct Answer: B,D
  • B. Use DBMS_AUDIT_MGMT.CREATE_PURGE_JOB as a privileged user to schedule an automatic purge job.
  • D. Use DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL as a privileged user to m anually purge audit records.
Explanation
Unified Auditing in Oracle 23ai consolidates audit records into a single trail, managed via the DBMS_AUDIT_MGMT package. Let’s evaluate each option with extensive detail: A. Only viewed audit records can be purged from Unified Audits. False. There’s no concept of “viewed” audit records restricting purging. Unified Audit records ( stored in UNIFIED_AUDIT_TRAIL) can be purged based on time, policy, or m anual intervention, regardless of whether they’ve been viewed. This option misrepresents audit mana gement capabilities. Mechanics:Purging is controlled by retention policies or explicit commands, not view status. For example, records older than a set retention period (e.g., 90 days via DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_PROPERTY) are eligible for pu rging. Why Incorrect:No Oracle documentation ties purging to viewing, making this a fabricated limitation. B . Use DBMS_AUDIT_MGMT.CREATE_PURGE_JOB as a privileged user tosc hedule an automatic purge job. True. This procedure creates a scheduled job to automatical ly purge audit records based on a retention policy or custom criteria. It’s a standard method for ongoing audit trail maintenance, requiring privileges like AUDIT_ADMIN. Mechanics:Example: BEGIN DBMS_AUDIT_MGMT.CREATE_PURGE_JOB(AUDIT_TRAIL_TYPE => DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED, JOB_FREQUENCY => 'DAILY ', JOB_STATUS => DBMS_AUDIT_MGMT.JOB_ENABLED); END;. This schedules daily p urges of old records, using the retention period set by SET_AUDIT_TRAIL_PROPERTY. Practical Use:Ideal for production environments to prevent the audit trail from growing indefinitely (e.g., avoiding tablespace exhaustion in SYSAUX). Edge Case:If no retention period is set, the job purges nothing until configured, highlighti ng the need for prior setup. C . Only the owner of a Unified Audit Policy can purge audit records by resetting the policy. False. Audit policies don’t have “owners” in the traditional sense; they’re created by users with AUDIT_ADMIN and managed globally. Resetting or disabling a p olicy (e.g., NOAUDIT POLICY my_policy) stops auditing but doesn’t purge existing records. Purging is a separate operation via DBMS_AUDIT_MGMT. Why Incorrect:This conflates policy management with a udit trail cleanup, which are distinct in Oracle. D . Use DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL as a privileged user to manually purge audit records. True. This procedure manually purges all Unified Audit records up to the current timestamp (or a specified time), requiring AUDIT_ADMIN privileges. It’s a one -time cleanup tool. Mechanics:Example: BEGIN DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRA IL(AUDIT_TRAIL_TYPE => DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED, USE_LAST_ARCH_TIMESTAMP => FALSE); END;. This clears the entire trail unless restricted by a timestamp. Practical Use:Useful for immediate space reclamation or post-incident cleanup, unlike scheduled jobs. Edge Case:If the audit trail is large, this may require significant undo space and time, potentially impacting performance. E. Use DBMS_AUDIT_MGMT.DELETE_AUDIT_RECORDS('POLICY_NAME') as a privileged user to manually purge audit records of a specified Unified Policy. False. No such procedure exists in DBMS_AUDIT_MGMT. The package offers CLEAN_AUDIT_TRAIL and CREATE_PURGE_JOB, but nothing targets a specific policy’s records by name in this format. You can filter records in UNIFIED_AUDIT_TRAIL by policy (e.g., SELECT * WHERE UNIFIED_AUDIT_POLICIES = 'POLICY_NAME'), but purging is all- or -nothing or time-based, not policy- specific via a single command. Why Incorrect:This appears to be a fabricated or misinterpreted option, possibly confusing audit policy management with trail purging.

Question:

How do you validate that the database was migrated to Unified Auditing?

Correct Answer: A
  • A. By querying V$OPTION for parameter Unified Auditing.
Explanation
Unified Auditing is enabled at database creation or migration in 23ai. Let’s analyze: A . By querying V$OPTION for parameter Unified Auditing. True. SELECT VALUE FROM V$OPTION WHERE PARAMETER = 'Unified Auditing'; returns TRUE if enabled. It’s the definitive way to confirm Unified Auditing is active at the database level. Mechanics:V$OPTION reflects compiled- in features; TRUE indicates the binary was linked with Unified Auditing (uniauflt=on during relink). Practical Use:Quick, reliable check post-migration or upgrade. B . By using the LSINVENTORY Command to query the Oracle Database Software Library. False. LSINVENTORY (from OPatch) lists installed software components, not runtime features like auditing mode. C . By querying the DBA_UNIFIED_AUDIT_OPTION view. False. This view doesn’t exist; DBA_AUDIT_POLICIES or UNIFIED_AUDIT_TRAIL show policies and records but not migration status. D . By executing DBMS_AUDIT_MGMT PL/SQL package in Verify mode. False. No “Verify mode” exists in DBMS_AUDIT_MGMT; it manages audit trails, not migration validation.

Question:

Which two statements are true about User Authentication in an Oracle Database?

Correct Answer: A,D
  • A. Operating System authentication may be used for system-privileged administrative users.
  • D. REMOTE_LOGIN_PASSWORDFILE must be set to EXCLUSIVE to permit password changes for system-privileged administrative users.
Explanation
User authentication in Oracle 23ai determines how users (especially administr ative ones) connect to the database. Let’s analyze each option with extensive detail: A. Operating System authentication may be used for system-privileged administrative users. True. OS authentication allows users mapped to OS account s (e.g., ops$oracle) to connect without a password, often used for administrative users like SYS or SYSTEM. Th is is configured by creating an externally authenticated user (e.g., CREATE USER "OPS$ORA CLE" IDENTIFIED EXTERNALLY) and relies on the OS to verify identity. Mechanics:When a user logs in via sqlplus/as sysdba, Oracle checks the OS user against the dba group (Unix) or ORA_DBA (Windows). If matched, no password is needed, leveraging OS security. Practical Use:Common for DBAs managing local instances, red ucing password management overhead. Edge Case:Requires REMOTE_LOGIN_PASSWORDFILE=NONE for exclusive OS auth, but this isn’t mandatory if a password file exists alongside. Historical Note:Introduced in early Oracle versions, this remains a robust option in 23ai for local admin access. B. Password authentication must be used for system-privileged administrative users. False. “Must” is incorrect; password authentication (e.g., sqlplus sys/password) is an option, not a requirement. OS authentication or password file authentica tion can also be used for users like SYS. This option overstates the necessity of password-ba sed login. Why Incorrect:Oracle’s flexibility allows multiple methods, contradicting the absolute phrasing here. C. Password File authentication is supported for any type of database user. False. Password file authentication is restricted to users wi th SYSDBA, SYSOPER, or similar system privileges (e.g., SYSBACKUP). Regular users (e.g., HR) can’t use the password file (orapw); they rely on database authentication (passwords stored in the DB) or ext ernal methods. Mechanics:The password file stores hashed credentials for privileged users, checked during remote AS SYSDBA logins. Why Incorrect:Extending this to “any user” ignores Oracle’s security model limiting password file usage. D. REMOTE_LOGIN_PASSWORDFILE must be set to EXCLUSIVE to permit password changes for system-privileged administrative users. False. REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE allows a ded icated password file for one instance, enabling password changes via ALTER USER SYS IDENTIFIED BY newpass. However, SHARED mode also permits changes for SYS, though not for other users added to the file. The “must” overstates the requirement; it’s sufficient, not ne cessary. Mechanics:EXCLUSIVE locks the file to one DB, while SHARED allows multiple DBs to use it, with restrictions on non-SYS users. E. Password File authentication must be used for system-privileged administrative users. True. For remote administrative access (e.g., sqlplus sys/pass word@orcl as sysdba), a password file is mandatory when REMOTE_LOGIN_PASSWORDFILE is EXCLUSIVE or S HARED. Local OS authentication is an alternative, but for network-based admin tasks, the password file is required, making this statement true in that context. Mechanics:Set via orapwd (e.g., orapwd file=orapworcl password=oracle entries=10), enabling remote SYSDBA logins. Edge Case:If REMOTE_LOGIN_PASSWORDFILE=NONE, only OS auth works locally, but this isn’t the default or typical setup.

Question:

Which three statements are true about roles?

Correct Answer: B,C,F
  • B. Roles may be granted to other roles.
  • C. The SET ROLE statement can enable one or more roles for a session.
  • F. The SET ROLE statement can disable one or more roles for a session.
Explanation
Roles in Oracle manage privileges efficiently. Let’s dive into each option: A . Roles must be password protected. False. Roles can be password- protected (e.g., CREATE ROLE mgr IDENTIFIED BY secret), but it’ s optional. Non-protected roles (default) are enabled autom atically if granted, requiring no password. Mechanics:Password-protected roles need SET ROLE mgr IDENTIFIED BY secret, enhancing security for sensitive privileges. B . Roles may be granted to other roles. True. Roles can form hierarchies (e.g., GRANT clerk TO mgr), allowing nested privilege management. Mechanics:A user with mgr inherits clerk privileges indirectly. Revoking clerk from mgr cascades appropriately. Practical Use:Simplifies complex privilege structures in large organizations. C . The SET ROLE statement can enable one or more r oles for a session. True. SET ROLE role1, role2; activates specified roles for the session, assuming they’re granted and not password-protected (or password is provided). Mechanics:Enabled roles grant their privileges immedia tely within the session scope. D . Object privileges may not be granted to roles. False. Object privileges (e.g., GRANT SELECT ON emp TO clerk) are a primary use of roles, making this statement incorrect. Why Incorrect:Roles are designed for this purpose, contrad icting the option. E . All roles granted to a user are set on default when the user logs in. False. Only roles marked as DEFAULT ROLE (via ALTER USER ... DEFAULT ROLE role1) are ena bled at login. Non-default roles require SET ROLE. Mechanics:Check via SELECT * FROM DBA_ROLE_PRIVS WHERE DEFAULT_ROLE='YES'. F . The SET ROLE statement can disable one or more roles for a session. True. SET ROLE NONE disables all roles, or SET ROLE role1 implicitly disables others not listed, providing granular control. Practical Use:Useful for testing or restricting privileges temporarily.

Question:

As the DBA, you execute this command: GRANT CREATE VIEW TO usr1 WITH ADMIN OPTION; USR1 then executes: GRANT CREATE VIEW TO usr2 WITH ADMIN OPTION; USR2 then executes: GRANT CREATE VIEW TO usr3; Which statement is true?

Correct Answer: E
  • E. When the DBA revokes the CREATE VIEW privilege from USR1, it is neither revoked from USR2 nor USR3.
Explanation
A .False. Revoking from USR1 doesn’t cascade due to WITH ADMIN OPTION. B .True. Revoking from USR2 cascades to USR3 because USR2 granted it. C .False. DBA can revoke the full privilege, not just ADMIN OPTION. D .False. USR1 can’t revoke from USR3 directly; only the grantor (USR2) can. E .True. WITH ADMIN OPTION breaks the revoke chain from USR1 onward.

Question:

In one of your databases, you create a user, HR, and then execute this command: GRANT CREATE SESSION TO hr WITH ADMIN OPTION; Which three actions can HR perform?

Correct Answer: B,C,D
  • B. Log in to the database instance.
  • C. Revoke the CREATE SESSION privilege from other users.
  • D. Grant the CREATE SESSION privilege with ADMIN OPTION to other users.
Explanation
A .False. CREATE SESSION doesn’t grant DML rights. B .True. CREATE SESSION allows login. C .True. WITH ADMIN OPTION allows revoking from others HR granted it to. D .True. WITH ADMIN OPTION permits granting with the same option. E .False. Users can’t revoke their own privileges. F .False. DDL requires additional privileges (e.g., CREATE TABLE ).

Question:

Which two statements describe why Database Auditing is a security requirement?

Correct Answer: A,E
  • A. To monitor suspicious activity.
  • E. To monitor proper usage of the system and data by privileged users.
Explanation
A .True. Auditing tracks suspicious actions. B .False. That’s monitoring, not auditing. C .False. Auditing detects, doesn’t prevent. D .False. Corruption is a reliability issue. E .True. Ensures privileged user compliance.

Question:

You want to apply the principle of least privilege in all your live databases. One of your requirements is to revoke unnecessary privileges from all users who have them using Privilege Analysis. Which two types of analyses can be done using the DBMS_PRIVILEGE_CAPTURE packag e?

Correct Answer: C,D
  • C. Analysis of privileges granted indirectly to a role that are then used by a user who has been granted that role.
  • D. Analysis of privileges granted directly to a role that are then used by a user who has been granted that role.
Explanation
A .False. Limited to captured privileges, not all schema objects. B .False. SYS is excluded from capture. C .True. Captures indirect role privileges used. D .True. Captures direct role privileges used. E .False. Focus is on roles, not self-owned objects broadly.

Question:

Which three actions are ways to apply the principle of least privilege?

Correct Answer: A,B,C
  • A. Enabling Unified Auditing.
  • B. Revoking execute privilege on UTL_SMTP, UTL_TCP, UTL_HTTP, and UTL_FILE from the roles/users (assuming typo for duplicate option).
  • C. Using Access Control Lists (ACLs).
Explanation
A .True. Auditing tracks privilege use, enforcing least privilege. B .True. Revoking unnecessary PL/SQL access limits capabi lities. C .True. ACLs restrict network access precisely. D .False. TRUE relaxes dictionary access, violating least privilege. E .False. TRUE allows risky OS auth, weakening security.

Question:

Which two statements are true about the DUAL table?

Correct Answer: A,B
  • A. It can be accessed by any user who has the SELECT privilege in any schema.
  • B. It consists of a single row and single column of VARCHAR2 data type.
Explanation
A .True. DUAL is public; any user with SELECT can query it. B .True. One row, one VARCHAR2 column (DUMMY). C .False. Fixed at one row. D .False. Not restricted to SYS. E .False. One row, one column only. F .False. Can return expressions, not just constant s.

Question:

Which two statements are true about Fine-Grained Auditing (FGA)?

Correct Answer: C,E
  • C. FGA policies can be created by a user having the AUDIT_ADMIN privilege.
  • E. FGA policies can be created by a user having EXECUTE privilege on the DBMS_FGA package.
Explanation
A .False. Schema owners need EXECUTE on DBMS_FGA. B .False. Not limited to SYSDBA. C .True. AUDIT_ADMIN includes FGA creation rights. D .False. No such role exists. E .True. DBMS_FGA.ADD_POLICY requires this privileg e.

Question:

You want to apply the principle of Least Privilege in all your live databases. One of your requirements is to revoke unnecessary privileges from all users who have them us ing Privilege Analysis. Which three types of analyses can be done using the DBMS_PRIVILEGE_CAPT URE package?

Correct Answer: C,D,E
  • C. Analysis of all privileges used by all users but excluding administrative users in the database.
  • D. Analysis of privileges granted directly to a role that are then used by a user who has been granted that role.
  • E. Analysis of privileges granted indirectly to a role that are then used by a user who has beengranted that role.
Explanation
A .True. Captures unused self-owned object privileges. B .False. SYS is excluded from capture. C .False. No exclusion option for admin users. D .False. Direct role grants aren’t separately analyzed. E .True. Tracks indirect role privileges used. F .True. Identifies used self-owned privileges.