kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject kudu git commit: KUDU-1942. Kerberos fails to log in on hostnames with capital letters
Date Tue, 22 Aug 2017 15:51:02 GMT
Repository: kudu
Updated Branches:
  refs/heads/branch-1.4.x b686a2675 -> 7dcec16a4


KUDU-1942. Kerberos fails to log in on hostnames with capital letters

This ensures that servers canonicalize their FQDNs to lower-case before
generating Kerberos principal names.

With this change I was able to set up a working cluster on my laptop
with a capitalized hostname, where before it would fail as described in
the JIRA.

I also verified that I was able to connect from both C++ and Java
clients.

Change-Id: I5ef65dd827459476a2d225d8e3f7c80ff2fdf627
Reviewed-on: http://gerrit.cloudera.org:8080/7693
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <aserbin@cloudera.com>
(cherry picked from commit ecfcb312161a4bc6f8da0ebb837169a2acf08eef)
Reviewed-on: http://gerrit.cloudera.org:8080/7763
Tested-by: Todd Lipcon <todd@apache.org>
Reviewed-by: Jean-Daniel Cryans <jdcryans@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/7dcec16a
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/7dcec16a
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/7dcec16a

Branch: refs/heads/branch-1.4.x
Commit: 7dcec16a4286ea3f1782def0a26407aefdc14004
Parents: b686a26
Author: Todd Lipcon <todd@apache.org>
Authored: Wed Aug 16 19:08:14 2017 -0700
Committer: Jean-Daniel Cryans <jdcryans@apache.org>
Committed: Tue Aug 22 15:50:22 2017 +0000

----------------------------------------------------------------------
 src/kudu/security/init.cc | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/7dcec16a/src/kudu/security/init.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/init.cc b/src/kudu/security/init.cc
index 0ddc602..59b698d 100644
--- a/src/kudu/security/init.cc
+++ b/src/kudu/security/init.cc
@@ -17,6 +17,7 @@
 
 #include "kudu/security/init.h"
 
+#include <ctype.h>
 #include <krb5/krb5.h>
 
 #include <algorithm>
@@ -366,6 +367,8 @@ Status GetConfiguredPrincipal(string* principal) {
   if (!GetFQDN(&hostname).ok()) {
     RETURN_NOT_OK(GetHostname(&hostname));
   }
+  // Hosts in principal names are canonicalized to lower-case.
+  std::transform(hostname.begin(), hostname.end(), hostname.begin(), tolower);
   GlobalReplaceSubstring("_HOST", hostname, &p);
   *principal = p;
   return Status::OK();


Mime
View raw message