Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

box configure:settings --cert or reading of Window ENV REQUESTS_CA_BUNDLE #219

Open
nigeldhith opened this issue Nov 13, 2020 · 0 comments
Assignees

Comments

@nigeldhith
Copy link

Is your feature request related to a problem? Please describe.

Box CLI from Box Command Line Interface Installer-win10-x64.msi has no issues at work going through Proxy and SSL Certs.
Box Python SDK, Box CLI - only supports Proxy: in Python boxsdk.config import Proxy.
My notes on how to get requests.get() working on Windows 10 with Proxies, Certificate as a .pem file in Python
Two ways to do this:
A: requests.get( URL, proxy=, verify= path to .perm file )
B. Set the Environment Variables: HTTPS_PROXY  REQUESTS_CA_BUNDLE then requests.get( URL ).
I had to use method B because Python boxsdk only has Proxy, no way to bring in a Certificate - from boxsdk.config import Proxy.
import os
os.environ['HTTPS_PROXY'] = proxy [Proxy as string]
os.environ['REQUESTS_CA_BUNDLE'] = CombinedPem [Path to .pem file as string]

Describe the solution you'd like

Add a CERT option to import a .pem Certificate file.
box configure:settings --cert

Example, just added: Box CLI adds proxy support Cristiano Betta Aug 24
box configure:settings
--proxy-url=socks://your.proxy.server.com:1080
--proxy-username=YOUR_USERNAME
--proxy-password=YOUR_PASSWORD

Describe alternatives you've considered

Box Python SDK is one option.
Box CLI 1.4 works "out of the box" - Box Command Line Interface Installer-win10-x64.msi
Opened a Support Case with Box - they confirmed that they don't have an unpublished work-around.
I found earlier: Error in Box CLI: self signed certificate in certificate chain https://support.box.com/hc/en-us/community/posts/360049157234-Error-in-Box-CLI-self-signed-certificate-in-certificate-chain
https://docs.microsoft.com/en-us/azure/storage/common/storage-explorer-troubleshooting?tabs=Windows%2C2004#error-self-signed-certificate-in-certificate-chain-and-similar-errors

Additional context

Error message, CLI 2.7
box users:search "[email protected]"
self signed certificate in certificate chain

C:\Program Files\OpenSSL-Win64\bin>
openssl s_client -showcerts -servername api.box.com -connect api.box.com:443

324:error:0200274C:system library:connect:reason(1868):crypto\bio\b_sock2.c:110:
324:error:2008A067:BIO routines:BIO_connect:connect error:crypto\bio\b_sock2.c:111:
connect:errno=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants