diff --git a/src/main/java/kafdrop/Kafdrop.java b/src/main/java/kafdrop/Kafdrop.java index b94ace3a..d4a4bc75 100644 --- a/src/main/java/kafdrop/Kafdrop.java +++ b/src/main/java/kafdrop/Kafdrop.java @@ -147,21 +147,9 @@ public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) { LOG.info("Initializing JAAS config"); final String env = environment.getProperty("kafka.env"); - final boolean isSecured = environment.getProperty("kafka.isSecured", Boolean.class); - LOG.info("env: {} .isSecured kafka: {}", env, isSecured); - if (isSecured && Strings.isNullOrEmpty(env)) { - throw new IllegalArgumentException("Value of 'env' cannot be null if connecting to secured kafka."); - } - LOG.info("Env: {}", env); String path; - if (isSecured) { - path = environment.getProperty("user.dir") + "/kaas_" + env.toLowerCase() + "_jaas.conf"; - LOG.info("PATH: {}", path); - System.setProperty("java.security.auth.login.config", path); - } - if (environment.containsProperty(SM_CONFIG_DIR)) { Stream.of("kafdrop", "global") .map(name -> readProperties(environment, name)) diff --git a/src/main/java/kafdrop/config/KafkaConfiguration.java b/src/main/java/kafdrop/config/KafkaConfiguration.java index bb6e137e..e29bd815 100644 --- a/src/main/java/kafdrop/config/KafkaConfiguration.java +++ b/src/main/java/kafdrop/config/KafkaConfiguration.java @@ -22,7 +22,6 @@ public final class KafkaConfiguration { private static final Logger LOG = LoggerFactory.getLogger(KafkaConfiguration.class); private String brokerConnect; - private boolean isSecured = false; private String saslMechanism; private String securityProtocol; private String truststoreFile; @@ -31,12 +30,8 @@ public final class KafkaConfiguration { public void applyCommon(Properties properties) { properties.setProperty(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, brokerConnect); - if (isSecured) { - LOG.warn("The 'isSecured' property is deprecated; consult README.md on the preferred way to configure security"); - properties.put(SaslConfigs.SASL_MECHANISM, saslMechanism); - } - if (isSecured || securityProtocol.equals("SSL")) { + if (securityProtocol.equals("SSL")) { properties.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c7d3a4df..d80ad48d 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -38,7 +38,6 @@ kafdrop.monitor: kafka: brokerConnect: localhost:9092 - isSecured: false saslMechanism: "PLAIN" securityProtocol: "SASL_PLAINTEXT" truststoreFile: "${KAFKA_TRUSTSTORE_FILE:kafka.truststore.jks}"