Skip to content

privilege-management: add AUDIT_ADMIN and RESTRICTED_AUDIT_ADMIN - #24666

Open
lilin90 wants to merge 2 commits into
pingcap:masterfrom
lilin90:add-audit-admin-privileges-22018
Open

lilin90 wants to merge 2 commits into
pingcap:masterfrom
lilin90:add-audit-admin-privileges-22018

Conversation

@lilin90

@lilin90 lilin90 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What is changed, added, or deleted? (Required)

Add the AUDIT_ADMIN and RESTRICTED_AUDIT_ADMIN dynamic privileges to the dynamic privilege list in privilege-management.md, and list the products where they are available: TiDB Enterprise, TiDB Cloud Dedicated, TiDB Cloud Premium, and TiDB Cloud Essential (database audit logging is in beta and available upon request). TiDB Cloud Starter does not support database audit logging.

Both privileges control database audit log management: audit-related system variables, manual audit log rotation, and audit log filters/rules. AUDIT_ADMIN is required when SEM is disabled, and RESTRICTED_AUDIT_ADMIN is required when SEM is enabled.

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

  • 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)

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

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

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

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added guidance on audit-log management privileges, including their availability by product and edition.
    • Clarified that the feature is in Private Preview for Essential and is not supported in Starter.

@lilin90 lilin90 added needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ONCALL Relates to documentation oncall. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. labels Nov 9, 2026
Synced from: pingcap/docs-cn#22018
Target PR: pingcap#24666

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Auto-sync completed successfully

Source PR: pingcap/docs-cn#22018
Target PR: #24666

English documentation has been updated based on Chinese documentation changes.

@ti-chi-bot ti-chi-bot Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 9, 2026
@lilin90 lilin90 self-assigned this Nov 9, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 9, 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 lilin90. 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

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The Dynamic privileges list documents AUDIT_ADMIN for managing database audit logs when SEM is disabled and RESTRICTED_AUDIT_ADMIN when SEM is enabled. It also lists supported products and access requirements.

Changes: Audit privilege documentation

Layer / File(s) Summary
Document audit privileges
privilege-management.md
The Dynamic privileges list describes AUDIT_ADMIN and RESTRICTED_AUDIT_ADMIN, the products that offer database audit logging, Essential’s Private Preview access requirement, and Starter’s exclusion.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: qiancai

Merge Risk: Low · up to 7f0c6

The availability description may set incorrect expectations for Essential and Dedicated users. Correcting it is a bounded documentation follow-up.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the two dynamic privileges added to privilege-management.md, which is the main change in the changeset. It is specific and follows the repository's convention of a file-scope prefix fo…
Description check Passed The description fills the required 'What is changed, added, or deleted' section with the privileges, their scope (SEM enabled and disabled), and the products where they are available. The version chec…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Title check

Explanation

The title names the two dynamic privileges added to privilege-management.md, which is the main change in the changeset. It is specific and follows the repository's convention of a file-scope prefix followed by a short description.

Full details: Description check

Explanation

The description fills the required 'What is changed, added, or deleted' section with the privileges, their scope (SEM enabled and disabled), and the products where they are available. The version checklist is completed for master and v8.5, and the translation source and AI agent involvement are stated. The first-time contributor checklist is omitted, which is acceptable because it applies only to first-time contributors. The related code change PR field is left blank, which is acceptable because the template marks it as applicable only when a code change exists.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@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: 2

Review info

Run configuration

  • Source mode: Auto
  • Repository: pingcap/docs
  • Branch: master
  • File: .coderabbit.yaml
  • Commit: 16b9550
  • Layers: Repository YAML
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7df10b72-42f9-4550-8d23-1222f159333b
Commits

Reviewing files that changed from the base of the PR and between 16b9550 and 7f0c66a.

Files selected for processing: 1

  • privilege-management.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread privilege-management.md Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ONCALL Relates to documentation oncall. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant