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)
Release files for kerberos-proxy-auth 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kerberos-proxy-auth-0.0.2.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kerberos_proxy_auth-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / kerberos-proxy-auth-0.0.2.tar.gz
| Download URL | kerberos-proxy-auth-0.0.2.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3a66a0eea4ce717eab31ec937d4a618f48655d2d0f297601d23af273118032b
|
|
BLAKE2b-256 checksum How to use checksums |
437a1e83a563978577179be7866d4da7c14fe655a16fd3c91515f2092e7f7411
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / kerberos_proxy_auth-0.0.2-py3-none-any.whl
| Download URL | kerberos_proxy_auth-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4261a654497a5667ec92db85e4bb39b998d3ddc005523a73cafe1e258f724005
|
|
BLAKE2b-256 checksum How to use checksums |
c8391d1c81d1515380b3b70a145194a65398a4774210c8cd0ecc1ea5613fc05e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|