Comments (4)
Hi matc,
You're right, this demonstration client doesn't include support for an authenticated proxy. You're welcome to fork and include support for those headers.
from duo_client_python.
Hi Kristina,
Thanks for the quick response and for looking into this for me. I will take a look tomorrow to evaluate forking this Duo client vs building new with proxy auth on a more generic client and follow up. Closing out this ticket now :)
Thanks again!
Mat
from duo_client_python.
This worked for me, using basic auth with a squid3 proxy:
auth_api.set_proxy('myproxy.local.net',
port='8080',
headers={
"Proxy-Authorization":
"Basic " + base64.b64encode(b"proxyUsername:proxyPassword").decode("utf-8")
},)
Set the headers param in the set_proxy
call, which expects a dictionary. Keys are HTTP Header names, and values are the associated header value. I tested this with python 3. You may need to tweak it for python 2.
This will work with a CONNECT proxy only. Duo's API code wants to directly validate the SSL connection to Duo's servers (instead of trusting the proxy to validate the upstream connection). HTTP CONNECT helps accomplish that.
If the connection between your API and proxy is (non-SSL) HTTP, be aware that this will put the proxy user's password on the network. The HTTPS connection end-to-end between the API client and Duo's server will still be secure, even with a (non-SSL) HTTP proxy.
from duo_client_python.
@BradleyHiggins - this worked beautifully on python 2!! Thank you so much for sharing this with me 🥇👏🏼
Really appreciate you help here, saved me quite a significant amount of work!
from duo_client_python.
Related Issues (20)
- Update Admin cannot update the status HOT 1
- Deprecated SSL protocol in CertValidatingHTTPSConnection HOT 4
- Interators not working due to not having metadata populated HOT 5
- 403 Forbidden Access on all methods of Admin API HOT 6
- Duo: no library to generate passcodes HOT 4
- get_authentication_log - api:v2 param filter failing HOT 4
- metadata parse error in add_user_phone HOT 4
- Automatic proxy configuration HOT 2
- get_authentication_log clearing out Params HOT 3
- Add Get User by Email HOT 1
- 400 Bad Request response when trying to add a token for a yubikey HOT 1
- Duo client installed via pip is missing the get_users_by_names func HOT 3
- Getting "Received 429 Too Many Requests" for auth logs even if hitting the API in 6-7 minute intervals
- Getting 40103 on making GET REST API calls HOT 5
- Tests are failing because actual requests are being made HOT 1
- How to use duo_client_python to access an integrations secret key? HOT 2
- next_offset pagination in auth logs HOT 12
- add get auth summary endpoint to the admin object HOT 1
- bad link in READ.me
- Question - How to properly use add_yubikey_token HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duo_client_python.