-
Notifications
You must be signed in to change notification settings - Fork 11
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
"No cached copy or other error" #5
Comments
I would fire up python and try the following real quick:
The keyword argument "verify=True" may be added to the get as well. After the get, the response object will have the return code, message and headers available for perusal. If you do a Let me know if that uncovers anything! |
You'll need requests for this of course... |
Regardless of whether I use >>> response = requests.get("https://jss.pretendco.com:8443/SavingThrow/MacKeeper.adf", verify=True) or >>> response = requests.get("https://jss.pretendco.com:8443/SavingThrow/MacKeeper.adf", verify=False) the result is always /Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/api.py", line 69, in get
return request('get', url, params=params, **kwargs)
File "/Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:507: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure We're on version 9.72 of the JSS. |
What version of python-jss is it using? Newer versions ( > 0.5.7) should force a TLS connection. JAMF forced the JSS to stop using SSLv23 a few updates ago, and that's the error that you're getting. You could do a quick: |
Oh yeah, what am I thinking! Do you get the same exception when you try to do the get, even on the non-HTTPS server? The reason I jumped to the TLS conclusion is because that's the same error you get from a JSS... I'm sure any updated Apache, nginx, etc, has also disabled sslv23. I'll take a look about adding a TLS adapter to SavingThrow soon to test. Of course, that still doesn't explain why you'd be getting it on an unencrypted server. |
Interesting. Both of these work fine (or at least don't produce any error output): import requests
response = requests.get("http://awesomewebsite.com/MacKeeper.adf", verify=True)
response = requests.get("http://awesomewebsite.com/MacKeeper.adf", verify=False) So if that works in isolation, why doesn't it work in the context of SavingThrow.py? |
Where are we on this @homebysix? Still broken? |
Also, Obviously I have a lot more experience trying to get requests to work. Getting TLS working on urllib2 is supposedly doable, I think. |
TBH, not using SavingThrow regularly any more. The org I was helping is now investigating other options for cross-platform endpoint security, including osquery. |
So where we are with this is that we should probably shell out to curl to get SSL working. |
I haven't heard any further requests for this. Filing this away as a future enhancement. |
For increased control and security, I'm running SavingThrow pointing at an internal server for definitions, rather than at GitHub. Like so:
However this doesn't seem to work. Running
sudo python custom_SavingThrow.py -v
reveals that the .adf files aren't found.However the files do exist at those URLs, as evidenced by
curl
output:The server has a self-signed SSL cert (for now). Do I need to modify the
add_adware_from_url
function to ignore certificate warnings?The text was updated successfully, but these errors were encountered: