CREATE
OR
REPLACE
PACKAGE
SYS.dbms_fga
AS
-- ------------------------------------------------------------------------
-- CONSTANTS
--
EXTENDED
CONSTANT
PLS_INTEGER
:=
1
;
DB
CONSTANT
PLS_INTEGER
:=
2
;
DB_EXTENDED
CONSTANT
PLS_INTEGER
:=
3
;
-- (default)
XML
CONSTANT
PLS_INTEGER
:=
4
;
ALL_COLUMNS
CONSTANT
BINARY_INTEGER
:=
1
;
ANY_COLUMNS
CONSTANT
BINARY_INTEGER
:=
0
;
-- (default)
-- add_policy - add a fine grained auditing policy to a table or view
--
-- INPUT PARAMETERS
-- object_schema - schema owning the table/view, current user if NULL
-- object_name - name of table or view
-- policy_name - name of policy to be added
-- audit_column - column to be audited
-- audit_condition - predicates for this policy
-- handler_schema - schema where the event handler procedure is
-- handler_module - name of the event handler
-- enable - policy is enabled by DEFAULT
-- statement_type - statement type a policy applies to (default SELECT)
-- audit_trail - Write sqltext and sqlbind into audit trail by default (DB_EXTENDED)
-- audit_column_options - option of using 'Any' or 'All' on audit columns for the policy
PROCEDURE
add_policy(object_schema
IN
VARCHAR2
:=
NULL
,
object_name
IN
VARCHAR2
,
policy_name
IN
VARCHAR2
,
audit_condition
IN
VARCHAR2
:=
NULL
,
audit_column
IN
VARCHAR2
:=
NULL
,
handler_schema
IN
VARCHAR2
:=
NULL
,
handler_module
IN
VARCHAR2
:=
NULL
,
enable
IN
BOOLEAN
:=
TRUE
,
statement_types
IN
VARCHAR2
:=
'SELECT'
,
audit_trail
IN
PLS_INTEGER
:=
3
,
audit_column_opts
IN
BINARY_INTEGER
DEFAULT
0
);
-- drop_policy - drop a fine grained auditing policy from a table or view
--
-- INPUT PARAMETERS
-- object_schema - schema owning the table/view, current user if NULL
-- object_name - name of table or view
-- policy_name - name of policy to be dropped
PROCEDURE
drop_policy(object_schema
IN
VARCHAR2
:=
NULL
,
object_name
IN
VARCHAR2
,
policy_name
IN
VARCHAR2
);
-- enable_policy - enable a security policy for a table or view
--
-- INPUT PARAMETERS
-- object_schema - schema owning the table/view, current user if NULL
-- object_name - name of table or view
-- policy_name - name of policy to be enabled or disabled
PROCEDURE
enable_policy(object_schema
IN
VARCHAR2
:=
NULL
,
object_name
IN
VARCHAR2
,
policy_name
IN
VARCHAR2
,
enable
IN
BOOLEAN
:=
TRUE
);
-- disable_policy - disable a security policy for a table or view
--
-- INPUT PARAMETERS
-- object_schema - schema owning the table/view, current user if NULL
-- object_name - name of table or view
-- policy_name - name of policy to be enabled or disabled
PROCEDURE
disable_policy(object_schema
IN
VARCHAR2
:=
NULL
,
object_name
IN
VARCHAR2
,
policy_name
IN
VARCHAR2
);
END
dbms_fga;