Skip to content

Commit

Permalink
Kafka auth flag and bugfix in ts (#14220)
Browse files Browse the repository at this point in the history
  • Loading branch information
FloatingCrowbar authored Feb 18, 2025
1 parent 3b64cf8 commit 22bee29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ydb/core/kafka_proxy/actors/kafka_fetch_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void TKafkaFetchActor::FillRecordsBatch(const NKikimrClient::TPersQueueFetchResp
}

lastOffset = result.GetOffset();
lastTimestamp = result.GetWriteTimestampMS();
lastTimestamp = result.GetCreateTimestampMS();
auto& record = recordsBatch.Records[recordIndex];

record.DataChunk = NKikimr::GetDeserializedData(result.GetData());
Expand Down
7 changes: 6 additions & 1 deletion ydb/core/kafka_proxy/actors/kafka_sasl_auth_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,12 @@ void TKafkaSaslAuthActor::SendLoginRequest(TKafkaSaslAuthActor::TAuthData authDa

void TKafkaSaslAuthActor::SendApiKeyRequest() {
auto entries = NKikimr::NGRpcProxy::V1::GetTicketParserEntries(DatabaseId, FolderId);

TString ticket;
if (Context->Config.GetAuthViaApiKey()) {
ticket = "ApiKey " + ClientAuthData.Password;
} else {
ticket = ClientAuthData.Password;
}
Send(NKikimr::MakeTicketParserID(), new NKikimr::TEvTicketParser::TEvAuthorizeTicket({
.Database = DatabasePath,
.Ticket = "ApiKey " + ClientAuthData.Password,
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/protos/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,8 @@ message TKafkaProxyConfig {
}

optional TProxy Proxy = 7;
optional bool MeteringV2Enabled = 10 [default = false];
optional bool MeteringV2Enabled = 10 [default = true];
optional bool AuthViaApiKey = 11 [default = true];
}

message TAwsCompatibilityConfig {
Expand Down

0 comments on commit 22bee29

Please sign in to comment.