kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject kudu git commit: KUDU-1942. Kerberos fails to log in on hostnames with capital letters
Date Fri, 18 Aug 2017 18:10:44 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 351337ee2 -> ecfcb3121

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

Change-Id: I5ef65dd827459476a2d225d8e3f7c80ff2fdf627
Reviewed-on: http://gerrit.cloudera.org:8080/7693
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <aserbin@cloudera.com>

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

Branch: refs/heads/master
Commit: ecfcb312161a4bc6f8da0ebb837169a2acf08eef
Parents: 351337e
Author: Todd Lipcon <todd@apache.org>
Authored: Wed Aug 16 19:08:14 2017 -0700
Committer: Alexey Serbin <aserbin@cloudera.com>
Committed: Fri Aug 18 18:04:43 2017 +0000

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

diff --git a/src/kudu/security/init.cc b/src/kudu/security/init.cc
index 25e229f..7306b69 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>
@@ -393,6 +394,8 @@ Status GetConfiguredPrincipal(string* principal) {
   if (!GetFQDN(&hostname).ok()) {
+  // 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();

View raw message