demisto / demisto-py

Demisto Client for Python
Apache License 2.0
70 stars 41 forks source link

SSL_CERT_FILE not work if use password login #125

Open fukhak opened 8 months ago

fukhak commented 8 months ago

Describe the bug If Client use user and password to login. the login() method will be called. Some how the login() will not pass ssl_ca_cert variable, it will make password login cannot use SSL_CERT_FILE with self trusted server

https://github.com/demisto/demisto-py/blob/3e2349e22085a0ab950f122895d6ea07f0f68a0c/demisto_client/__init__.py#L147C1-L149C3

To Reproduce Steps to reproduce the behavior:

  1. setup environment variable "DEMISTO_BASE_URL", "DEMISTO_USERNAME", "DEMISTO_PASSWORD", "SSL_CERT_FILE"
  2. Run Python and declare a new client using demisto_client.configure() without any parameters. or use environment variables as parameters only (need password, but no api_key)
  3. configure() will call login() but not pass ssl_ca_cert variable, it will throw ssl.SSLCertVerificationError if use self trusted cert.

Expected behavior SSL_CERT_FILE will pass to login() and return api_instance

Screenshots N/A

Additional context N/A