Commit 883bfbd0 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

feat(ssl) : add CW_ELASTICSEARCH_VERIFY_CERTS which can be set to false to ignore ssl errors

parent ea998b1f01ff
Pipeline #18928 failed with stage
in 58 seconds
......@@ -3,6 +3,13 @@ Summary
Simple ElasticSearch indexing integration for CubicWeb
Parameters
~~~~~~~~~~
* elasticsearch-locations (CW_ELASTICSEARCH_LOCATIONS)
* index-name (CW_INDEX_NAME)
* elasticsearch-verify-certs (CW_ELASTICSEARCH_VERIFY_CERTS)
Pyramid debug panel
~~~~~~~~~~~~~~~~~~~
......
......@@ -156,6 +156,7 @@ def get_connection(config):
if locations:
# TODO sanitize locations
es = connections.create_connection(hosts=locations.split(','),
verify_certs=config['elasticsearch-verify-certs'],
timeout=20)
return es
# TODO else ? raise KeyError - return None is OK?
......@@ -17,4 +17,12 @@ options = (
'group': 'elasticsearch',
'level': 5,
}),
('elasticsearch-verify-certs',
{'type': 'yn',
'default': True,
'help': 'Elastic Search connection verify_certs variable'
'(set to false when using https with unknown or self-signed certificates)',
'group': 'elasticsearch',
'level': 5,
}),
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment