You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2018/12/03 01:55:47 UTC

[GitHub] zhaidongbo commented on a change in pull request #373: fix bug: add _IP/_HOST in principal of kerberos

zhaidongbo commented on a change in pull request #373: fix bug: add _IP/_HOST in principal of kerberos
URL: https://github.com/apache/incubator-doris/pull/373#discussion_r238128034
 
 

 ##########
 File path: fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
 ##########
 @@ -91,6 +82,25 @@ public FileSystemManager() {
         writeBufferSize = BrokerConfig.hdfs_write_buffer_size_kb << 10;
         handleManagementPool.schedule(new FileSystemExpirationChecker(), 0, TimeUnit.SECONDS);
     }
+
+    private static String preparePrincipal(String originalPrincipal) throws UnknownHostException {
+        String finalPrincipal = originalPrincipal;
+        String[] components = originalPrincipal.split("[/@]");
+        if (components != null && components.length == 3) {
+            if (components[1].equals("_HOST")) {
+                // Convert hostname(fqdn) to lower case according to SecurityUtil.getServerPrincipal
 
 Review comment:
   I don't  have an environmental to test the case with the principal of the hostname(fqdn), so I think it's better to keep the comment for reminders. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org