-
Notifications
You must be signed in to change notification settings - Fork 31
Requests #71
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
Merged
Merged
Requests #71
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is used for making python requests use the keychain.
Also, this prevents a bug I discovered that would have a null model being written to disk, and then no further attempts to check later.
Just start again!
This is used primarily for debugging to a local Sal instance, or submitting to a staging/test server.
This is used primarily for debugging to a local Sal instance, or submitting to a staging/test server.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR pulls out the curl wrapper used currently and replaces it with python requests.
Why?
This was predicated on having mysterious curl failures that I could only resolve by dropping from http2 down to http1.1 by editing the curl command used OR using a current brew curl instead of the OS-provided one.
Instead, I figured why not just use requests? So I created a separate project to provide requests tools to let you use the macOS keychain for verifying SSL certs (
pip install macsesh
) and moved all of the requests between the client and Sal into a client class.This cleans up some of the error handling and logging as a freebie.
Outstanding, I have yet to hear from anyone regarding whether they use sal-scripts with client certs for mutual TLS that relies on specifying the cert by name (i.e. curl built with secure transport) rather than providing the path to a cert somewhere on disk. I don't have a test environment for this, and it seems unlikely that anyone else does, since the existing code seems to contradict the curl man page's information re: how to use certs by name and not actually work.
If you rely on this, and you want it to keep working, please contact me! I think we have an easy way to handle this, but I want to make sure!