question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specify CA directory

See original GitHub issue

I would like to specify a certain CA directory to Elasticsearch:

cl = Elasticsearch('https:', verify_certs=True,ca_cert_dir='/opt/xxx/yyyy/security/certificates/')

I can only specify ca_certs but this is a file. How I can specify a directory?

I proposed a solution: #471 for solving this issue. If there is another way, please let me know. Thanks, Zoltan

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zmathecommented, Jun 14, 2017

Why I need to create a connection class only for passing ca_certs directory? It is super easy to add one more parameter to the constructor: #471 I have a very simple solution for this:

self.__client = Elasticsearch(  self.__url,                                                  
                                                 timeout = self.__timeout, 
                                                 use_ssl = True, 
                                                 verify_certs = True, 
                                                 ca_certs = generateCAFile() )

the generateCAFile takes the directory and create the appropriate file. But for me it is better solution, if I can provide a directory…

Anyway, I propose @HonzaKral proposal, which allows to pass ssl_context

1reaction
honzakralcommented, Jun 14, 2017

I think the plan is to support people passing their own ssl_context for the more exotic use cases…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install CA Directory or CA Directory Management UI Interactively
On Windows, use the installation wizard to install CA Directory or CA Directory Management UI interactively.
Read more >
ca - OpenSSL
It specifies the directory where new certificates will be placed. Mandatory. certificate. the same as -cert. It gives the file containing the CA...
Read more >
How to configure your CA trust list in Linux | Enable Sysadmin
Add and delete certificate authorities (CAs) from your default trust list to grant networking permissions on a case-by-case basis.
Read more >
openssl/wget only working if i explicitly specify ca-directory
If I try to use openssl or wget without explicitly passing in a ca-directory, the certifcate fails to verify. I would like to...
Read more >
Creating a CA
So move into the CA directory, and make a copy: ... Extensions for when we sign normal certs (specified as default) [ usr_cert...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found