4.2. Creating Global Teams and Synchronizing with LDAP Groups
Note
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-tooption can be specified as anything:#
oo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=comAlternatively, you can create a global team straight from LDAP groups using the--groupsoption. 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_Name2Example 4.1. Sample LDAP configuration File
Host: server.example.com Port: 389 Get-Group: Base: dc=example,dc=com Filter: (cn=<group_cn>) Get-Group-Users: Base: <group_dn> Attributes: [member] Get-User: Base: dc=example,dc=com Filter: (uid=<user_id>) Attributes: [emailAddress] Openshift-Username: emailAddress
Example 4.2. Sample Active Directory based LDAP configuration File
Host: server.example.com Port: 389 Username: CN=username.gen,OU=Generics,OU=Company Users,DC=company,DC=com Password: xxxxxxxxxxxxxx #get group entry so we can map team to the group distinguished name Get-Group: Base: dc=example,dc=com Filter: (cn=<group_cn>) #get all the users in the group Get-Group-Users: Base: <group_dn> Filter: (memberOf=<group_dn>) Attributes: [emailaddress] Openshift-Username: emailaddress
- 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-usersAlternatively, 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-usersThe 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
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-fileteams.sync
4.2.1. Encrypting an LDAP Global Team Connection
.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.
/etc/openshift/File_Name.yml file and replace it with the following:
Host: server.example.com Port: 636 Encryption: simple_tls Get-Group: Base: dc=example,dc=com Filter: (cn=<group_cn>) Get-Group-Users: Base: <group_dn> Attributes: [member] Get-User: Base: dc=example,dc=com Filter: (uid=<user_id>) Attributes: [emailAddress] Openshift-Username: emailAddress
simple_tls connections on the same port.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.