Skip to content

Commit 22bee29

Browse files
Kafka auth flag and bugfix in ts (#14220)
1 parent 3b64cf8 commit 22bee29

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

ydb/core/kafka_proxy/actors/kafka_fetch_actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void TKafkaFetchActor::FillRecordsBatch(const NKikimrClient::TPersQueueFetchResp
148148
}
149149

150150
lastOffset = result.GetOffset();
151-
lastTimestamp = result.GetWriteTimestampMS();
151+
lastTimestamp = result.GetCreateTimestampMS();
152152
auto& record = recordsBatch.Records[recordIndex];
153153

154154
record.DataChunk = NKikimr::GetDeserializedData(result.GetData());

ydb/core/kafka_proxy/actors/kafka_sasl_auth_actor.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ void TKafkaSaslAuthActor::SendLoginRequest(TKafkaSaslAuthActor::TAuthData authDa
161161

162162
void TKafkaSaslAuthActor::SendApiKeyRequest() {
163163
auto entries = NKikimr::NGRpcProxy::V1::GetTicketParserEntries(DatabaseId, FolderId);
164-
164+
TString ticket;
165+
if (Context->Config.GetAuthViaApiKey()) {
166+
ticket = "ApiKey " + ClientAuthData.Password;
167+
} else {
168+
ticket = ClientAuthData.Password;
169+
}
165170
Send(NKikimr::MakeTicketParserID(), new NKikimr::TEvTicketParser::TEvAuthorizeTicket({
166171
.Database = DatabasePath,
167172
.Ticket = "ApiKey " + ClientAuthData.Password,

ydb/core/protos/config.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2125,7 +2125,8 @@ message TKafkaProxyConfig {
21252125
}
21262126

21272127
optional TProxy Proxy = 7;
2128-
optional bool MeteringV2Enabled = 10 [default = false];
2128+
optional bool MeteringV2Enabled = 10 [default = true];
2129+
optional bool AuthViaApiKey = 11 [default = true];
21292130
}
21302131

21312132
message TAwsCompatibilityConfig {

0 commit comments

Comments
 (0)