Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Database Audit

Updated on 2024-05-07 GMT+08:00

Context

Database audit is critical to the security of the database system. Database audit administrators can use the audit logs to reproduce a series of events that cause faults in the database and identify unauthorized users, unauthorized operations, and the time when these operations are performed.

You need to understand the following information about the audit function:

  • The overall audit switch audit_enabled supports dynamic loading. After you change the switch status when the database is running, the change takes effect immediately and you do not need to restart the database. Its default value is on, indicating that the audit function is enabled.
  • In addition to the overall audit switch, each audit item has an independent switch. An audit item is available only after its own switch is turned on.
  • The switch of each audit supports dynamic loading. After changing the audit switch status when the database is running, the modification takes effect immediately without restarting the database.

Table 1 describes the audit items supported by GaussDB. If you need to modify a specific audit configuration item, contact the administrator. For details about parameter types and value ranges, see "Configuring Running Parameters > GUC Parameters > Auditing" in Administrator Guide.

Table 1 Audit items

Configuration Item

Description

User login and logout audit

Parameter: audit_login_logout

Its default value is 7, which indicates that the function of user login and logout audit is enabled. 0 indicates that the function of user login and logout audit is disabled. Other values are not recommended.

Database startup, stop, recovery, and switchover audit

Parameter: audit_database_process

Its default value is 1, which indicates that the audit of database startup, stop, recovery, and switchover is enabled.

User locking and unlocking audit

Parameter: audit_user_locked

Its default value is 1, which indicates that the audit of user locking and unlocking is enabled.

Unauthorized access audit

Parameter: audit_user_violation

Its default value is 0, which indicates that the audit of unauthorized access disabled.

Permission granting and revoking audit

Parameter: audit_grant_revoke

Its default value is 1, which indicates that the audit of permission granting and revoking is enabled.

Full audit of user operations

Parameter: full_audit_users

Its default value is an empty string, indicating that the default configuration is used and no full audit of user operations is configured.

Names and IP addresses of clients that do not need to be audited

Parameter: no_audit_client

Its default value is an empty string, indicating that the default configuration is used and no clients and IP addresses are added to the audit blacklist.

Audit of CREATE, ALTER, and DROP operations on database objects

Parameter: audit_system_object

Its default value is 67121159, which indicates that the CREATE, ALTER, and DROP operations only on databases, schemas, users, and SQL patches are audited.

Audit of INSERT, UPDATE, and DELETE operations on a specific table

Parameter: audit_dml_state

Its default value is 0, which indicates that the audit of DML operations (except SELECT) on a specific table is disabled.

SELECT operation audit

Parameter: audit_dml_state_select

Its default value is 0, which indicates that the audit of the SELECT operation is disabled.

COPY operation audit

Parameter: audit_copy_exec

Its default value is 1, which indicates that the audit of COPY operations is enabled.

Audit of execution of stored procedures and customized functions

Parameter: audit_function_exec

Its default value is 0, which indicates that no execution audit logs of stored procedures and customized functions are recorded.

Audit of system functions in the whitelist

Parameter: audit_system_function_exec

Its default value is 0, which indicates that audit logs of system function execution are not recorded.

SET operation audit

Parameter: audit_set_parameter

Its default value is 0, which indicates that the audit of the SET operation is disabled.

Transaction ID record

Parameter: audit_xid_info

Its default value is 0, which indicates that the function of recording transaction IDs in audit logs is disabled.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback