keystoneauth1.extras.kerberos 包

模块内容

Kerberos 身份验证插件。

警告

此模块需要安装一个额外的包(requests_kerberos),默认情况下未安装。如果没有安装额外的包,将会发生导入错误。可以使用以下命令安装额外的包:

$ pip install keystoneauth1[kerberos]
class keystoneauth1.extras.kerberos.Kerberos(auth_url: str, mutual_auth: str | None = None, *, 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)

继承自 Auth

__abstractmethods__ = frozenset({})
__annotations__ = {'MIN_TOKEN_LIFE_SECONDS': 'int', '_discovery_cache': 'dict[str, discover.Discover]', 'auth_ref': 'access.AccessInfo | None', 'auth_url': 'str', 'reauthenticate': 'bool'}
__doc__ = None
__init__(auth_url: str, mutual_auth: str | None = None, *, 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) None
__module__ = 'keystoneauth1.extras.kerberos'
_abc_impl = <_abc._abc_data object>
_auth_method_class

别名 KerberosMethod

class keystoneauth1.extras.kerberos.KerberosMethod(*, mutual_auth: str | None = None)

基类: AuthMethod

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

返回身份验证插件的身份验证部分。

参数:
  • session (keystoneauth1.session.Session) – 会话。

  • auth (base.Auth) – 调用该方法的认证插件。

  • headers (dict) – 将与身份验证请求一起发送的标头(如果插件需要添加标头)。

返回值:

此插件的标识符和用于身份验证类型的字典数据。

返回类型:

tuple(string, dict)

mutual_auth: str | None
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)

继承自: FederationBaseAuth

使用 keystone 联合身份验证机制通过 Kerberos 进行身份验证。

这使用 OS-FEDERATION 扩展来获取一个未限定范围的令牌,然后使用标准的 keystone 身份验证过程将该令牌限定到任何给定的项目。

__abstractmethods__ = frozenset({})
__annotations__ = {'MIN_TOKEN_LIFE_SECONDS': 'int', '_discovery_cache': 'dict[str, discover.Discover]', 'auth_ref': 'access.AccessInfo | None', 'auth_url': 'str', 'reauthenticate': 'bool'}
__doc__ = '使用 keystone 联合身份验证机制通过 Kerberos 进行身份验证。\n\n    这使用 OS-FEDERATION 扩展来获取一个未限定范围的令牌,然后使用标准的 keystone 身份验证过程将该令牌限定到任何给定的项目。\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) None
__module__ = 'keystoneauth1.extras.kerberos'
_abc_impl = <_abc._abc_data object>
get_unscoped_auth_ref(session: Session) AccessInfoV3

获取未范围限定的联合令牌。

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