MCPcopy Create free account
hub / github.com/apache/impala / TEST

Function TEST

be/src/rpc/authentication-test.cc:67–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65string FormatPermissions(mode_t mode);
66
67TEST(Auth, PrincipalSubstitution) {
68 string hostname;
69 ASSERT_OK(GetHostname(&hostname));
70 SecureAuthProvider sa(false); // false means it's external
71
72 FLAGS_principal = "service_name/_HOST@some.realm";
73 string principal;
74 ASSERT_OK(GetExternalKerberosPrincipal(&principal));
75
76 ASSERT_OK(sa.InitKerberos(principal));
77 ASSERT_OK(sa.Start());
78 ASSERT_EQ(string::npos, sa.principal().find("_HOST"));
79 ASSERT_NE(string::npos, sa.principal().find(hostname));
80 ASSERT_EQ("service_name", sa.service_name());
81 ASSERT_EQ(hostname, sa.hostname());
82 ASSERT_EQ("some.realm", sa.realm());
83 FLAGS_principal.clear();
84}
85
86void AuthOk(const string& name, SecureAuthProvider* sa) {
87 EXPECT_EQ(SASL_OK,

Callers

nothing calls this directly

Calls 15

AuthOkFunction · 0.85
AuthFailsFunction · 0.85
IsInternalTlsConfiguredFunction · 0.85
assertEffectiveUserFunction · 0.85
assertEffectiveShortUserFunction · 0.85
GetEffectiveShortUserFunction · 0.85
FormatPermissionsFunction · 0.85
InitKerberosMethod · 0.80
principalMethod · 0.80
service_nameMethod · 0.80

Tested by

no test coverage detected