이 콘텐츠는 선택한 언어로 제공되지 않습니다.
4.2. Creating Global Teams and Synchronizing with LDAP Groups
With the release of OpenShift Enterprise 2.1, you can create global teams and synchronize membership from an already existing source, such as an LDAP database. This enables you to have full control over global team membership. For example, if a global team is synchronized to an LDAP database, and a developer leaves your company, the privileges granted through the global team membership will be removed and you will be able to reassign or remove any of the individual's work across the platform.
Create global teams and synchronize membership with LDAP with the folowing procedure. However, a plain sync file can be created from any source to perform the same process if LDAP is not in use.
Note
This is a basic workflow. For more information, consult the
oo-admin-ctl-team
command man pages for detailed descriptions of each command shown in the following instructions.
Procedure 4.1. To Synchronize a Global Team with LDAP Groups:
- Create an LDAP configuration file in the
/etc/openshift/
directory. This file specifies how your instance will connect to the LDAP server and query for LDAP groups and group membership. - Create one or more global teams. If you are not using LDAP groups, then the
--maps-to
option can be specified as anything:oo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=com
# oo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=comoo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=comoo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, you can create a global team straight from LDAP groups using the--groups
option. In this case, you must indicate your LDAP config file and the LDAP groups to create the global team from:oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2
# oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 4.1. Sample LDAP configuration File
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 4.2. Sample Active Directory based LDAP configuration File
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Next, synchronize global team membership with LDAP:This step can be performed in a cron job in order to regularly synchronize OpenShift Enterprise with LDAP.
oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-users
# oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-users
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, use a sync file to synchronize global team membership with LDAP with the following command:This command creates a file you can modify to suit your requirements. The format is the entity to act upon, an action, then the user names.oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-users
# oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-users
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following example sync file adds users to an OpenShift Enterprise instance, then adds them as members to the team named "myteam".Example 4.3. Synchronizing Global Team Membership with a Sync File
USER|ADD|user1 ... USER|ADD|user100 MEMBER|ADD|myteam|user1,...,user100
USER|ADD|user1 ... USER|ADD|user100 MEMBER|ADD|myteam|user1,...,user100
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, create this file from any source and sync team members from the specified file with the following command:oo-admin-ctl-team -c sync-from-file --in-file teams.sync
# oo-admin-ctl-team -c sync-from-file --in-file teams.syncoo-admin-ctl-team -c sync-from-file --in-file teams.sync
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2.1. Encrypting an LDAP Global Team Connection 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
When synchronizing a global team with LDAP groups, you can choose to encrypt all communication with the LDAP server by adding a parameter to the LDAP
.yml
file. This encrypts any communication between the LDAP client and server and is only intended for instances where the LDAP server is a trusted source. simple_tls
encryption establishes an SSL/TLS encryption with the LDAP server before any LDAP protocol data is exchanged, meaning that no validation of the LDAP server's SSL certificate is performed. Therefore, no errors are reported if the SSL certificate of the client is not trusted. If you have communication errors, see your LDAP server administrator.
To encrypt an LDAP and global team connection edit the
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
/etc/openshift/File_Name.yml
file and replace it with the following:
Note that the port must be changed from the initial example in Section 4.2, “Creating Global Teams and Synchronizing with LDAP Groups” to the above example for encryption to successfully occur. An LDAP server cannot support both plaintext and
simple_tls
connections on the same port.