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

Method IsAuthorizedProxyUser

be/src/service/impala-server.cc:2416–2431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2414}
2415
2416bool ImpalaServer::IsAuthorizedProxyUser(const string& user) {
2417 if (user.empty()) return false;
2418
2419 // Get the short version of the user name (the user name up to the first '/' or '@')
2420 // from the full principal name.
2421 size_t end_idx = min(user.find('/'), user.find('@'));
2422 // If neither are found (or are found at the beginning of the user name),
2423 // return the username. Otherwise, return the username up to the matching character.
2424 string short_user(
2425 end_idx == string::npos || end_idx == 0 ? user : user.substr(0, end_idx));
2426
2427 return authorized_proxy_user_config_.find(short_user)
2428 != authorized_proxy_user_config_.end()
2429 || authorized_proxy_group_config_.find(short_user)
2430 != authorized_proxy_group_config_.end();
2431}
2432
2433void ImpalaServer::CatalogUpdateVersionInfo::UpdateCatalogVersionMetrics() {
2434 ImpaladMetrics::CATALOG_VERSION->SetValue(catalog_version);

Callers 1

DoLdapCheckFiltersFunction · 0.80

Calls 5

minFunction · 0.85
substrMethod · 0.80
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected