You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/11/11 08:09:39 UTC
[GitHub] [hive] abstractdog commented on a diff in pull request #3749: HIVE-26723: Configurable canonical name checking.
abstractdog commented on code in PR #3749:
URL: https://github.com/apache/hive/pull/3749#discussion_r1019973894
##########
jdbc/src/java/org/apache/hive/jdbc/Utils.java:
##########
@@ -99,6 +99,7 @@ public static class JdbcConnectionParams {
public static final String AUTH_PASSWD = "password";
public static final String AUTH_KERBEROS_AUTH_TYPE = "kerberosAuthType";
public static final String AUTH_KERBEROS_AUTH_TYPE_FROM_SUBJECT = "fromSubject";
+ public static final String AUTH_KERBEROS_ENABLE_CANONICAL_HOSTNAME_CHECK = "enableCanonicalHostnameCheck";
Review Comment:
wondering if the config name should imply that this only applies in case of kerberos auth, e.g.:
```
kerberosEnableCanonicalHostnameCheck
```
##########
jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java:
##########
@@ -1324,6 +1329,13 @@ private boolean isKerberosAuthMode() {
&& sessConfMap.containsKey(JdbcConnectionParams.AUTH_PRINCIPAL);
}
+ private boolean isEnableCanonicalHostnameCheck() {
+ return Optional.ofNullable(sessConfMap.get(JdbcConnectionParams.AUTH_KERBEROS_ENABLE_CANONICAL_HOSTNAME_CHECK))
Review Comment:
I think this can be simplified with Boolean.parseBoolean(sessConfMap.getOrDefault(..., "true"))
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org