keystone.federation.idp 模块¶
- class keystone.federation.idp.MetadataGenerator[source]¶
基类:
object用于生成 SAML IdP 元数据的类。
- generate_metadata()[source]¶
生成身份提供者元数据。
生成并格式化元数据为 XML,可以被联合服务提供者暴露和消费。
- 返回值:
XML <EntityDescriptor> 对象。
- 引发:
keystone.exception.ValidationError – 如果所需的配置选项未设置。
- class keystone.federation.idp.SAMLGenerator[source]¶
基类:
object用于生成 SAML 断言的类。
- samlize_token(issuer, recipient, user, user_domain_name, roles, project, project_domain_name, groups, expires_in=None)[source]¶
将 Keystone 属性转换为 SAML 断言。
- 参数:
issuer (string) – 发行方的 URL
recipient (string) – 接收方的 URL
user (string) – 用户名
user_domain_name (string) – 用户域名称
roles (list) – 角色名称列表
project (string) – 项目名称
project_domain_name (string) – 项目域名称
groups (list) – 用户组和域名称的字符串列表,字符串是序列化的字典。
expires_in (int) – 设置断言的有效时长,以秒为单位
- 返回值:
XML <Response> 对象