Skip to content

Commit

Permalink
Authenticate client by certificate when get config
Browse files Browse the repository at this point in the history
  • Loading branch information
molotkov-and committed Apr 9, 2024
1 parent 3f80999 commit d33479a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ydb/core/client/server/msgbus_server_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ class TConsoleRequestActor : public TMessageBusSecureRequest<TMessageBusServerRe
: TBase(msg)
, Request(request)
{
TBase::SetSecurityToken(request.GetSecurityToken());
const auto& token = request.GetSecurityToken();
const auto& clientCertificate = msg.FindClientCert();
if (!token.empty()) {
TBase::SetSecurityToken(token);
} else if (!clientCertificate.empty()){
TBase::SetClientCertificate(TString(clientCertificate.front()));
}
TBase::SetRequireAdminAccess(true);

}

void Bootstrap(const TActorContext &ctx)
Expand Down

0 comments on commit d33479a

Please sign in to comment.