This package patches requests at runtime to authenticate with kerberos proxy (negotiate)
Project description
kerberos-proxy-auth
This package patches requests and urllib3 at runtime to authenticate with kerberos proxy (spnego)
Installation
a) using a NON-kerberos proxy (if available)
- set the environment variables to NON-kerberos proxy and use
pip install ...set https_proxy=http://<NONkerberosproxy>:8080 set http_proxy=http://<NONkerberosproxy>:8080 pip install kerberos-proxy-auth
b) from behind the kerberos proxy
- download this package manually as well as all its dependancies.
- run this command
pip install path/to/kerberos-proxy-auth-main.zip path/to/dependancy1.zip path/to/dependancy2.zip [...]
Usage
After installation
- set the environment variables
set https_proxy=http://<kerberosproxy>:8080 set http_proxy=http://<kerberosproxy>:8080
- start python and use
requests,urllib3orpipeven from behind the kerberos proxy without any further action.import requests r = requests.get('https://example.org') print(r.status_code) # expected: 200 r = requests.head('https://example.org') print(r.status_code) # expected: 200 r = requests.request('GET', 'https://example.org') print(r.status_code) # expected : 200 import urllib3, os http = urllib3.poolmanager.proxy_from_url(os.getenv('https_proxy')) r = http.request('GET', 'https://example.org') print(r.status) # expected : 200
ToDo
- test, feedback, contribute improvements
- rework to support other environments (currently only: windows/system)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kerberos-proxy-auth-0.0.2.tar.gz.
File metadata
- Download URL: kerberos-proxy-auth-0.0.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3a66a0eea4ce717eab31ec937d4a618f48655d2d0f297601d23af273118032b
|
|
| MD5 |
0caa86b34bd03aff6e460e0c1bcf7d0f
|
|
| BLAKE2b-256 |
437a1e83a563978577179be7866d4da7c14fe655a16fd3c91515f2092e7f7411
|
File details
Details for the file kerberos_proxy_auth-0.0.2-py3-none-any.whl.
File metadata
- Download URL: kerberos_proxy_auth-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4261a654497a5667ec92db85e4bb39b998d3ddc005523a73cafe1e258f724005
|
|
| MD5 |
a9c53d36bdeb26e09d795b13846bb386
|
|
| BLAKE2b-256 |
c8391d1c81d1515380b3b70a145194a65398a4774210c8cd0ecc1ea5613fc05e
|