AlienVault-OTX / OTX-Python-SDK

The Python SDK for AlienVault OTX
Other
357 stars 162 forks source link

Allow requests library to take verify and cert parameters #51

Open rkagin opened 4 years ago

rkagin commented 4 years ago

For improved proxy support, could we add the verify and cert parameters to the requests query? I have a working copy and can do a pull request to add this functionality.

rkagin commented 4 years ago

This would be done in the initialization, and the get, patch, and post functions.

rustybrooks commented 3 years ago

Can you submit a PR or send me details to rbrooks@alienvault.com?

rkagin commented 3 years ago

I made a pull request at https://github.com/AlienVault-OTX/OTX-Python-SDK/pull/60.

rustybrooks commented 3 years ago

It looks pretty straightforward - I'll test that it doesn't break anything but it's difficult for me to verify that it "works" if you pass values in for the new parameters. I assume that you've used it this way behind a proxy?

I'll look at it tomorrow for inclusion into the library.

rkagin commented 3 years ago

Yes, I've used this when I set the parameters, but probably could have tested the default values. In requests, verify defaults to boolean True but also takes a local path to a CA_BUNDLE file (how I use it). The cert parameter defaults to None but also takes a local path to a client certificate.

rustybrooks commented 3 years ago

OK well, like I said if it passes the "normal" tests then it's probably no worse than it is now. I'l research the defaults a bit to satisfy myself and if it passes tests then we should be good to go. Thanks for your contribution.

rustybrooks commented 3 years ago

New version is out that includes your PR (I modified the defaults as suggested in the PR): 1.5.12