mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-10 17:46:02 +00:00
fix(frontend): add support for SASL_KERBEROS_SERVICE_NAME & SASL_PLAINTEXT (#3022)
Co-authored-by: jsotelo <javier.sotelo@viasat.com>
This commit is contained in:
parent
b1b55e19fe
commit
fcabd5ba91
@ -33,7 +33,8 @@ public class TrackingController extends Controller {
|
||||
private final Logger _logger = LoggerFactory.getLogger(TrackingController.class.getName());
|
||||
|
||||
private static final List<String> KAFKA_SSL_PROTOCOLS = Collections.unmodifiableList(
|
||||
Arrays.asList(SecurityProtocol.SSL.name(),SecurityProtocol.SASL_SSL.name()));
|
||||
Arrays.asList(SecurityProtocol.SSL.name(),SecurityProtocol.SASL_SSL.name(),
|
||||
SecurityProtocol.SASL_PLAINTEXT.name()));
|
||||
|
||||
private final Boolean _isEnabled;
|
||||
private final Config _config;
|
||||
@ -118,9 +119,12 @@ public class TrackingController extends Controller {
|
||||
setConfig(props, SslConfigs.SSL_PROTOCOL_CONFIG, "analytics.kafka.ssl.protocol");
|
||||
setConfig(props, SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, "analytics.kafka.ssl.endpoint.identification.algorithm");
|
||||
|
||||
if (_config.getString(securityProtocolConfig).equals(SecurityProtocol.SASL_SSL.name())) {
|
||||
final String securityProtocol = _config.getString(securityProtocolConfig);
|
||||
if (securityProtocol.equals(SecurityProtocol.SASL_SSL.name())
|
||||
|| securityProtocol.equals(SecurityProtocol.SASL_PLAINTEXT.name())) {
|
||||
setConfig(props, SaslConfigs.SASL_MECHANISM, "analytics.kafka.sasl.mechanism");
|
||||
setConfig(props, SaslConfigs.SASL_JAAS_CONFIG, "analytics.kafka.sasl.jaas.config");
|
||||
setConfig(props, SaslConfigs.SASL_KERBEROS_SERVICE_NAME, "analytics.kafka.sasl.kerberos.service.name");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -162,6 +162,7 @@ analytics.kafka.ssl.endpoint.identification.algorithm = ${?KAFKA_PROPERTIES_SSL_
|
||||
# If analytics.kafka.security.protocol is set to "SASL_SSL", both of these need to be set.
|
||||
analytics.kafka.sasl.mechanism = ${?KAFKA_PROPERTIES_SASL_MECHANISM}
|
||||
analytics.kafka.sasl.jaas.config = ${?KAFKA_PROPERTIES_SASL_JAAS_CONFIG}
|
||||
analytics.kafka.sasl.kerberos.service.name = ${?KAFKA_PROPERTIES_SASL_KERBEROS_SERVICE_NAME}
|
||||
|
||||
# Required Elastic Client Configuration
|
||||
analytics.elastic.host = ${ELASTIC_CLIENT_HOST}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user