Skip to main content

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)

  1. 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

  1. download this package manually as well as all its dependancies.
  2. run this command
    pip install path/to/kerberos-proxy-auth-main.zip path/to/dependancy1.zip path/to/dependancy2.zip [...]
    

Usage

After installation

  1. set the environment variables
    set https_proxy=http://<kerberosproxy>:8080
    set http_proxy=http://<kerberosproxy>:8080
    
  2. start python and use requests, urllib3 or pip even 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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kerberos-proxy-auth-0.0.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kerberos_proxy_auth-0.0.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for kerberos-proxy-auth-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c3a66a0eea4ce717eab31ec937d4a618f48655d2d0f297601d23af273118032b
MD5 0caa86b34bd03aff6e460e0c1bcf7d0f
BLAKE2b-256 437a1e83a563978577179be7866d4da7c14fe655a16fd3c91515f2092e7f7411

See more details on using hashes here.

File details

Details for the file kerberos_proxy_auth-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for kerberos_proxy_auth-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4261a654497a5667ec92db85e4bb39b998d3ddc005523a73cafe1e258f724005
MD5 a9c53d36bdeb26e09d795b13846bb386
BLAKE2b-256 c8391d1c81d1515380b3b70a145194a65398a4774210c8cd0ecc1ea5613fc05e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page