Skip to content

Commit ba3d83d

Browse files
authored
Remove cloud_id from resources list for check permissions (#26889)
2 parents 02b13bc + 86a3244 commit ba3d83d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ydb/core/grpc_services/grpc_request_check_actor.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ inline TVector<TEvTicketParser::TEvAuthorizeTicket::TEntry> GetEntriesForCluster
7070
static const auto permissions = NKikimr::TEvTicketParser::TEvAuthorizeTicket::ToPermissions({
7171
"ydb.clusters.get", "ydb.clusters.monitor", "ydb.clusters.manage"
7272
});
73-
static const std::vector<TString> allowedAttributes = {"cloud_id", "folder_id"};
73+
static const std::vector<TString> allowedAttributes = {"folder_id"};
7474
TVector<std::pair<TString, TString>> attributes;
7575
for (const auto& attr : rootAttributes) {
7676
if (std::find(allowedAttributes.begin(), allowedAttributes.end(), attr.first) != allowedAttributes.end()) {
@@ -124,7 +124,9 @@ class TGrpcRequestCheckActor
124124

125125
void ProcessCommonAttributes(const TSchemeBoardEvents::TDescribeSchemeResult& schemeData, const TVector<std::pair<TString, TString>>& rootAttributes) {
126126
TVector<TEvTicketParser::TEvAuthorizeTicket::TEntry> entries;
127-
static std::vector<TString> allowedAttributes = {"cloud_id", "folder_id", "service_account_id", "database_id"};
127+
// cloud_id is not checked. Access Service has information about cloud in which the folder is located
128+
// In order to check cloud_id need change config in Access Service. Request to IAM service
129+
static std::vector<TString> allowedAttributes = {"folder_id", "service_account_id", "database_id"};
128130
TVector<std::pair<TString, TString>> attributes;
129131
attributes.reserve(schemeData.GetPathDescription().UserAttributesSize());
130132
for (const auto& attr : schemeData.GetPathDescription().GetUserAttributes()) {

0 commit comments

Comments
 (0)