Pyxis Authentication
Classes used for authenticating with Pyxis. Each class performs a different authentication type. Inheritence of the base class, PyxisAuth is used to ensure that the required methods have been implemented.
The method ‘apply_to_session’ applies the authentication to the Session object. It should generally be the only method that needs to be used.
Currently, two authentication types are supported: Kerberos and SSL.
Base class signature
The base class dictates which methods must be implemented in the children classes.
Children classes
These classes perform the actual authentication. More may be added if different authentication type is required.
- class pubtools._pyxis.pyxis_authentication.PyxisSSLAuth(crt_path: str, key_path: str)[source]
SSL Auth provider to PyxisClient.
- __init__(crt_path: str, key_path: str) None[source]
Initialize.
- Args:
- crt_path (str)
Path to .crt file (signed certificate).
- key_path (str)
Path to .key file (private key).
- apply_to_session(pyxis_session: PyxisSession) None[source]
Set up PyxisSession with SSL auth.
- Args:
- pyxis_session (PyxisSession)
PyxisSession instance.
- class pubtools._pyxis.pyxis_authentication.PyxisKrbAuth(krb_princ: str, service: str, ccache_file: str, ktfile: str | None = None)[source]
Kerberos authentication support for PyxisClient.
- __init__(krb_princ: str, service: str, ccache_file: str, ktfile: str | None = None) None[source]
Initialize.
- Args:
- krb_princ (str)
Kerberos principal for obtaining ticket.
- service (str)
URL of the service to apply the authentication to.
- ccache_file (str)
Path to a file used for ccache. Only necessary if kinit will be used.
- ktfile (str)
Kerberos client keytab file.
- apply_to_session(pyxis_session: PyxisSession) None[source]
Set up PyxisSession with Kerberos auth.
- Args:
- pyxis_session (PyxisSession)
PyxisSession instance