Skip to content

Commit

Permalink
Renamed the audit log parameter account_type to login_user_level (ydb…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewstalin authored and azevaykin committed Feb 3, 2025
1 parent 789ba5a commit f6f5176
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ydb/core/grpc_services/audit_logins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void AuditLogLogin(IAuditCtx* ctx, const TString& database, const Ydb::Auth::Log
// Login
AUDIT_PART("login_user", (!request.user().empty() ? request.user() : EmptyValue))
AUDIT_PART("sanitized_token", (!sanitizedToken.empty() ? sanitizedToken : EmptyValue))
AUDIT_PART("account_type", AdminAccountType, (isAdmin && status == Ydb::StatusIds::SUCCESS))
AUDIT_PART("login_user_level", AdminAccountType, (isAdmin && status == Ydb::StatusIds::SUCCESS))

//TODO: (?) it is possible to show masked version of the resulting token here
);
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/tx/schemeshard/ut_login/ut_login.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,9 +976,9 @@ Y_UNIT_TEST_SUITE(TWebLoginService) {
UNIT_ASSERT(last.find("sanitized_token={none}") == std::string::npos);

if (isUserAdmin) {
UNIT_ASSERT_STRING_CONTAINS(last, "account_type=admin");
UNIT_ASSERT_STRING_CONTAINS(last, "login_user_level=admin");
} else {
UNIT_ASSERT(!last.contains("account_type=admin"));
UNIT_ASSERT(!last.contains("login_user_level=admin"));
}
}

Expand Down

0 comments on commit f6f5176

Please sign in to comment.