﻿{"id":971,"date":"2025-02-06T07:06:50","date_gmt":"2025-02-06T06:06:50","guid":{"rendered":"https:\/\/anjo.pt\/keyword-oracle\/?p=971"},"modified":"2025-02-12T11:49:32","modified_gmt":"2025-02-12T10:49:32","slug":"new-mandatory-unified-audit-policy-on-19-26","status":"publish","type":"post","link":"https:\/\/anjo.pt\/keyword-oracle\/2025\/02\/06\/new-mandatory-unified-audit-policy-on-19-26\/","title":{"rendered":"New mandatory unified audit policy on 19.26"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This feature was just backported from Oracle 23ai. The new <code>ORA$MANDATORY<\/code> audit policy was added with the Oracle 19.26 RU. This policy is not visible at <code>UNIFIED_AUDIT_POLICIES<\/code>&nbsp;or <code>AUDIT_UNIFIED_ENABLED_POLICIES<\/code>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After patching the database to 19.26, then you see entries on <code>UNIFIED_AUDIT_TRAIL<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSYS@CDB2.CDB$ROOT&gt; select EVENT_TIMESTMAP, SYSTEM_PRIVILEGE_USED, ACTION_NAME \nfrom UNIFIED_AUDIT_TRAIL \nwhere UNIFIED_AUDIT_POLICIES=&#039;ORA$MANDATORY&#039; \norder by EVENT_TIMESTMAP;\n\n                  EVENT_TIMESTAMP     SYSTEM_PRIVILEGE_USED       ACTION_NAME\n_________________________________ _________________________ _________________\n02-FEB-2025 21:54:56.192982000    SYSDBA                    LOGON\n02-FEB-2025 21:54:56.216549000    SYSDBA                    SELECT\n02-FEB-2025 21:55:00.381577000    SYSDBA, ALTER DATABASE    ALTER DATABASE\n02-FEB-2025 21:55:00.393882000    SYSDBA                    LOGOFF\n...\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The actions that are audited by <code>ORA$MANDATORY<\/code> policy are described on <a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/23\/dbseg\/configuring-audit-policies.html#DBSEG-GUID-AA781864-5756-464E-AFB6-675625AF0EF5\" target=\"_blank\" rel=\"noreferrer noopener\">Oracle 23ai documentation<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What I find interesting, is that the &#8220;ALTER DATABASE MOUNT&#8221; during startup is audited, so we can have a good history of database startups.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">A bit of annoying is that few seconds before the &#8220;mount&#8221;, there is the internal query to show the amount of SGA at startup which is also audited:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSELECT DECODE(null,&#039;&#039;,&#039;Total System Global Area&#039;,&#039;&#039;) NAME_COL_PLUS_SHOW_SGA,   SUM(VALUE), DECODE (null,&#039;&#039;, &#039;bytes&#039;,&#039;&#039;) units_col_plus_show_sga FROM V$SGA    \nUNION ALL    \nSELECT NAME NAME_COL_PLUS_SHOW_SGA , VALUE,    DECODE (null,&#039;&#039;, &#039;bytes&#039;,&#039;&#039;) units_col_plus_show_sga FROM V$SGA\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">These are below summarized:<\/p>\n\n\n\n<ul id=\"GUID-AA781864-5756-464E-AFB6-675625AF0EF5__UL_YQH_TVL_3BC\" class=\"wp-block-list\">\n<li>Activities of administrative users such as&nbsp;<code>SYSDBA<\/code>,&nbsp;<code>SYSBACKUP<\/code>, and&nbsp;<code>SYSKM<\/code>&nbsp;when the database is down is always audited.<\/li>\n\n\n\n<li>Any DDL or DML attempts on&nbsp;<code>UNIFIED_AUDIT_TRAIL<\/code>&nbsp;or the underlying dictionary tables in&nbsp;<code>AUDSYS<\/code>&nbsp;schema is always audited. <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A bit more fine-grained it means:<\/p>\n\n\n\n<ul id=\"GUID-AA781864-5756-464E-AFB6-675625AF0EF5__UL_YQH_TVL_3BC\" class=\"wp-block-list\">\n<li>SQL Firewall administrative actions<\/li>\n\n\n\n<li><code>ORADEBUG<\/code>&nbsp;utility<\/li>\n\n\n\n<li>Audit-Related Activities\n<ul class=\"wp-block-list\">\n<li><code>CREATE AUDIT POLICY<\/code><\/li>\n\n\n\n<li><code>ALTER AUDIT POLICY<\/code><\/li>\n\n\n\n<li><code>DROP AUDIT POLICY<\/code><\/li>\n\n\n\n<li><code>AUDIT<\/code><\/li>\n\n\n\n<li><code>NOAUDIT<\/code><\/li>\n\n\n\n<li><code>EXECUTE<\/code>&nbsp;of the&nbsp;<code>DBMS_FGA<\/code>&nbsp;PL\/SQL package<\/li>\n\n\n\n<li><code>EXECUTE<\/code>&nbsp;of the&nbsp;<code>DBMS_AUDIT_MGMT<\/code>&nbsp;PL\/SQL package<\/li>\n\n\n\n<li><code>ALTER TABLE<\/code>&nbsp;attempts on the&nbsp;<code>AUDSYS<\/code>&nbsp;audit trail table<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Top level statements by the administrative users&nbsp;<code>SYS<\/code>,&nbsp;<code>SYSDBA<\/code>,&nbsp;<code>SYSOPER<\/code>,&nbsp;<code>SYSASM<\/code>,&nbsp;<code>SYSBACKUP<\/code>,&nbsp;<code>SYSDG<\/code>, and&nbsp;<code>SYSKM<\/code>, until the database opens.<\/li>\n\n\n\n<li>All user-issued DML statements on the&nbsp;<code>SYS.AUD$<\/code>&nbsp;and&nbsp;<code>SYS.FGA_LOG$<\/code>&nbsp;dictionary tables<\/li>\n\n\n\n<li>Any attempts to modify the data or metadata of the unified audit internal table.&nbsp;<\/li>\n\n\n\n<li>All configuration changes that are made to Oracle Database Vault<\/li>\n\n\n\n<li>Operations on Blockchain and Immutable Tables\n<ul class=\"wp-block-list\">\n<li><code>CREATE TABLE<\/code><\/li>\n\n\n\n<li><code>DROP TABLE<\/code><\/li>\n\n\n\n<li>Failed&nbsp;<code>ALTER TABLE<\/code>&nbsp;operations<\/li>\n\n\n\n<li>Failed&nbsp;<code>DELETE<\/code>&nbsp;operations<\/li>\n\n\n\n<li>Failed&nbsp;<code>FLASHBACK TABLE<\/code>&nbsp;operations<\/li>\n\n\n\n<li>Failed&nbsp;<code>RENAME<\/code>&nbsp;operations<\/li>\n\n\n\n<li>Failed&nbsp;<code>TRUNCATE TABLE<\/code>&nbsp;operations<\/li>\n\n\n\n<li>Failed&nbsp;<code>UPDATE<\/code>&nbsp;operations<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Access to Sensitive Columns in the Oracle Optimizer Dictionary Tables\n<ul class=\"wp-block-list\">\n<li><code>SYS.HIST_HEAD$<\/code> &#8211; <code>minimum<\/code>,&nbsp;<code>maximum<\/code>,&nbsp;<code>lowval<\/code>,&nbsp;<code>hival<\/code><br><code>SYS.HISTGRM$<\/code> &#8211; <code>endpoint<\/code>,&nbsp;<code>epvalue_raw<\/code><br><code>SYS.WRI$_OPSTAT_HISTGRM_HISTORY<\/code> &#8211; <code>endpoint<\/code>,&nbsp;<code>epvalue_raw<\/code><br><code>SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY<\/code> &#8211; <code>minimum<\/code>,&nbsp;<code>maximum<\/code>,&nbsp;<code>lowval<\/code>,&nbsp;<code>hival<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This feature was just backported from Oracle 23ai. The new ORA$MANDATORY audit policy was added with the Oracle 19.26 RU. This policy is not visible at UNIFIED_AUDIT_POLICIES&nbsp;or AUDIT_UNIFIED_ENABLED_POLICIES. After patching the database to 19.26, then you see entries on UNIFIED_AUDIT_TRAIL: The actions that are audited by ORA$MANDATORY policy are described on Oracle 23ai documentation. What [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,6,39,81],"tags":[],"class_list":["post-971","post","type-post","status-publish","format-standard","category-audit","category-oracle","category-oracle-19c","category-oracle-23ai","czr-hentry"],"_links":{"self":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/comments?post=971"}],"version-history":[{"count":2,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/971\/revisions"}],"predecessor-version":[{"id":974,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/971\/revisions\/974"}],"wp:attachment":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/media?parent=971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/categories?post=971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/tags?post=971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}