If you are using the elasticsearch_helper_aws and put all configuration in the settings.php file and also have basic authentication specified in the form (even though the checkbox for using basic authentication is unchecked) it will grab this data and implode it to the host url. this will cause error when trying to connect to Amazon ES.
Today elasticsearch_helper_aws is using elasticsearch_helper_aws_elasticsearch_helper_client_builder_alter to alter the client builder and set an provider for the authentication to Amazon ES. Maybe its better to override ElasticsearchClientBuilder in the elasticsearch_helper_aws module and not fetching the basic authentication cridentials from the form. Also using jsq/amazon-es-php library is ignoring all ports specified and will only use port 80 or 443 for SSL. So this new clientBuilder can be quite small.
I will try to write a patch for this ASAP.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2935443-error-connect-to-amazon-es-when-having-user-credentials-in-form.patch | 2.16 KB | dajjen |
Comments
Comment #2
dajjenComment #3
dajjenI created a patch where elasticsearch_helper_aws module have it's own clientbuilder. This because then we can ignore basic authentication credentials and port settings even if they exist in conf.
Comment #4
floretan commentedWouldn't it make more sense to add a validation handler to the settings form to check that the configuration (ports, basic auth credentials) are not conflicting with AWS?
Comment #5
dajjenyeah maybe, but maybe we should add a selectlist where you could choose what authentication method you like to use. for ex Basic authentication, Amazon IAM authentication, etc. And let that input reflect what input fields to present to the user.