igwn_auth_utils

Utilities to simplify using IGWN authorisation credentials.

This project is primarily aimed at discovering X.509 credentials and SciTokens for use with HTTP(S) requests to IGWN-operated services.

Functions

find_scitoken(audience, scope[, issuer, ...])

Find and load a SciToken for the given audience and scope.

find_x509_credentials([timeleft, on_error])

Locate X509 certificate and (optionally) private key files.

get(url, *args[, session])

Send an HTTP GET request to the specified URL with IGWN Auth attached.

get_scitoken(*args[, outfile, minsecs, quiet])

Get a new SciToken using htgettoken and return its file location.

kinit([principal, keytab, ccache])

Initialise a Kerberos ticket-granting ticket (TGT).

request(method, url, *args[, session])

Send a request of the specific method to the specified URL.

scitoken_authorization_header(token[, scheme])

Format an in-memory token for use in an HTTP Authorization Header.

Classes

HTTPSciTokenAuth([token, audience, scope, ...])

Auth handler for SciTokens.

IgwnAuthError

Error in discovering/validating an IGWN auth credential.

Session([token, token_audience, ...])

requests.Session class with default IGWN authorization handling.

SessionAuthMixin([token, token_audience, ...])

Mixin for requests.Session to add support for IGWN auth.

SessionErrorMixin(*args, **kwargs)

requests.Session mixin to raise exceptions for HTTP errors.

Class Inheritance Diagram

Inheritance diagram of igwn_auth_utils.requests.HTTPSciTokenAuth, igwn_auth_utils.error.IgwnAuthError, igwn_auth_utils.requests.Session, igwn_auth_utils.requests.SessionAuthMixin, igwn_auth_utils.requests.SessionErrorMixin