-
Notifications
You must be signed in to change notification settings - Fork 708
premium: add database audit logging #22044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
a20707a
502327b
0117999
69f55db
8b94e02
18413e0
c7a594b
2797b75
cfcd8ee
2dcab32
844c087
7443222
994db6f
727a053
8e19ccb
399bfbe
73465c9
9fe22f9
da08721
321ba0b
122693a
377acf2
1cb5fab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,316 @@ | ||||||
| --- | ||||||
| title: TiDB Cloud Premium Database Audit Logging | ||||||
| summary: Learn about how to audit a instance in TiDB Cloud. | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| --- | ||||||
|
|
||||||
| # TiDB Cloud Premium Database Audit Logging | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| TiDB Cloud provides you with a database audit logging feature to record a history of user access details (such as any SQL statements executed) in logs. | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| To assess the effectiveness of user access policies and other information security measures of your organization, it is a security best practice to conduct a periodic analysis of the database audit logs. | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| The audit logging feature is disabled by default. To audit a instance, you need to enable the audit logging first, and then specify the auditing filter rules. | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| > **Note:** | ||||||
| > | ||||||
| > Because audit logging consumes instance resources, be prudent about whether to audit a instance. | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ## Prerequisites | ||||||
|
|
||||||
| - You are using a TiDB Cloud Premium instance. Audit logging is not available for {{{ .starter }}} or {{{ .essential }}} clusters. | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| - You are in the `Organization Owner` role of your organization. Otherwise, you cannot see the database audit-related options in the TiDB Cloud console. | ||||||
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ## Enable audit logging | ||||||
|
|
||||||
| TiDB Cloud supports recording the audit logs of a TiDB Cloud Premium instance to your cloud storage service. Before enabling database audit logging, configure your cloud storage service on the cloud provider where the instance is located. | ||||||
|
|
||||||
|
|
||||||
| ### Enable audit logging for AWS | ||||||
|
|
||||||
| To enable audit logging for AWS, take the following steps: | ||||||
|
|
||||||
| #### Step 1. Create an Amazon S3 bucket | ||||||
|
|
||||||
| Specify an Amazon S3 bucket in your corporate-owned AWS account as a destination to which TiDB Cloud writes the audit logs. | ||||||
|
|
||||||
| > **Note:** | ||||||
| > | ||||||
| > Do not enable object lock on the AWS S3 bucket. Enabling object lock will prevent TiDB Cloud from pushing audit log files to S3. | ||||||
|
|
||||||
| For more information, see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) in the AWS User Guide. | ||||||
|
|
||||||
| #### Step 2. Configure Amazon S3 access | ||||||
|
|
||||||
| 1. Get the TiDB Cloud Account ID and the External ID of the TiDB instance that you want to enable audit logging. | ||||||
|
|
||||||
| 1. In the TiDB Cloud console, navigate to the [**instances**](https://tidbcloud.com/instances) page of your instance. | ||||||
|
||||||
| 1. In the TiDB Cloud console, navigate to the [**instances**](https://tidbcloud.com/instances) page of your instance. | |
| 1. In the TiDB Cloud console, navigate to the [**instances**](https://tidbcloud.com/instances) page of your project. |
Style Guide References
Footnotes
-
The style guide requires the use of consistent terminology. ↩
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The success message has a grammatical error. "successfully" is an adverb, but "successful" (adjective) is expected here.1
| If it is successful, **The connection is successfully** is displayed. Otherwise, check your access configuration. | |
| If it is successful, **The connection is successful** is displayed. Otherwise, check your access configuration. |
Style Guide References
Footnotes
-
The style guide requires correct English grammar. ↩
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The success message has a grammatical error. "successfully" is an adverb, but "successful" (adjective) is expected here.1
| If it is successful, **The connection is successfully** is displayed. Otherwise, check your access configuration. | |
| If it is successful, **The connection is successful** is displayed. Otherwise, check your access configuration. |
Style Guide References
Footnotes
-
The style guide requires correct English grammar. ↩
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with other documentation (tidb-cloud-auditing.md), let's simplify this heading to "Configure Azure Blob access". This also requires updating the anchor link in line 216.1
| #### Step 2. Configure Azure Blob Storage access | |
| #### Step 2. Configure Azure Blob access |
Style Guide References
Footnotes
-
The style guide requires the use of consistent terminology. ↩
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The success message has a grammatical error. "successfully" is an adverb, but "successful" (adjective) is expected here.1
| If it is successful, **The connection is successfully** is displayed. Otherwise, check your access configuration. | |
| If it is successful, **The connection is successful** is displayed. Otherwise, check your access configuration. |
Style Guide References
Footnotes
-
The style guide requires correct English grammar. ↩
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammatical error: "a instance" should be "an instance".1
| To specify auditing filter rules for a instance, take the following steps: | |
| To specify auditing filter rules for an instance, take the following steps: |
Style Guide References
Footnotes
-
The style guide requires correct English grammar. ↩
lilin90 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For premium TiDB, the audit log does not name as tidb-0, besides don't use Pod here.
Uh oh!
There was an error while loading. Please reload this page.