magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Support setting SSLVerification parameter in Elasticsearch config #213

Open sindrepm opened 5 years ago

sindrepm commented 5 years ago

Description (*)

I am using Elasticsearch operator on Kubernetes (https://www.elastic.co/guide/en/cloud-on-k8s/current/index.html) which enables auth and SSL by default with self-signed certificate. Currently I see no way to use Magento Elasticsearch implementation with self-signed certificates because the curl request fails.

The Elasticsearch PHP client already supports setting a parameter "SSLVerification" to trust self-signed certificates and custom root CA's: https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/security.html#_self_signed_certificates

As the config is already generated from hash based on settings in database it should be trivial to support this feature just by allowing another config key like: catalog/search/elasticsearchX_ssl_verification.

This field should be set to the full certificate path and the client will use it to call setSSLVerification(<path-to-certificate>).

Other options are:

Expected behavior (*)

Add another field "SSL certificate path" in Elasticsearch configuration inside Magento admin panel which is passed to setSSLVerification method when constructing the Elasticsearch PHP client.

Benefits

Simplify usage of Elasticsearch with Magento. Especially important now that MySQL search is deprecated.

Additional information

Feature will not introduce any breaking changes and be purely additive.

m2-assistant[bot] commented 5 years ago

Hi @sindrepm. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@sindrepm do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?


m2-assistant[bot] commented 4 years ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Delta commented 4 years ago

Sounds like it is a useful feature for configure secure elasticsearch with self-signed certificate Marked as Feature Request cc @sdzhepa

snico-dev commented 1 year ago

Please someone can help me with this feature? I had same issue