From fe50df651fa1cfa968c745fe30f7803dbfcb8875 Mon Sep 17 00:00:00 2001 From: vincenzo-ingenito Date: Wed, 11 Dec 2024 15:52:49 +0000 Subject: [PATCH] feat: Update name clientId --- .../ms/gtw/statusmanager/config/kafka/KafkaConsumerCFG.java | 2 +- .../ms/gtw/statusmanager/config/kafka/KafkaProducerCFG.java | 3 +-- .../ms/gtw/statusmanager/config/kafka/KafkaPropertiesCFG.java | 4 ++-- .../kafka/oauth2/CustomAuthenticateCallbackHandler.java | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaConsumerCFG.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaConsumerCFG.java index 6bb00a4..e9cb8bc 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaConsumerCFG.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaConsumerCFG.java @@ -93,7 +93,7 @@ public Map consumerConfigs() { if("OAUTHBEARER".equals(kafkaPropsCfg.getMechanism())) { props.put("sasl.login.callback.handler.class", CustomAuthenticateCallbackHandler.class); props.put("kafka.oauth.tenantId", kafkaPropsCfg.getTenantId()); - props.put("kafka.oauth.clientId", kafkaPropsCfg.getClientId()); + props.put("kafka.oauth.appId", kafkaPropsCfg.getAppId()); props.put("kafka.oauth.pwd", kafkaPropsCfg.getPwd()); } diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaProducerCFG.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaProducerCFG.java index a4b851e..640bf80 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaProducerCFG.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaProducerCFG.java @@ -75,10 +75,9 @@ public Map producerWithoutTransactionConfigs() { if("OAUTHBEARER".equals(kafkaPropCFG.getMechanism())) { props.put("sasl.login.callback.handler.class", CustomAuthenticateCallbackHandler.class); props.put("kafka.oauth.tenantId", kafkaPropCFG.getTenantId()); - props.put("kafka.oauth.clientId", kafkaPropCFG.getClientId()); + props.put("kafka.oauth.appId", kafkaPropCFG.getAppId()); props.put("kafka.oauth.pwd", kafkaPropCFG.getPwd()); } - return props; } diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaPropertiesCFG.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaPropertiesCFG.java index 84f25a3..7399349 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaPropertiesCFG.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/KafkaPropertiesCFG.java @@ -21,8 +21,8 @@ public class KafkaPropertiesCFG { @Value("${kafka.oauth.tenantId}") private String tenantId; - @Value("${kafka.oauth.clientId}") - private String clientId; + @Value("${kafka.oauth.appId}") + private String appId; @Value("${kafka.oauth.pwd}") private String pwd; diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java index 016d15e..177d1a5 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java @@ -57,7 +57,7 @@ public void configure(Map configs, String mechanism, List