Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-20 Thread via GitHub


chia7712 commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1573199471


##
server/src/main/java/org/apache/kafka/server/config/KafkaSecurityConfigs.java:
##
@@ -0,0 +1,239 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslClientAuth;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.security.auth.KafkaPrincipalBuilder;
+import 
org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Common home for broker-side security configs which need to be accessible 
from the libraries shared
+ * between the broker and the multiple modules in Kafka.
+ *
+ * Note this is an internal API and subject to change without notice.
+ */
+public class KafkaSecurityConfigs {
+
+/** * SSL Configuration /
+public final static String SSL_PROTOCOL_CONFIG = 
SslConfigs.SSL_PROTOCOL_CONFIG;
+public final static String SSL_PROTOCOL_DOC = SslConfigs.SSL_PROTOCOL_DOC;
+public static final String SSL_PROTOCOL_DEFAULT = 
SslConfigs.DEFAULT_SSL_PROTOCOL;
+
+public final static String SSL_PROVIDER_CONFIG = 
SslConfigs.SSL_PROVIDER_CONFIG;
+public final static String SSL_PROVIDER_DOC = SslConfigs.SSL_PROVIDER_DOC;
+
+public final static String SSL_CIPHER_SUITES_CONFIG = 
SslConfigs.SSL_CIPHER_SUITES_CONFIG;
+public final static String SSL_CIPHER_SUITES_DOC = 
SslConfigs.SSL_CIPHER_SUITES_DOC;
+
+public final static String SSL_ENABLED_PROTOCOLS_CONFIG = 
SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG;
+public final static String SSL_ENABLED_PROTOCOLS_DOC = 
SslConfigs.SSL_ENABLED_PROTOCOLS_DOC;
+public static final String SSL_ENABLED_PROTOCOLS_DEFAULTS = 
SslConfigs.DEFAULT_SSL_ENABLED_PROTOCOLS;
+
+public final static String SSL_KEYSTORE_TYPE_CONFIG = 
SslConfigs.SSL_KEYSTORE_TYPE_CONFIG;
+public final static String SSL_KEYSTORE_TYPE_DOC = 
SslConfigs.SSL_KEYSTORE_TYPE_DOC;
+public static final String SSL_KEYSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_KEYSTORE_TYPE;
+
+public final static String SSL_KEYSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG;
+public final static String SSL_KEYSTORE_LOCATION_DOC = 
SslConfigs.SSL_KEYSTORE_LOCATION_DOC;
+
+public final static String SSL_KEYSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG;
+public final static String SSL_KEYSTORE_PASSWORD_DOC = 
SslConfigs.SSL_KEYSTORE_PASSWORD_DOC;
+
+public final static String SSL_KEY_PASSWORD_CONFIG = 
SslConfigs.SSL_KEY_PASSWORD_CONFIG;
+public final static String SSL_KEY_PASSWORD_DOC = 
SslConfigs.SSL_KEY_PASSWORD_DOC;
+
+public final static String SSL_KEYSTORE_KEY_CONFIG = 
SslConfigs.SSL_KEYSTORE_KEY_CONFIG;
+public final static String SSL_KEYSTORE_KEY_DOC = 
SslConfigs.SSL_KEYSTORE_KEY_DOC;
+
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG;
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC;
+public final static String SSL_TRUSTSTORE_TYPE_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG;
+public final static String SSL_TRUSTSTORE_TYPE_DOC = 
SslConfigs.SSL_TRUSTSTORE_TYPE_DOC;
+public static final String SSL_TRUSTSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_TRUSTSTORE_TYPE;
+
+public final static String SSL_TRUSTSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG;
+public final static String SSL_TRUSTSTORE_PASSWORD_DOC = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_DOC;
+
+public final static String SSL_TRUSTSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG;
+public final static String SSL_TRUSTSTORE_LOCATION_DOC = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_DOC;
+
+public final static String SSL_TRUSTSTORE_CERTIFICATES_CONFIG = 

Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-20 Thread via GitHub


chia7712 commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1573179046


##
server/src/main/java/org/apache/kafka/server/config/KafkaSecurityConfigs.java:
##
@@ -0,0 +1,239 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslClientAuth;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.security.auth.KafkaPrincipalBuilder;
+import 
org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Common home for broker-side security configs which need to be accessible 
from the libraries shared
+ * between the broker and the multiple modules in Kafka.
+ *
+ * Note this is an internal API and subject to change without notice.
+ */
+public class KafkaSecurityConfigs {
+
+/** * SSL Configuration /
+public final static String SSL_PROTOCOL_CONFIG = 
SslConfigs.SSL_PROTOCOL_CONFIG;
+public final static String SSL_PROTOCOL_DOC = SslConfigs.SSL_PROTOCOL_DOC;
+public static final String SSL_PROTOCOL_DEFAULT = 
SslConfigs.DEFAULT_SSL_PROTOCOL;
+
+public final static String SSL_PROVIDER_CONFIG = 
SslConfigs.SSL_PROVIDER_CONFIG;
+public final static String SSL_PROVIDER_DOC = SslConfigs.SSL_PROVIDER_DOC;
+
+public final static String SSL_CIPHER_SUITES_CONFIG = 
SslConfigs.SSL_CIPHER_SUITES_CONFIG;
+public final static String SSL_CIPHER_SUITES_DOC = 
SslConfigs.SSL_CIPHER_SUITES_DOC;
+
+public final static String SSL_ENABLED_PROTOCOLS_CONFIG = 
SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG;
+public final static String SSL_ENABLED_PROTOCOLS_DOC = 
SslConfigs.SSL_ENABLED_PROTOCOLS_DOC;
+public static final String SSL_ENABLED_PROTOCOLS_DEFAULTS = 
SslConfigs.DEFAULT_SSL_ENABLED_PROTOCOLS;
+
+public final static String SSL_KEYSTORE_TYPE_CONFIG = 
SslConfigs.SSL_KEYSTORE_TYPE_CONFIG;
+public final static String SSL_KEYSTORE_TYPE_DOC = 
SslConfigs.SSL_KEYSTORE_TYPE_DOC;
+public static final String SSL_KEYSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_KEYSTORE_TYPE;
+
+public final static String SSL_KEYSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG;
+public final static String SSL_KEYSTORE_LOCATION_DOC = 
SslConfigs.SSL_KEYSTORE_LOCATION_DOC;
+
+public final static String SSL_KEYSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG;
+public final static String SSL_KEYSTORE_PASSWORD_DOC = 
SslConfigs.SSL_KEYSTORE_PASSWORD_DOC;
+
+public final static String SSL_KEY_PASSWORD_CONFIG = 
SslConfigs.SSL_KEY_PASSWORD_CONFIG;
+public final static String SSL_KEY_PASSWORD_DOC = 
SslConfigs.SSL_KEY_PASSWORD_DOC;
+
+public final static String SSL_KEYSTORE_KEY_CONFIG = 
SslConfigs.SSL_KEYSTORE_KEY_CONFIG;
+public final static String SSL_KEYSTORE_KEY_DOC = 
SslConfigs.SSL_KEYSTORE_KEY_DOC;
+
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG;
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC;
+public final static String SSL_TRUSTSTORE_TYPE_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG;
+public final static String SSL_TRUSTSTORE_TYPE_DOC = 
SslConfigs.SSL_TRUSTSTORE_TYPE_DOC;
+public static final String SSL_TRUSTSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_TRUSTSTORE_TYPE;
+
+public final static String SSL_TRUSTSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG;
+public final static String SSL_TRUSTSTORE_PASSWORD_DOC = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_DOC;
+
+public final static String SSL_TRUSTSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG;
+public final static String SSL_TRUSTSTORE_LOCATION_DOC = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_DOC;
+
+public final static String SSL_TRUSTSTORE_CERTIFICATES_CONFIG = 

Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-19 Thread via GitHub


omkreddy commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1573153281


##
server/src/main/java/org/apache/kafka/server/config/KafkaSecurityConfigs.java:
##
@@ -0,0 +1,239 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslClientAuth;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.security.auth.KafkaPrincipalBuilder;
+import 
org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Common home for broker-side security configs which need to be accessible 
from the libraries shared
+ * between the broker and the multiple modules in Kafka.
+ *
+ * Note this is an internal API and subject to change without notice.
+ */
+public class KafkaSecurityConfigs {
+
+/** * SSL Configuration /
+public final static String SSL_PROTOCOL_CONFIG = 
SslConfigs.SSL_PROTOCOL_CONFIG;
+public final static String SSL_PROTOCOL_DOC = SslConfigs.SSL_PROTOCOL_DOC;
+public static final String SSL_PROTOCOL_DEFAULT = 
SslConfigs.DEFAULT_SSL_PROTOCOL;
+
+public final static String SSL_PROVIDER_CONFIG = 
SslConfigs.SSL_PROVIDER_CONFIG;
+public final static String SSL_PROVIDER_DOC = SslConfigs.SSL_PROVIDER_DOC;
+
+public final static String SSL_CIPHER_SUITES_CONFIG = 
SslConfigs.SSL_CIPHER_SUITES_CONFIG;
+public final static String SSL_CIPHER_SUITES_DOC = 
SslConfigs.SSL_CIPHER_SUITES_DOC;
+
+public final static String SSL_ENABLED_PROTOCOLS_CONFIG = 
SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG;
+public final static String SSL_ENABLED_PROTOCOLS_DOC = 
SslConfigs.SSL_ENABLED_PROTOCOLS_DOC;
+public static final String SSL_ENABLED_PROTOCOLS_DEFAULTS = 
SslConfigs.DEFAULT_SSL_ENABLED_PROTOCOLS;
+
+public final static String SSL_KEYSTORE_TYPE_CONFIG = 
SslConfigs.SSL_KEYSTORE_TYPE_CONFIG;
+public final static String SSL_KEYSTORE_TYPE_DOC = 
SslConfigs.SSL_KEYSTORE_TYPE_DOC;
+public static final String SSL_KEYSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_KEYSTORE_TYPE;
+
+public final static String SSL_KEYSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG;
+public final static String SSL_KEYSTORE_LOCATION_DOC = 
SslConfigs.SSL_KEYSTORE_LOCATION_DOC;
+
+public final static String SSL_KEYSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG;
+public final static String SSL_KEYSTORE_PASSWORD_DOC = 
SslConfigs.SSL_KEYSTORE_PASSWORD_DOC;
+
+public final static String SSL_KEY_PASSWORD_CONFIG = 
SslConfigs.SSL_KEY_PASSWORD_CONFIG;
+public final static String SSL_KEY_PASSWORD_DOC = 
SslConfigs.SSL_KEY_PASSWORD_DOC;
+
+public final static String SSL_KEYSTORE_KEY_CONFIG = 
SslConfigs.SSL_KEYSTORE_KEY_CONFIG;
+public final static String SSL_KEYSTORE_KEY_DOC = 
SslConfigs.SSL_KEYSTORE_KEY_DOC;
+
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG;
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC;
+public final static String SSL_TRUSTSTORE_TYPE_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG;
+public final static String SSL_TRUSTSTORE_TYPE_DOC = 
SslConfigs.SSL_TRUSTSTORE_TYPE_DOC;
+public static final String SSL_TRUSTSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_TRUSTSTORE_TYPE;
+
+public final static String SSL_TRUSTSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG;
+public final static String SSL_TRUSTSTORE_PASSWORD_DOC = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_DOC;
+
+public final static String SSL_TRUSTSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG;
+public final static String SSL_TRUSTSTORE_LOCATION_DOC = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_DOC;
+
+public final static String SSL_TRUSTSTORE_CERTIFICATES_CONFIG = 

Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-10 Thread via GitHub


chia7712 merged PR #15656:
URL: https://github.com/apache/kafka/pull/15656


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-09 Thread via GitHub


chia7712 commented on PR #15656:
URL: https://github.com/apache/kafka/pull/15656#issuecomment-2044920363

   @OmniaGM Could you fix the build error? thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


chia7712 commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1556371500


##
server/src/main/java/org/apache/kafka/server/config/KafkaSecurityConfigs.java:
##
@@ -0,0 +1,239 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslClientAuth;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.security.auth.KafkaPrincipalBuilder;
+import 
org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Common home for broker-side security configs which need to be accessible 
from the libraries shared
+ * between the broker and the multiple modules in Kafka.
+ *
+ * Note this is an internal API and subject to change without notice.
+ */
+public class KafkaSecurityConfigs {
+
+/** * SSL Configuration /
+public final static String SSL_PROTOCOL_CONFIG = 
SslConfigs.SSL_PROTOCOL_CONFIG;
+public final static String SSL_PROTOCOL_DOC = SslConfigs.SSL_PROTOCOL_DOC;
+public static final String SSL_PROTOCOL_DEFAULT = 
SslConfigs.DEFAULT_SSL_PROTOCOL;
+
+public final static String SSL_PROVIDER_CONFIG = 
SslConfigs.SSL_PROVIDER_CONFIG;
+public final static String SSL_PROVIDER_DOC = SslConfigs.SSL_PROVIDER_DOC;
+
+public final static String SSL_CIPHER_SUITES_CONFIG = 
SslConfigs.SSL_CIPHER_SUITES_CONFIG;
+public final static String SSL_CIPHER_SUITES_DOC = 
SslConfigs.SSL_CIPHER_SUITES_DOC;
+
+public final static String SSL_ENABLED_PROTOCOLS_CONFIG = 
SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG;
+public final static String SSL_ENABLED_PROTOCOLS_DOC = 
SslConfigs.SSL_ENABLED_PROTOCOLS_DOC;
+public static final String SSL_ENABLED_PROTOCOLS_DEFAULTS = 
SslConfigs.DEFAULT_SSL_ENABLED_PROTOCOLS;
+
+public final static String SSL_KEYSTORE_TYPE_CONFIG = 
SslConfigs.SSL_KEYSTORE_TYPE_CONFIG;
+public final static String SSL_KEYSTORE_TYPE_DOC = 
SslConfigs.SSL_KEYSTORE_TYPE_DOC;
+public static final String SSL_KEYSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_KEYSTORE_TYPE;
+
+public final static String SSL_KEYSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG;
+public final static String SSL_KEYSTORE_LOCATION_DOC = 
SslConfigs.SSL_KEYSTORE_LOCATION_DOC;
+
+public final static String SSL_KEYSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG;
+public final static String SSL_KEYSTORE_PASSWORD_DOC = 
SslConfigs.SSL_KEYSTORE_PASSWORD_DOC;
+
+public final static String SSL_KEY_PASSWORD_CONFIG = 
SslConfigs.SSL_KEY_PASSWORD_CONFIG;
+public final static String SSL_KEY_PASSWORD_DOC = 
SslConfigs.SSL_KEY_PASSWORD_DOC;
+
+public final static String SSL_KEYSTORE_KEY_CONFIG = 
SslConfigs.SSL_KEYSTORE_KEY_CONFIG;
+public final static String SSL_KEYSTORE_KEY_DOC = 
SslConfigs.SSL_KEYSTORE_KEY_DOC;
+
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG;
+public final static String SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC = 
SslConfigs.SSL_KEYSTORE_CERTIFICATE_CHAIN_DOC;
+public final static String SSL_TRUSTSTORE_TYPE_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG;
+public final static String SSL_TRUSTSTORE_TYPE_DOC = 
SslConfigs.SSL_TRUSTSTORE_TYPE_DOC;
+public static final String SSL_TRUSTSTORE_TYPE_DEFAULT = 
SslConfigs.DEFAULT_SSL_TRUSTSTORE_TYPE;
+
+public final static String SSL_TRUSTSTORE_LOCATION_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG;
+public final static String SSL_TRUSTSTORE_PASSWORD_DOC = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_DOC;
+
+public final static String SSL_TRUSTSTORE_PASSWORD_CONFIG = 
SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG;
+public final static String SSL_TRUSTSTORE_LOCATION_DOC = 
SslConfigs.SSL_TRUSTSTORE_LOCATION_DOC;
+
+public final static String SSL_TRUSTSTORE_CERTIFICATES_CONFIG = 

Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


OmniaGM commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1556357170


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   I rename it `KafkaSecurityConfigs` and left a comment that it's a central 
place for Kafka security configs. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


chia7712 commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1556226896


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   > I think better approach would be moving default values to SslConfigs, 
SaslConfigs ,SecurityConfig and BrokerSecurityConfigs WDYT?
   
   agreed
   
   > KafkaConfig while it is an anti-pattern it has been acting as one place 
where we can find all KafkaConfig.
   
   got it. I can buy the purpose. BTW, could we rename it to KafkaConfig"s" and 
make it be a final class since we don't want to have instance of it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


OmniaGM commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1555878104


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   We can rename it to `KafkaSecurityConfig` as a common ground between the two 
approaches. Having central place for all security configs and break out of 
KafkaConfig anti-pattern. I don't mind either way. 
   
   It just might be confusing as we have already `SecurityConfig` and 
`BrokerSecurityConfigs` we just might need to be mindful about naming the new 
one  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


OmniaGM commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1555878104


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   We can rename it to `KafkaSecurityConfig` as a common ground between the two 
approaches. Having central place for all security configs and break out of 
KafkaConfig anti-pattern. I don't mind either way. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


OmniaGM commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1555878104


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   We can rename it to `KafkaSecurityConfig` as a common ground between the two 
approaches. Having central place for all security configs and break out of 
KafkaConfig anti-pattern



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


OmniaGM commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1555869666


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   We can, but we already have `SslConfigs`, `SaslConfigs`, `SecurityConfig` 
and `BrokerSecurityConfigs`. KafkaConfig while it is an anti-pattern it has 
been acting as one place where we can find all KafkaConfig. 
   
   I think better approach would be moving default values to `SslConfigs`, 
`SaslConfigs` ,`SecurityConfig` and `BrokerSecurityConfigs` WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


OmniaGM commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1555869666


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   We can, but we already have `SslConfigs`, `SecurityConfig` and 
`BrokerSecurityConfigs`. KafkaConfig while it is an anti-pattern it has been 
acting as one place where we can find all KafkaConfig. 
   
   I think better approach would be moving default values to `SslConfigs`, 
`SecurityConfig` and `BrokerSecurityConfigs` WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-08 Thread via GitHub


OmniaGM commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1555869666


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   We can, but we already have `SslConfigs`, `SecurityConfig` and 
`BrokerSecurityConfigs`. KafkaConfig while it is an anti-pattern it has been 
acting as one place where we can find all KafkaConfig. 
   
   I think better approach would be moving docs and default values to 
`SslConfigs`, `SecurityConfig` and `BrokerSecurityConfigs` WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-05 Thread via GitHub


chia7712 commented on code in PR #15656:
URL: https://github.com/apache/kafka/pull/15656#discussion_r1554518847


##
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+
+public class KafkaConfig {

Review Comment:
   not sure whether we need another class to collect those ssl/sasl-related 
configs. If we do need it, could we rename it to `KafkaSecurityConfig` to avoid 
adding other security-unrelated configs in the future. Personally, a fat class 
like `KafkaConfig.scala` is a anti-pattern.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15853: Move Sasl and SSL configs out of core [kafka]

2024-04-04 Thread via GitHub


OmniaGM commented on PR #15656:
URL: https://github.com/apache/kafka/pull/15656#issuecomment-2037325362

   @nizhikov can you have a look when you have time please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org