public function isHttpAuthEnabled() { $authEnabled = (bool) $this->getElasticsearchClientConfigParam('enable_http_auth'); return $authEnabled && !empty($this->getHttpAuthUser()) && !empty($this->getHttpAuthPassword()); }