Operation Audit
audit_system_object
Parameter description: Specifies whether to audit the CREATE, DROP, and ALTER operations on the GaussDB database object. The GaussDB database objects include databases, users, schemas, and tables. The operations on the database object can be audited by changing the value of this parameter.
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 0 to 134217727
- 0 indicates that the function of auditing the CREATE, DROP, and ALTER operations on the GaussDB database object can be disabled.
- Other values indicate that the CREATE, DROP, and ALTER operations on a certain or some GaussDB database objects are audited.
Value description:
The value of this parameter is calculated by 27 binary bits. The 27 binary bits represent 27 types of GaussDB objects. If the corresponding binary bit is set to 0, the CREATE, DROP, and ALTER operations on corresponding database objects are not audited. If it is set to 1, the CREATE, DROP, and ALTER operations are audited. For details about the audit contents represented by these 27 binary bits, see Table 1.
When SQL patches are audited and audit_dml_state_select are enabled, an SQL patch operation will be audited twice and recorded as DML and DDL operations in the audit log, respectively.
Default value: 67121159
Binary Bit |
Description |
Value Description |
---|---|---|
Bit 0 |
Whether to audit the CREATE, DROP, and ALTER operations on databases. |
|
Bit 1 |
Whether to audit the CREATE, DROP, and ALTER operations on schemas. |
|
Bit 2 |
Whether to audit the CREATE, DROP, and ALTER operations on users. |
|
Bit 3 |
Whether to audit the CREATE, DROP, ALTER, and TRUNCATE operations on tables. |
|
Bit 4 |
Whether to audit the CREATE, DROP, and ALTER operations on indexes. |
|
Bit 5 |
Whether to audit the CREATE and DROP operations on VIEW and MATVIEW objects. |
|
Bit 6 |
Whether to audit the CREATE, DROP, and ALTER operations on triggers. |
|
Bit 7 |
Whether to audit the CREATE, DROP, and ALTER operations on procedures/functions. |
|
Bit 8 |
Whether to audit the CREATE, DROP, and ALTER operations on tablespaces. |
|
Bit 9 |
Whether to audit the CREATE, DROP, and ALTER operations on resource pools. |
|
Bit 10 |
Whether to audit the CREATE, DROP, and ALTER operations on workloads. |
|
Bit 11 |
Reserved |
- |
Bit 12 |
Whether to audit the CREATE, DROP, and ALTER operations on data sources. |
|
Bit 13 |
Reserved |
- |
Bit 14 |
Whether to audit the CREATE, DROP, and ALTER operations on ROW LEVEL SECURITY objects. |
|
Bit 15 |
Whether to audit the CREATE, DROP, and ALTER operations on types. |
|
Bit 16 |
Whether to audit the CREATE, DROP, and ALTER operations on text search objects (CONFIGURATION and DICTIONARY). |
|
Bit 17 |
Whether to audit the CREATE, DROP, and ALTER operations on directories. |
|
Bit 18 |
Whether to audit the CREATE, DROP, and ALTER operations on synonyms. |
|
Bit 19 |
Whether to audit the CREATE, DROP, and ALTER operations on sequences. |
|
Bit 20 |
Whether to audit the CREATE and DROP operations on CMK and CEK objects. |
|
Bit 21 |
Whether to audit the CREATE, DROP, and ALTER operations on PACKAGE objects. |
|
Bit 22 |
Whether to audit the CREATE and DROP operations on MODEL objects. |
|
Bit 23 |
Whether to audit the CREATE, DROP, and ALTER operations on PUBLICATION and SUBSCRIPTION objects. |
|
Bit 24 |
Whether to audit the ALTER and DROP operations on the gs_global_config objects. |
|
Bit 25 |
Whether to audit the CREATE, DROP, and ALTER operations on FOREIGN DATA WRAPPER objects. |
|
Bit 26 |
Whether to audit the CREATE, ENABLE, DISABLE, and DROP operations on SQL patches. |
|
audit_dml_state
Parameter description: Specifies whether to audit the INSERT, UPDATE, and DELETE operations on a specific table.
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: 0 or 1
- 0 indicates that the function of auditing the DML operations (except SELECT) is disabled.
- 1 indicates that the function of auditing the DML operations (except SELECT) is enabled.
Default value: 0
audit_dml_state_select
Parameter description: Specifies whether to audit the SELECT operation.
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: 0 or 1
- 0 indicates that the SELECT auditing function is disabled.
- 1 indicates that the SELECT auditing function is enabled.
Default value: 0
audit_function_exec
Parameter description: Specifies whether to record the audit information during the execution of the stored procedures, anonymous blocks, or user-defined functions (excluding system functions).
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: 0 or 1
- 0 indicates that the function of auditing the procedure or function execution is disabled.
- 1 indicates that the function of auditing the procedure or function execution is enabled.
Default value: 0
audit_copy_exec
Parameter description: Specifies whether to audit the COPY operation.
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: 0 or 1
- 0 indicates that the COPY auditing function is disabled.
- 1 indicates that the COPY auditing function is enabled.
Default value: 1
audit_set_parameter
Parameter description: Specifies whether to audit the SET operation.
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: 0 or 1
- 0 indicates that the SET auditing function is disabled.
- 1 indicates that the SET auditing function is enabled.
Default value: 0
audit_xid_info
Parameter description: Specifies whether to record the transaction ID of the SQL statement in the detail_info column of the audit log.
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: 0 or 1
- 0 indicates that the function of recording transaction IDs in audit logs is disabled.
- 1 indicates that the function of recording transaction IDs in audit logs is enabled.
Default value: 0
If this function is enabled, the detail_info information in audit logs starts with xid. For example:
detail_info: xid=14619 , create table t1(id int);
If transaction IDs do not exist, xid is recorded as NA in audit logs.
enableSeparationOfDuty
Parameter description: Specifies whether the separation of three duties is enabled.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: Boolean
- on indicates that the separation of three duties is enabled.
- off indicates that the separation of three duties is disabled.
Default value: off
enable_nonsysadmin_execute_direct
Parameter description: Specifies whether non-system administrators and non-monitor administrator are allowed to execute the EXECUTE DIRECT ON statement.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: Boolean
- on indicates that any user is allowed to execute the EXECUTE DIRECT ON statement.
- off indicates that only the system administrators and monitor administrators are allowed to execute the EXECUTE DIRECT ON statement.
Default value: off
enable_access_server_directory
Parameter description: Specifies whether to allow non-initial users to create, modify, and delete directories.
This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: Boolean
- on indicates that non-initial users have the permission to create, modify, and delete directories.
- off indicates that non-initial users do not have the permission to create, modify, and delete directories.
Default value: off
- For security purposes, only the initial user can create, modify, and delete DIRECTORY objects by default.
- If enable_access_server_directory is enabled, users with the SYSADMIN permission and users who inherit the gs_role_directory_create permission of the built-in role can create directory objects. A user with the SYSADMIN permission, the owner of a directory, a user who is granted with the DROP permission for the directory, or a user who inherits the gs_role_directory_drop permission of the built-in role can delete a directory. A user with the SYSADMIN permission and the owner of a directory object can change the owner of the directory object, and the user must be a member of the new owner.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot