This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.17.5. LDAP 组同步示例
本节包含 RFC 2307、Active Directory 和增强 Active Directory 模式的示例。
这些示例假定所有用户都是其各自组的直接成员。具体而言,没有任何组的成员是其他组。如需有关如何同步嵌套组的信息,请参见嵌套成员资格同步示例。
17.5.1. 使用 RFC 2307 模式同步组 复制链接链接已复制到粘贴板!
对于 RFC 2307 模式,以下示例将同步名为 admins
的组,该组有两个成员 Jane
和 Jim
。这些示例阐述了:
- 如何将组和用户添加到 LDAP 服务器中。
- 同步之后 OpenShift Container Platform 中会生成什么组记录。
这些示例假定所有用户都是其各自组的直接成员。具体而言,没有任何组的成员是其他组。如需有关如何同步嵌套组的信息,请参见嵌套成员资格同步示例。
在 RFC 2307 模式中,用户(Jane 和 Jim)和组都作为第一类条目存在于 LDAP 服务器上,组成员资格则存储在组的属性中。以下 ldif
片段定义了这个模式的用户和组:
使用 RFC 2307 模式的 LDAP 条目:rfc2307.ldif
先决条件
- 创建配置文件。
流程
使用
rfc2307_config.yaml
文件运行同步:oc adm groups sync --sync-config=rfc2307_config.yaml --confirm
$ oc adm groups sync --sync-config=rfc2307_config.yaml --confirm
Copy to Clipboard Copied! Toggle word wrap Toggle overflow OpenShift Container Platform 创建以下组记录作为上述同步操作的结果:
使用
rfc2307_config.yaml
文件创建的 OpenShift Container Platform 组Copy to Clipboard Copied! Toggle word wrap Toggle overflow