-
Notifications
You must be signed in to change notification settings - Fork 749
Extended permissions in whoami #32907
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?
Conversation
|
🟢 |
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 extends the WhoAmI functionality in the YDB discovery service to return effective permission information about the authenticated user, including whether a token is required and what level of access the user has (Database, Viewer, Monitoring, or Administration).
Changes:
- Added permission fields to the WhoAmI protobuf message and response handling
- Extended the SDK client to expose permission checking methods
- Updated the CLI to display effective permissions when the
--groupsflag is used - Added comprehensive unit tests covering various permission scenarios
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ydb/public/api/protos/ydb_discovery.proto | Added 5 boolean fields for permission information to WhoAmIResult message |
| ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/discovery/discovery.h | Added permission getter methods and member variables to TWhoAmIResult class |
| ydb/public/sdk/cpp/src/client/discovery/discovery.cpp | Implemented permission extraction from proto and getter method implementations |
| ydb/public/lib/ydb_cli/commands/ydb_service_discovery.cpp | Added permission output display in CLI when --groups flag is used |
| ydb/core/grpc_services/rpc_whoami.cpp | Implemented server-side permission checking logic with proper hierarchy (Administration > Monitoring > Viewer > Database) |
| ydb/services/ydb/ydb_whoami_ut.cpp | Added comprehensive unit tests covering all permission scenarios and edge cases |
| ydb/services/ydb/ut/ya.make | Updated build configuration to include new test file and discovery client dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
Added extended whoami output to include effective permissions (token required, admin/monitoring/viewer/database).
Changelog category
Description for reviewers
...