Skip to content

Commit

Permalink
IMPALA-6268: KerberosOnAndOff/RpcMgrKerberizedTest.MultipleServices f…
Browse files Browse the repository at this point in the history
…ailing

On systems that have Kerberos 1.11 or earlier, service principals with
IP addresses are not supported due to a bug:

http://krbdev.mit.edu/rt/Ticket/Display.html?id=7603

Since our BE tests use such principals, they fail on older platforms with the
above mentioned kerberos versions.

Kudu fixed this by adding a workaround which overrides krb5_realm_override.

cloudera/kudu@ba2ae3d

However, when we moved Kudu's security library into Impala, we did not
add the appropriate build flags that allow it to be used. This patch fixes
that.

Testing: Verified that the failing test runs successfully on CentOs 6.4
with Kerberos 1.10.3

Change-Id: I60e291e8aa1b59b645b856d33c658471f314c221
Reviewed-on: http://gerrit.cloudera.org:8080/9006
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Tested-by: Impala Public Jenkins
  • Loading branch information
smukil authored and cloudera-hudson committed Jan 19, 2018
1 parent e3680f5 commit 1b43027
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -307,6 +307,11 @@ IMPALA_ADD_THIRDPARTY_LIB(krb5 ${KERBEROS_INCLUDE_DIR} "" ${KERBEROS_LIBRARY})
# testing.
find_package(KerberosPrograms REQUIRED)

# Tests that run any security related tests need to link this in to override the
# krb5_realm_override() implementation in krb5.
# See be/src/kudu/security/krb5_realm_override.cc for more information.
set(KRB5_REALM_OVERRIDE -Wl,--undefined=krb5_realm_override_loaded krb5_realm_override)

###################################################################

# System dependencies
Expand Down
1 change: 1 addition & 0 deletions be/src/rpc/CMakeLists.txt
Expand Up @@ -50,6 +50,7 @@ ADD_BE_TEST(rpc-mgr-test)
add_dependencies(rpc-mgr-test rpc_test_proto)
target_link_libraries(rpc-mgr-test rpc_test_proto)
target_link_libraries(rpc-mgr-test security-test-for-impala)
target_link_libraries(rpc-mgr-test ${KRB5_REALM_OVERRIDE})

add_library(rpc_test_proto ${RPC_TEST_PROTO_SRCS})
add_dependencies(rpc_test_proto rpc_test_proto_tgt krpc)
Expand Down
4 changes: 3 additions & 1 deletion be/src/rpc/rpc-mgr-test.cc
Expand Up @@ -195,7 +195,9 @@ class ScanMemServiceImpl : public ScanMemServiceIf {
// Reenable after fixing.
INSTANTIATE_TEST_CASE_P(KerberosOnAndOff,
RpcMgrKerberizedTest,
::testing::Values(KERBEROS_OFF));
::testing::Values(KERBEROS_OFF,
USE_KUDU_KERBEROS,
USE_IMPALA_KERBEROS));

TEST_P(RpcMgrKerberizedTest, MultipleServices) {
// Test that a service can be started, and will respond to requests.
Expand Down

0 comments on commit 1b43027

Please sign in to comment.