keystoneauth1.extras.kerberos package

Module contents

Kerberos authentication plugins.

Warning

This module requires installation of an extra package (requests_kerberos) not installed by default. Without the extra package an import error will occur. The extra package can be installed using:

$ pip install keystoneauth1[kerberos]
class keystoneauth1.extras.kerberos.Kerberos(auth_url: str, *args: Any, unscoped: bool = False, trust_id: str | None = None, system_scope: str | None = None, domain_id: str | None = None, domain_name: str | None = None, project_id: str | None = None, project_name: str | None = None, project_domain_id: str | None = None, project_domain_name: str | None = None, reauthenticate: bool = True, include_catalog: bool = True, **kwargs: Any)

Bases: AuthConstructor

__abstractmethods__ = frozenset({})
__annotations__ = {'MIN_TOKEN_LIFE_SECONDS': 'int', '_auth_method_class': 'ty.Type[AuthMethod]', '_discovery_cache': 'ty.Dict[str, discover.Discover]', 'auth_ref': 'ty.Optional[access.AccessInfo]', 'auth_url': 'str', 'reauthenticate': 'bool'}
__doc__ = None
__module__ = 'keystoneauth1.extras.kerberos'
_abc_impl = <_abc._abc_data object>
_auth_method_class

alias of KerberosMethod

class keystoneauth1.extras.kerberos.KerberosMethod(**kwargs: object)

Bases: AuthMethod

__abstractmethods__ = frozenset({})
__annotations__ = {'_method_parameters': 'ty.List[str]', 'mutual_auth': <class 'str'>}
__doc__ = None
__init__(**kwargs: object)
__module__ = 'keystoneauth1.extras.kerberos'
_abc_impl = <_abc._abc_data object>
_method_parameters: List[str] = ['mutual_auth']
get_auth_data(session: Session, auth: Auth, headers: Dict[str, str], request_kwargs: Dict[str, object], **kwargs: Any) Tuple[None, None] | Tuple[str, Mapping[str, object]]

Return the authentication section of an auth plugin.

Parameters:
  • session (keystoneauth1.session.Session) – The communication session.

  • auth (base.Auth) – The auth plugin calling the method.

  • headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them.

Returns:

The identifier of this plugin and a dict of authentication data for the auth type.

Return type:

tuple(string, dict)

mutual_auth: str
class keystoneauth1.extras.kerberos.MappedKerberos(auth_url: str, identity_provider: str, protocol: str, mutual_auth: str | None = None, *, trust_id: str | None = None, system_scope: str | None = None, domain_id: str | None = None, domain_name: str | None = None, project_id: str | None = None, project_name: str | None = None, project_domain_id: str | None = None, project_domain_name: str | None = None, reauthenticate: bool = True, include_catalog: bool = True)

Bases: FederationBaseAuth

Authenticate using Kerberos via the keystone federation mechanisms.

This uses the OS-FEDERATION extension to gain an unscoped token and then use the standard keystone auth process to scope that to any given project.

__abstractmethods__ = frozenset({})
__annotations__ = {'MIN_TOKEN_LIFE_SECONDS': 'int', '_discovery_cache': 'ty.Dict[str, discover.Discover]', 'auth_ref': 'ty.Optional[access.AccessInfo]', 'auth_url': 'str', 'reauthenticate': 'bool'}
__doc__ = 'Authenticate using Kerberos via the keystone federation mechanisms.\n\n    This uses the OS-FEDERATION extension to gain an unscoped token and then\n    use the standard keystone auth process to scope that to any given project.\n    '
__init__(auth_url: str, identity_provider: str, protocol: str, mutual_auth: str | None = None, *, trust_id: str | None = None, system_scope: str | None = None, domain_id: str | None = None, domain_name: str | None = None, project_id: str | None = None, project_name: str | None = None, project_domain_id: str | None = None, project_domain_name: str | None = None, reauthenticate: bool = True, include_catalog: bool = True)
__module__ = 'keystoneauth1.extras.kerberos'
_abc_impl = <_abc._abc_data object>
get_unscoped_auth_ref(session: Session, **kwargs: Any) AccessInfoV3

Fetch unscoped federated token.

keystoneauth1.extras.kerberos._dependency_check() None
keystoneauth1.extras.kerberos._mutual_auth(value: str | None) str
keystoneauth1.extras.kerberos._requests_auth(mutual_authentication: str | None) requests_kerberos.HTTPKerberosAuth