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:50:59 GMT
Repository: kudu
Updated Branches:
  refs/heads/branch-1.3.x 857653330 -> 8929b8618

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>
(cherry picked from commit ecfcb312161a4bc6f8da0ebb837169a2acf08eef)
Reviewed-on: http://gerrit.cloudera.org:8080/7764
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/8929b861
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/8929b861
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/8929b861

Branch: refs/heads/branch-1.3.x
Commit: 8929b8618a0815a968503d18e238ecab30050ce0
Parents: 8576533
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:27 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 2072cc4..8c08a80 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>
@@ -360,6 +361,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