-
Notifications
You must be signed in to change notification settings - Fork 738
Sanitize option for cluster state request #30114
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
base: main
Are you sure you want to change the base?
Sanitize option for cluster state request #30114
Conversation
|
🟢 |
|
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ ⚪ Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
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.
Pull request overview
This PR adds a sanitize option to the cluster state request API, allowing users to control whether sensitive data (authentication information, user SIDs, query text, etc.) is sanitized in the output. By default, cluster state previously always sanitized sensitive data; this change makes it configurable.
Key Changes:
- Added
bool sanitizefield to theClusterStateRequestprotobuf message - Implemented the setting throughout the stack: C++ SDK, CLI, and gRPC service
- Modified query generation logic to conditionally sanitize or skip sensitive queries based on the flag
Critical Security Issue: The protobuf field defaults to false, which means old clients that don't explicitly set this field will expose sensitive data that was previously always sanitized. This is a breaking change with security implications.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ydb/public/api/protos/ydb_monitoring.proto | Added sanitize boolean field to ClusterStateRequest (defaults to false - security concern) |
| ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/monitoring/monitoring.h | Added optional Sanitize setting to TClusterStateSettings |
| ydb/public/sdk/cpp/src/client/monitoring/monitoring.cpp | Implemented setting the sanitize field in the protobuf request |
| ydb/public/lib/ydb_cli/commands/ydb_state.h | Added NoSanitize flag to CLI command state |
| ydb/public/lib/ydb_cli/commands/ydb_state.cpp | Added --no-sanitize command-line option and wired it to the SDK setting |
| ydb/core/grpc_services/rpc_cluster_state.cpp | Modified server-side query generation to respect the sanitize flag for both column-level and query-level sanitization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Add a changelog entry please https://github.com/ydb-platform/ydb/blob/main/ydb/apps/ydb/CHANGELOG.md |
Changelog entry
...
Changelog category
Description for reviewers
...