Skip to content

Db audit log beta dedicated - #22889

Open
ginkgoch wants to merge 15 commits into
pingcap:release-8.5from
ginkgoch:db-audit-log-beta-dedicated
Open

Db audit log beta dedicated#22889
ginkgoch wants to merge 15 commits into
pingcap:release-8.5from
ginkgoch:db-audit-log-beta-dedicated

Conversation

@ginkgoch

@ginkgoch ginkgoch commented May 14, 2026

Copy link
Copy Markdown
Collaborator

First-time contributors' checklist

What is changed, added or deleted? (Required)

We are going to public preview audit log v2, so documents are update accordingly. V1 document is still keep for existing user for reference.

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Summary by CodeRabbit

  • New Documentation

    • Added “TiDB Cloud Dedicated Database Audit Logging (Legacy)” documentation with enablement prerequisites, AWS/GCS/Azure log forwarding setup, auditing filter rules, disablement behavior, and audit log field schema.
  • Documentation

    • Updated Dedicated Database Audit Logging docs for Public Preview eligibility and revised enable/disable workflows across AWS, GCS, and Azure, including “Test Connection and Save” and updated settings (rotation/redaction, limitations).
    • Refreshed guidance on auditing filter rules and table/field breakdowns, and updated the Table of Contents link for audit management.

@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels May 14, 2026
@ti-chi-bot

ti-chi-bot Bot commented May 14, 2026

Copy link
Copy Markdown

Hi @ginkgoch. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the TiDB Cloud Dedicated Database Audit Logging documentation to reflect its Public Preview status, introduces a legacy guide, and details new configuration steps for log rotation and redaction. Reviewer feedback focuses on correcting grammatical errors, ensuring terminology consistency for Azure storage, and aligning list formatting and capitalization with the style guide.

Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing-legacy.md Outdated
@ti-chi-bot

ti-chi-bot Bot commented May 14, 2026

Copy link
Copy Markdown

@jusong: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hfxsd hfxsd added translation/no-need No need to translate this PR. and removed missing-translation-status This PR does not have translation status info. labels May 26, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

TiDB Cloud audit logging documentation now covers Public Preview eligibility, updated cloud-storage workflows, settings, limitations, and schemas. A separate legacy reference page was added, and the table of contents now links to both documentation versions.

Changes

Audit Logging Documentation

Layer / File(s) Summary
Current audit logging workflows and reference
tidb-cloud/tidb-cloud-auditing.md
Updates eligibility from request-only to Public Preview with version/region criteria, modernizes AWS/GCS/Azure setup steps with "Test Connection and Save" flows, adds database settings sections, updates disabling instructions, and adds event classes, field definitions, limitations, and legacy references.
Legacy audit logging reference
tidb-cloud/tidb-cloud-auditing-legacy.md
Adds prerequisites, detailed AWS/GCS/Azure cloud storage enablement workflows, filter rule configuration, log retrieval guidance, disabling behavior, and comprehensive audit log field schema with event class variants.
Audit logging navigation
TOC-tidb-cloud.md
Updates table of contents entry from "TiDB Cloud Dedicated Database Audit Logging" to "Database Audit Logging" while preserving the link target.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: area/tidb-cloud

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: updating dedicated database audit logging docs for the audit log v2 public preview.
Description check ✅ Passed The description covers the change and target version, and the required sections are present even though reference links and optional checkboxes are left blank.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2e4c69ef-264f-4f2d-a81b-b9912681f063

📥 Commits

Reviewing files that changed from the base of the PR and between ae49837 and 5eead49.

📒 Files selected for processing (3)
  • TOC-tidb-cloud.md
  • tidb-cloud/tidb-cloud-auditing-legacy.md
  • tidb-cloud/tidb-cloud-auditing.md

Comment thread tidb-cloud/tidb-cloud-auditing-legacy.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
ginkgoch and others added 3 commits July 23, 2026 18:24
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tidb-cloud/tidb-cloud-auditing.md (1)

112-112: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the bucket-region wording.

“Where the bucket locates” is ungrammatical. Replace it with “where the bucket is located.”

Suggested replacement
-2. In the **Bucket Region** drop-down list, select the AWS region where the bucket locates.
+2. In the **Bucket Region** drop-down list, select the AWS region where the bucket is located.

Source: Path instructions


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 21a4092c-e56f-4943-8465-f1f32f294245

📥 Commits

Reviewing files that changed from the base of the PR and between 5eead49 and ab32441.

📒 Files selected for processing (2)
  • tidb-cloud/tidb-cloud-auditing-legacy.md
  • tidb-cloud/tidb-cloud-auditing.md

@qiancai qiancai self-assigned this Jul 24, 2026
@qiancai qiancai added the area/tidb-cloud This PR relates to the area of TiDB Cloud. label Jul 24, 2026
Comment thread tidb-cloud/tidb-cloud-auditing-legacy.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
Comment thread tidb-cloud/tidb-cloud-auditing.md Outdated
| `TABLES` | The accessed tables related to this audit record. |
| `STATUS_CODE` | The status code of the audit record. `1` means success, and `0` means failure. |
| `KEYSPACE_NAME` | The keyspace name of the audit record. |
| `SERVERLESS_TENANT_ID` | The ID of the serverless tenant that the {{{ .essential }}} instance belongs to. |

@qiancai qiancai Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the Dedicated audit logging page and the prerequisites already direct Essential users to a separate document.

Suggested change
| `SERVERLESS_TENANT_ID` | The ID of the serverless tenant that the {{{ .essential }}} instance belongs to. |

| `STATUS_CODE` | The status code of the audit record. `1` means success, and `0` means failure. |
| `KEYSPACE_NAME` | The keyspace name of the audit record. |
| `SERVERLESS_TENANT_ID` | The ID of the serverless tenant that the {{{ .essential }}} instance belongs to. |
| `SERVERLESS_PROJECT_ID` | The ID of the serverless project that the {{{ .essential }}} instance belongs to. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above: this serverless-only field belongs in the Essential audit logging doc, not the Dedicated doc.

Suggested change
| `SERVERLESS_PROJECT_ID` | The ID of the serverless project that the {{{ .essential }}} instance belongs to. |

| `KEYSPACE_NAME` | The keyspace name of the audit record. |
| `SERVERLESS_TENANT_ID` | The ID of the serverless tenant that the {{{ .essential }}} instance belongs to. |
| `SERVERLESS_PROJECT_ID` | The ID of the serverless project that the {{{ .essential }}} instance belongs to. |
| `SERVERLESS_CLUSTER_ID` | The ID of the serverless {{{ .essential }}} instance that the audit record belongs to. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above: this serverless-only field belongs in the Essential audit logging doc, not the Dedicated doc.

Suggested change
| `SERVERLESS_CLUSTER_ID` | The ID of the serverless {{{ .essential }}} instance that the audit record belongs to. |

@ti-chi-bot

ti-chi-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from qiancai. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment thread tidb-cloud/tidb-cloud-auditing-legacy.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tidb-cloud This PR relates to the area of TiDB Cloud. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. translation/no-need No need to translate this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants