diff --git a/ydb/core/kafka_proxy/kafka_connection.cpp b/ydb/core/kafka_proxy/kafka_connection.cpp index c42e11b22bde..7c1fd7cded58 100644 --- a/ydb/core/kafka_proxy/kafka_connection.cpp +++ b/ydb/core/kafka_proxy/kafka_connection.cpp @@ -101,7 +101,7 @@ class TKafkaConnection: public TActorBootstrapped, public TNet void Bootstrap() { Context->ConnectionId = SelfId(); - Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement; + Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement || NKikimr::AppData()->PQConfig.GetRequireCredentialsInNewProtocol(); // if no authentication required, then we can use local database as our target if (!Context->RequireAuthentication) { Context->DatabasePath = NKikimr::AppData()->TenantName; @@ -452,7 +452,7 @@ class TKafkaConnection: public TActorBootstrapped, public TNet return; } - Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement; + Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement || NKikimr::AppData()->PQConfig.GetRequireCredentialsInNewProtocol(); Context->UserToken = event->UserToken; Context->DatabasePath = event->DatabasePath; Context->AuthenticationStep = authStep;