Skip to content

docs: add Query Guard plugin docs for banning DROP TABLE/DATABASE - #2654

Merged
v0y4g3r merged 4 commits into
mainfrom
docs/query-guard
Jul 28, 2026
Merged

docs: add Query Guard plugin docs for banning DROP TABLE/DATABASE#2654
v0y4g3r merged 4 commits into
mainfrom
docs/query-guard

Conversation

@v0y4g3r

@v0y4g3r v0y4g3r commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What's changed

Add documentation for the GreptimeDB Enterprise Query Guard plugin, including the new ban_drop_table / ban_drop_database options introduced in GreptimeTeam/greptimedb-enterprise#832.

  • New page enterprise/deployments-administration/query-guard (EN + ZH):
    • How the bans work: enforced in query interceptors before permission checks, so they apply to all users including admins
    • SQL path (MySQL/PostgreSQL/HTTP) rejects DROP TABLE / DROP DATABASE; gRPC path rejects DROP TABLE DDL requests (no drop-database variant in gRPC)
    • Internal operations (TTL, auto-cleanup) are unaffected
    • Configuration example: [[plugins]] [plugins.query_guard] with enable, ban_drop_table, ban_drop_database
    • Caveats: every frontend must carry the config in multi-frontend deployments; enabling the plugin also turns on the pre-existing disallow_cross_catalog_query behavior (documented here for the first time)
  • Sidebar: registered under Enterprise → Deployments & Administration
  • Cross-links: added a tip in the DROP SQL reference (EN + ZH) pointing to the new page

Verification

  • pnpm typecheck
  • pnpm build (EN) ✅
  • DOC_LANG=zh pnpm build (ZH) ✅

Document the enterprise query_guard plugin configuration added in
GreptimeTeam/greptimedb-enterprise#832, including ban_drop_table and
ban_drop_database options, SQL/gRPC enforcement behavior, and
deployment caveats. Also document the pre-existing
disallow_cross_catalog_query behavior and cross-link from the DROP
SQL reference.
Copilot AI review requested due to automatic review settings July 27, 2026 11:15

Copilot AI 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.

Pull request overview

This PR adds end-user documentation for the GreptimeDB Enterprise Query Guard plugin, explaining how it can enforce hard bans on destructive DROP TABLE / DROP DATABASE operations (and documenting the existing cross-catalog restriction behavior) across supported protocols.

Changes:

  • Added a new Query Guard documentation page in both English and Chinese, including behavior overview, protocol coverage, configuration, and caveats.
  • Registered the new page in the Enterprise → Deployments & Administration sidebar.
  • Added cross-links from the DROP SQL reference pages (EN + ZH) to the new Query Guard documentation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sidebars.ts Adds the Query Guard doc to the Enterprise → Deployments & Administration sidebar.
i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/drop.md Adds a tip linking to Query Guard as a way to ban DROP statements for all users.
i18n/zh/docusaurus-plugin-content-docs/current/enterprise/deployments-administration/query-guard.md New Chinese Query Guard page covering behavior, configuration, and caveats.
docs/reference/sql/drop.md Adds a tip linking to Query Guard as a way to ban DROP statements for all users.
docs/enterprise/deployments-administration/query-guard.md New English Query Guard page covering behavior, configuration, and caveats.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploying greptime-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7bef878
Status: ✅  Deploy successful!
Preview URL: https://0a33b32d.greptime-docs.pages.dev
Branch Preview URL: https://docs-query-guard.greptime-docs.pages.dev

View logs

@shuiyisong shuiyisong 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.

Two source-validated documentation findings.

Comment thread docs/enterprise/deployments-administration/query-guard.md
Comment thread docs/enterprise/deployments-administration/query-guard.md Outdated
v0y4g3r added 2 commits July 28, 2026 10:45
…g DDL/Flight)

Address review feedback: the query_guard plugin unconditionally rejects
COPY statements, cross-catalog gRPC DDL requests, and Flight bulk
inserts targeting a different catalog whenever it is enabled,
independent of the DROP bans.
Address review feedback: only the structured gRPC DDL request lacks a
drop-database variant; SQL statements sent over gRPC still pass through
the SQL query interceptors, so both DROP bans apply there.
@v0y4g3r
v0y4g3r requested a review from shuiyisong July 28, 2026 02:52
@v0y4g3r
v0y4g3r merged commit 1a22938 into main Jul 28, 2026
5 checks passed
@v0y4g3r
v0y4g3r deleted the docs/query-guard branch July 28, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants