Calls into the LDAP utils to check the provided group filters
| 358 | |
| 359 | // Calls into the LDAP utils to check the provided group filters |
| 360 | bool DoLdapCheckFilters(const char* user) { |
| 361 | ImpalaLdap* ldap = AuthManager::GetInstance()->GetLdap(); |
| 362 | ImpalaServer* server = ExecEnv::GetInstance()->impala_server(); |
| 363 | if (server == nullptr) { |
| 364 | LOG(FATAL) << "Invalid config: SASL LDAP is only supported for client connections " |
| 365 | << "to an impalad."; |
| 366 | } |
| 367 | // If the user is an authorized proxy user, we do not yet know the effective user as |
| 368 | // it may be set by 'impala.doas.user', in which case we defer checking LDAP filters |
| 369 | // until OpenSession(). Otherwise, we prefer to check the filters as easly as |
| 370 | // possible, so check them here. |
| 371 | if (server->IsAuthorizedProxyUser(user)) { |
| 372 | return true; |
| 373 | } |
| 374 | return ldap->LdapCheckFilters(user); |
| 375 | } |
| 376 | |
| 377 | // Calls into the LDAP utils to check the provided user/pass, |
| 378 | // and the provided group filters. |
no test coverage detected