ibm tivoli_IBM Tivoli Directory Server中的安全复制

ibm tivoli

在TDS中甚至配置最简单的复制拓扑也被许多人认为是一项非常复杂的任务。 使用SSL或Kerberos配置安全复制时,复杂性会增加。 TDS复制配置主要是手动的,并且要求最终用户对复制特定的内部对象类和属性有很多了解。

先决条件知识:在各种developerWorks®文章中已经讨论了使用手动和图形用户界面(GUI)工具设置复制拓扑。 希望本文的读者已经熟悉配置LDAP复制的基础,如以下文章所述:

http://www.ibm.com/developerworks/tivoli/library/t-tdsrepl/index.html

http://www.ibm.com/developerworks/tivoli/library/t-debugrepitds/index.html

复制方式

可以将参与给定复制拓扑的每台服务器(无论其角色如何)配置为通过以下三种模式与拓扑中的其他服务器通信:

1.简单复制:供应商和消费者之间的通信是通过未加密的通道进行的,而身份验证是使用绑定DN和凭据进行的。

2.通过SSL复制:供应商和消费者之间的通信通过加密通道进行。 通过bindDN和凭据或SSL证书进行身份验证。

3.使用Kerberos身份验证机制的复制:供应商和消费者使用标准的Kerberos身份验证方法。 由于TDS在其他平台上不支持Kerberos配置,因此只能将AIX®和Microsoft®Windows®服务器配置为参与这种复制形式。

SSL和Kerberos复制模式与简单复制相比,具有安全性优势,建议在大多数生产环境中使用。 本文主要提供并介绍用于设置安全复制的自动化脚本。 这些脚本还可以用于配置简单的普通复制。

通过SSL配置复制

考虑使用SSL配置由主副本和单个副本组成的复制拓扑的简单示例。 使用SSL配置复制的步骤类似于在没有添加SSL的情况下设置复制,直到添加复制协议为止,如下所述。 有关配置不使用SSL的复制的步骤,请参阅“ 构建拓扑1(主副本)”部分

在主/供应商上:

(a)标识要复制的后缀或子条目。 向其添加ibm-replicationContext辅助对象类,使其成为复制上下文。

(b)在其下添加一个ibm-replicaGroup条目。

(c)将ibm-replicationSubEntry条目添加到ibm-replicaGroup条目。

(d)下一步是在ibm-replicationSubEntry条目下添加ibm-replicationAgreement。 对于通过SSL进行的复制,复制协议条目的类型如清单4所示:复制协议条目

清单4:复制协议条目
dn: cn=replica1,ibm-replicaServerId=<serverid of master>,ibm-replicaGroup=default,<suffix>
objectclass: top
objectclass: ibm-replicationAgreement
cn: replica1
ibm-replicaConsumerId: <serverid_of_consumer>
ibm-replicaUrl: ldaps://<replica1-IP:secure-port>
ibm-replicaCredentialsDN: <dn_of_credential_entry>
description: Replication agreement from master to replica1

注意:复制拓扑中的每个服务器都有一个唯一的标识符,称为其serverid。 可以在相应服务器的配置文件“ dn:cn = Configuration”下找到。 对于正在运行的服务器,也可以通过对服务器进行rootDSE搜索来找到。 rootDSE搜索由“”(空字符串)的搜索范围和搜索范围表示。 假设server1在端口port1上运行TDS,则相应的rootDSE搜索将是:idsldapsearch -h <服务器1> -p <端口1> -s基础-b“” objectclass = *

注意:在上面的协议条目中,ldap url的类型为ldaps: //,而不是ldap: //。 这是通过SSL复制的要求。 同样,上面通过属性ibm-replicaCredentialsDN引用的复制凭证条目也可以是ibm-replicationCredentialsSimpleibm-replicationCredentialsExternal类型,具体取决于要使用的认证方法。

(e)将复制凭据条目添加到目录信息树(DIT)。 清单5显示了简单复制(使用绑定DN和密码) 的凭证条目的示例:使用简单绑定DN和密码的凭证条目的示例

清单5:使用简单绑定DN和密码的凭证条目示例
dn: cn=replica1BindCredentials,cn=localhost
objectclass: ibm-replicationCredentialsSimple
cn: ReplicaBindCredentials
replicaBindDN: cn=master
replicaCredentials: master
description: Bind Credentials on master to be used to bind to other servers.

清单6显示了使用证书的凭证条目的示例:使用证书的凭证条目的示例

清单6:使用证书的凭证条目的示例
dn: cn=replica1BindCredentials, c=localhost
objectclass: ibm-replicationCredentialsExternal
cn: ReplicaBindCredentials
ibm-replicaKeyfile: <path_to_the_kdb_file>
ibm-replicaKeylabel: <Key_Label>
ibm-replicaKeypwd: <password_of_kdb_file>
description: Bind Credentials on master to be used to bind to other servers.

上面提到的kdb文件可以使用Generatekeys.sh创建

在副本/消费者上:

如果主服务器(供应商)需要使用简单的bindDN和密码与副本服务器(消费者)联系,则需要将以下内容添加到副本服务器的配置文件(ibmslapd.conf)中,如清单7所示:使用简单绑定的SSL的消费者配置条目DN和密码

清单7:使用简单绑定DN和密码的SSL的使用者配置条目
dn: cn=Master server, cn=configuration
cn: master server
ibm-slapdMasterDN: <bind_dn_in_servers_creds_entry>
ibm-slapdMasterPW: <password_in_servers-creds_entry>
objectclass: ibm-slapdReplication

如果主服务器需要使用证书联系副本,则需要将以下内容添加到副本的配置文件(ibmslapd.conf)中,如清单8所示:使用外部证书的SSL的使用者配置条目

清单8:使用外部证书的SSL的使用者配置条目
dn: cn=Master server, cn=configuration
cn: master server
ibm-slapdMasterDN: <subject_DN_of_cert_in_kdb_file>
objectclass: ibm-slapdReplication

通过Kerberos配置复制

再次考虑使用Kerberos配置由主副本和单个副本组成的复制拓扑的简单示例。 使用Kerberos配置复制的步骤类似于使用SSL设置复制,直到添加复制协议为止,如下所述:

在主/供应商上:

(a)标识要复制的后缀或子条目。 向其添加ibm-replicationContext辅助对象类,使其成为复制上下文。

(b)在其下添加一个ibm-replicaGroup条目。

(c)将ibm-replicationSubEntry条目添加到ibm-replicaGroup条目。

(d)下一步是在ibm-replicationSubEntry条目下添加ibm-replicationAgreement。 对于通过Kerberos进行的复制,复制协议条目的类型如清单10所示:复制协议条目

清单10:复制协议条目
dn: cn=replica1,ibm-replicaServerId=<serverid of master>,ibm-replicaGroup=default,<suffix>
objectclass: top
objectclass: ibm-replicationAgreement
cn: replica1
ibm-replicaConsumerId: <server_id_of_consumer>
ibm-replicaUrl: ldap://<replica1-IP:simple-port>
ibm-replicaCredentialsDN: <dn_of_credential_entry>
description: Replication agreement from master to replica1

(e)将复制凭据条目添加到DIT。 清单11中显示了使用绑定DN和keytab filef的Kerberos凭证条目的示例:复制凭证条目

清单11:复制凭证条目
dn: cn=replica1BindCredentials, cn=localhost
objectclass: ibm-replicationCredentialsKerberos
cn: ReplicaBindCredentials
replicaBindDN: <ibm-kn=Kerberos-principle>
replicaCredentials: <Keytab-path>
description: Bind Credentials on master to be used to bind to other servers.

上面提到的Kerberos原理必须与使用者所参考的原理不同。

在副本/消费者上:

为了使主服务器(供应商)使用Kerberos原理联系副本服务器(消费者),需要将以下内容添加到副本服务器的配置文件(ibmslapd.conf)中,如清单12所示:消费者配置条目

清单12:使用者配置条目
dn: cn=Master server, cn=configuration
cn: master server
ibm-slapdMasterDN: ibm-kn=<Kerberos-principle>
ibm-slapdMasterPW: <Kerberos principle password>
objectclass: ibm-slapdReplication

使用自动化脚本配置复制

使用本文提供的shell脚本,可以轻松完成上述配置复制的步骤。 这些脚本可用于配置从简单拓扑到复杂拓扑的每种复制类型。

让我们看一下这些脚本的用法:

Generatekeys.sh :此外壳程序脚本可用于创建用于在目录服务器实例上配置安全连接(SSL配置)的密钥。 必须在系统上安装IBM Global Security Kit(GSKit)软件,并且此脚本需要该软件。 GSKit是IBM的SSL实现库,在安装过程中列出了一个可选软件包。 如有必要,可以在安装后安装GSKit,有关更多信息,请参见此处的TDS安装指南。 一旦在系统上正确安装了GSKit,就可以使用此脚本轻松生成包含用于SSL通信的公用/专用密钥对的服务器和客户端密钥传递数据库文件(kdbs)。

清单14:GenerateKeys.sh的各种参数
USAGE:
GenerateKeys.sh <-a server_kdb_file_name> <-b server_kdb_file_password>
<-c server_kdb_key_label> <-d server_kdb_subject_dn>
<-e client_kdb_file_name> <-f client_kdb_file_password>
<-g client_kdb_key_label> [-h client_kdb_subject_dn]

Where:
-a Supplier_kdb_file_name         Name of the kdb file for the Supplier.
-b Supplier_kdb_file_password     Password for Supplier's kdb file.
-c Supplier_kdb_key_label         Key label for Supplier's kdb file.
-d Supplier_kdb_subject_dn        Subject DN of Supplier's kdb file.
-e Consumer_kdb_file_name         Name of the kdb file for the Consumer.
-f Consumer_kdb_file_password     Password for Consumer's kdb file.
-g Consumer_kdb_key_label         Key label for Consumer's kdb file.
-h Consumer_kdb_subject_dn        Subject DN of Consumer's kdb file.

Options in <> are required. Options in [ ] are optional.

MR.sh :此外壳程序脚本可用于在同一台计算机或不同计算机上的两台TDS目录服务器之间配置主副本服务器设置。 该脚本可以在安装了TDS客户端的任何计算机上执行。 唯一的要求是实例应配置为复制服务器的系统应可从该系统访问。 一旦成功创建,配置和启动目录服务器实例,便可以使用此脚本轻松配置任何供应商-消费者复制模式。

清单15:MR.sh的各种参数
USAGE:
./MR.sh <-a suffix>
<-b master_hostname> <-c master_port> [-d master_admin_dn] [-e master_admin_pw]
<-f replica_hostname> <-g replica_port> [-h replica_admin_dn] [-i replica_admin_pw]
[-n <-o kdb_file_path> <-p kdb_password> <-q kdb_cert_name> <-r kdb_cert_subject_DN>]
[-s <-t kerberos_principle_DN> <-u kerberos_principle_PW>]
[-v ipType] [-w no_of_conns] [-z]

Where:
-a suffix                  DN of entry to be configured as a replication context.
                           It should be present on both servers.
-b master_hostname         Hostname of the master server.
-c master_port             Simple Port at which master server is running.
-d master_admin_dn         Admin DN of the master server.
                           If not specified cn=root will be taken.
-e master_admin_pw         Admin password of the master server.
                           If not specified root will be taken.
-f replica_hostname        Hostname of the replica server.
-g replica_port            Simple Port at which replica server is running.
-h replica_admin_dn        Admin DN of the replica server.
                           If not specified cn=root will be taken.
-i replica_admin_pw        Admin password of the replica server.
                           If not specified root will be taken.
-n                         Configure replication over SSL.
-o kdb_file_path           Absolute path of key file to be used for SSL communication.
-p kdb_password            Password for the key file.
-q kdb_cert_name           Certificate name used while generating the key file.
-r kdb_cert_subject_DN     Subject DN used while generating the key file.
-s                         Configure replication over Kerberos.
-t kerberos_principle_DN   Principle DN to be used for Kerberos authentication.
-u kerberos_principle_PW   Password for the Kerberos Principle.
-v                         Use IPv6 to configure replication.
                           With this option, Specify IPV6 address with -b and -f options.
                           By default, IPv4 will be used.
-w no_of_conns             No. of connection to be used in multi-threaded replication.
                           By default, replication will be configured as single-threaded.
-z                         Delete intermediate ldif files.

Options in <> are required. Options in [ ] are optional.

PP.sh :此Shell脚本可用于在同一台计算机或不同计算机上的两个TDS目录服务器之间配置Peer-Peer设置。 该脚本可以在安装了TDS客户端的任何计算机上执行。 唯一的要求是实例应配置为复制服务器的系统应可从该系统访问。 一旦成功创建,配置和启动目录服务器实例,就可以使用此脚本轻松配置对等复制的任何模式。

清单16:PP.sh的各种参数
USAGE:
./PP.sh <-a suffix>
<-b Peer1_hostname> <-c Peer1_port> [-d Peer1_admin_dn] [-e Peer1_admin_pw]
<-f Peer2_hostname> <-g Peer2_port> [-h Peer2_admin_dn] [-i Peer2_admin_pw]
[-n <-o kdb_file_path> <-p kdb_password> <-q kdb_cert_name> <-r kdb_cert_subject_DN>]
[-s <-t kerberos_principle_DN> <-u kerberos_principle_PW>]
[-v ipType] [-w no_of_conns] [-z]

Where:
-a suffix                  DN of entry to be configured as a replication context.
                           It should be present on both servers.
-b Peer1_hostname          Hostname of the Peer1.
-c Peer1_port              Simple Port at which Peer1 server is running.
-d Peer1_admin_dn          Admin DN of the Peer1 server.
                           If not specified cn=root will be taken.
-e Peer1_admin_pw          Admin password of the Peer1 server.
                           If not specified root will be taken.
-f Peer2_hostname          Hostname of the Peer2 server.
-g Peer2_port              Simple Port at which Peer2 server is running.
-h Peer2_admin_dn          Admin DN of the Peer2 server.
                           If not specified cn=root will be taken.
-i Peer2_admin_pw          Admin password of the Peer2 server.
                           If not specified root will be taken.
-n                         Configure replication over SSL.
-o kdb_file_path           Absolute path of the key file to be used for SSL communication.
-p kdb_password            Password for the key file.
-q kdb_cert_name           Certificate name used while generating the key file.
-r kdb_cert_subject_DN     Subject DN used while generating the key file.
-s                         Configure replication over Kerberos.
-t kerberos_principle_DN   Principle DN to be used for Kerberos authentication.
-u kerberos_principle_PW   Password for the kerberos Principle.
-v                         Use IPv6 to configure replication.
                           With this option, Specify IPV6 address with -b and -f options.
                           By default, IPv4 will be used.
-w no_of_conns             No. of connection to be used in multi-threaded replication.
                           By default, replication will be configured as single-threaded.
-z                         Delete intermediate ldif files.

Options in <> are required. Options in [ ] are optional.

GG.sh :此外壳程序脚本可用于在同一台计算机或不同计算机上的两个TDS目录服务器之间配置网关网关设置。 该脚本可以在安装了TDS客户端的任何计算机上执行。 唯一的要求是实例应配置为复制服务器的系统应可从该系统访问。 一旦成功创建,配置和启动目录服务器实例,就可以使用此脚本轻松配置任何网关网关复制模式。

清单17:GG.sh的各种参数
USAGE:
./GG.sh <-a suffix>
<-b Gateway1_hostname> <-c Gateway1_port> [-d Gateway1_admin_dn] [-e Gateway1_admin_pw]
<-f Gateway2_hostname> <-g Gateway2_port> [-h Gateway2_admin_dn] [-i Gateway2_admin_pw]
[-n <-o kdb_file_path> <-p kdb_password> <-q kdb_cert_name> <-r kdb_cert_subject_DN>]
[-s <-t kerberos_principle_DN> <-u kerberos_principle_PW>]
[-v ipType] [-w no_of_conns] [-z]

Where:
-a suffix                  DN of entry to be configured as a replication context.
                           It should be present on both servers.
-b Gateway1_hostname       Hostname of the Gateway1.
-c Gateway1_port           Simple Port at which Gateway1 server is running.
-d Gateway1_admin_dn       Admin DN of the Gateway1 server.
                           If not specified cn=root will be taken.
-e Gateway1_admin_pw       Admin password of the Gateway1 server.
                           If not specified root will be taken.
-f Gateway2_hostname       Hostname of the Gateway2 server.
-g Gateway2_port           Simple Port at which Gateway2 server is running.
-h Gateway2_admin_dn       Admin DN of the Gateway2 server.
                           If not specified cn=root will be taken.
-i Gateway2_admin_pw       Admin password of the Gateway2 server.
                           If not specified root will be taken.
-n                         Configure replication over SSL.
-o kdb_file_path           Absolute path of the key file to be used for SSL communication.
-p kdb_password            Password for the key file.
-q kdb_cert_name           Certificate name used while generating the key file.
-r kdb_cert_subject_DN     Subject DN used while generating the key file.
-s                         Configure replication over Kerberos.
-t kerberos_principle_DN   Principle DN to be used for Kerberos authentication.
-u kerberos_principle_PW   Password for the kerberos Principle.
-v                         Use IPv6 to configure replication.
                           With this option, Specify IPV6 address with -b and -f options.
                           By default, IPv4 will be used.
-w no_of_conns             Number of connection to be used in multi-threaded replication.
                           By default, replication will be configured as single-threaded.
-z                         Delete intermediate ldif files.

Options in <> are required. Options in [ ] are optional.

MFR.sh :此Shell脚本可用于在同一台计算机或不同计算机上的三台TDS目录服务器之间配置主-转发器-副本服务器设置。 该脚本可以在安装了TDS客户端的任何计算机上执行。 唯一的要求是实例应配置为复制服务器的系统应可从该系统访问。 成功创建,配置和启动目录服务器实例后,即可使用此脚本轻松配置任何主-转发-副本复制模式。

清单18:MFR.sh的各种参数
USAGE:
./MFR.sh <-a suffix>
<-b master_hostname> <-c master_port> [-d master_admin_dn] [-e master_admin_pw]
<-f fwdr_hostname> <-g fwdr_port> [-h fwdr_admin_dn] [-i fwdr_admin_pw]
<-j replica_hostname> <-k replica_port> [-l replica_admin_dn] [-m replica_admin_pw]
[-n <-o kdb_file_path> <-p kdb_password> <-q kdb_cert_name> <-r kdb_cert_subject_DN>]
[-s <-t kerberos_principle_DN> <-u kerberos_principle_PW>]
[-v ipType] [-w no_of_conns] [-z]

Where:
-a suffix                  DN of entry to be configured as a replication context.
                           It should be present on both servers.
-b master_hostname         Hostname of the Master server.
-c master_port             Simple Port at which Master server is running.
-d master_admin_dn         Admin DN of the Master server.
                           If not specified cn=root will be taken.
-e master_admin_pw         Admin password of the Master server.
                           If not specified root will be taken.
-f fwdr_hostname           Hostname of the Forwarder server.
-g fwdr_port               Simple Port at which Forwarder server is running.
-h fwdr_admin_dn           Admin DN of the Forwarder server.
                           If not specified cn=root will be taken.
-i fwdr_admin_pw           Admin password of the Forwarder server.
                           If not specified root will be taken.
-j replica_hostname        Hostname of the Replica server.
-k replica_port            Simple Port at which Replica server is running.
-l replica_admin_dn        Admin DN of the Replica server.
                           If not specified cn=root will be taken.
-m replica_admin_pw        Admin password of the Replica server.
                           If not specified root will be taken.
-n                         Configure replication over SSL.
-o kdb_file_path           Absolute path of the key file to be used for SSL communication.
-p kdb_password            Password for the key file.
-q kdb_cert_name           Certificate name used while generating the key file.
-r kdb_cert_subject_DN     Subject DN used while generating the key file.
-s                         Configure replication over Kerberos.
-t kerberos_principle_DN   Principle DN to be used for Kerberos authentication.
-u kerberos_principle_PW   Password for the kerberos Principle.
-v                         Use IPv6 to configure replication.
                           With this option,Specify IPV6 address with -b,-f and -j option.
                           By default, IPv4 will be used.
-w no_of_conns             Number of connection to be used in multi-threaded replication.
                           By default, replication will be configured as single-threaded.
-z                         Delete intermediate ldif files.

Options in <> are required. Options in [ ] are optional.

示例-使用自动脚本配置复制

让我们看一些使用自动化脚本来配置从简单拓扑到复杂拓扑的每种复制类型的示例。

假设以下TDS实例已配置并正在运行:

Instance1主机名:testmac1.ibm.com

Instance1简单端口:389

Instance1管理员DN:cn = root

Instance1管理员DN密码:root

Instance2主机名:testmac2.ibm.com

实例2简单端口:1389

Instance2管理员DN:cn = root

Instance2 Admin DN密码:root

简单复制设置:

设置上述两个实例之间的复制-后缀为O = IBM,C = US的Instance1和Instance2

清单20:简单的Master-Replica设置,其中Instance1为Master,Instance2为副本
./MR.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
清单21:简单的Peer-Peer设置,其中Instance1为Peer1,Instance2为Peer2
./PP.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root -n -o
清单22:简单的网关-网关设置,实例1为网关1,实例2为网关2
./GG.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root

通过SSL的复制设置:

要在上述两个实例(用于后缀O = IBM,C = US的SSL上的Instance1和Instance2)之间设置复制,都需要在安全模式下配置和启动两个实例。

要以安全模式启动服务器,需要密钥数据库文件(kdb文件)。 要生成kdb文件,可以使用脚本GenerateKeys.sh。

注意在继续进行操作之前,请确保已正确安装gskit。

在安全模式下配置和启动实例
1. Start the Supplier and Consumer Servers on Simple port.

2. Export JAVA_HOME=<LDAP_HOME_DIR>/java

3. To create the server and client keys for Master server with following details :
Supplier Key Name       : supplier
Supplier Key Password   : supplier
Supplierkdb key label   : LDAP_Server
Supplierkdb Subject DN  : CN=LDAP_Server,O=IBM,C=US
Consumer Key Name       : consumer
Consumer Key Password   : consumer
Consumerkdb key label   : LDAP
Consumerkdb Subject DN  : CN=LDAP,O=IBM,C=US

Execute
./GenerateKeys.sh -a supplier -b supplier -c LDAP_Server -d CN=LDAP_Server,O=IBM,C=US
-e consumer -f consumer -g LDAP -h CN=LDAP,O=IBM,C=US

Note Keyname, password, Label and Subject DN mentioned above are sample values.
User can change these values on choice.

The above execution will create following four files :
supplier.kdb  : This kdb is used to configure Supplier server in Serverauth mode.
supplierc.kdb : This kdb is used to configure Supplier server in ServerClientAuth mode.
consumer.kdb  : This kdb is used to configure Consumer server in Serverauth mode.
consumerc.kdb : This kdb is used to configure Consumer server in ServerClientAuth mode.
Note Replication over SSL requires ServerClientAuth Secure mode.

4. Modify the Supplier Configuration file using idsldapmodify as:
dn: cn=SSL,cn=Configuration
changetype: modify
replace: ibm-slapdSslAuth
ibm-slapdSslAuth: serverClientAuth
-
replace: ibm-slapdSslCertificate
ibm-slapdSslCertificate:LDAP_Server			//Supplierkdb key label
-
replace: ibm-slapdSecurity
ibm-slapdSecurity: SSL
-
replace: ibm-slapdSSLKeyDatabase
ibm-slapdSSLKeyDatabase: <Absolute Path to supplierc.kdb>
-
replace: ibm-slapdSSLKeyDatabasePW
ibm-slapdSSLKeyDatabasePW: supplier			//Supplier Key Password

5. Modify the Consumer Configuration file using idsldapmodify as:
dn: cn=SSL,cn=Configuration
changetype: modify
replace: ibm-slapdSslAuth
ibm-slapdSslAuth: serverClientAuth
-
replace: ibm-slapdSslCertificate
ibm-slapdSslCertificate:LDAP			//Consumerkdb key label
-
replace: ibm-slapdSecurity
ibm-slapdSecurity: SSL
-
replace: ibm-slapdSSLKeyDatabase
ibm-slapdSSLKeyDatabase: Absolute Path to consumerc.kdb
-
replace: ibm-slapdSSLKeyDatabasePW
ibm-slapdSSLKeyDatabasePW: consumer			//Consumer Key Password

6. Restart both Supplier and Consumer Server.

7. Now any type of replication topology can be setup between Supplier and consumer server
over SSL using any of the kdb file i.e supplierc.kdb or consumerc.kdb

要设置两个实例之间的复制-后缀O = IBM,C = US的Instance1和Instance2(通过SSL)。

清单24:通过SSL的主副本设置,实例1作为主副本,实例2作为副本
./MR.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -n -o supplierc.kdb -p supplier -q LDAP_Server -r cn=LDAP_Server,o=ibm,c=us

 OR

./MR.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -n -o consumerc.kdb -p consumer -q LDAP -r cn=LDAP,o=ibm,c=us
清单25:通过SSL的Peer-Peer设置,其中Instance1为Peer1,Instance2为Peer2
./PP.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -n -o supplierc.kdb -p supplier -q LDAP_Server -r cn=LDAP_Server,o=ibm,c=us

 OR

./PP.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -n -o consumerc.kdb -p consumer -q LDAP -r cn=LDAP,o=ibm,c=us
清单26:通过SSL的网关-网关设置,实例1为网关1,实例2为网关2
./GG.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -n -o supplierc.kdb -p supplier -q LDAP_Server -r cn=LDAP_Server,o=ibm,c=us

 OR

./GG.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -n -o consumerc.kdb -p consumer -q LDAP -r cn=LDAP,o=ibm,c=us

注:执行任何脚本以配置通过SSL的复制之后,目录管理员可以将“ ibm-slapdSecurity”设置为“ SSLOnly”,以便不允许在非安全端口上进行通信。 但是,在运行脚本之前执行此操作将导致脚本无法联系服务器。

通过Kerberos的复制设置:

要设置上述两个实例(实例1和Instance2)之间的复制(对于后缀O = IBM,C = US,使用kerberos),两个实例都需要在Kerberos模式下进行配置和启动。

清单27:基于Kerberos的主副本设置,实例1作为主副本,实例2作为副本
./MR.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -s -t ibm-kn=(principle@realm) -u (kdb-password)
清单28:基于Kerberos的Peer-Peer设置,实例1为Peer1,实例2为Peer2
./PP.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -s -t ibm-kn=(principle@realm) -u (kdb-password)
清单29:通过Kerberos的网关-网关设置,实例1作为网关1,实例2作为网关2
./GG.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -s -t ibm-kn=(principle@realm) -u (kdb-password)

复制设置(包括主转发副本):

要设置Master-Forwarder-Replica拓扑,需要三个实例。 除了上面提到的两个实例,让我们假设第三个示例TDS实例,其详细信息如下:

Instance3主机名:testmac3.ibm.com

Instance3简单端口:2389

Instance3管理员DN:cn = root

Instance3 Admin DN密码:root

要在三个实例之间创建Master-Forwarder-Replica拓扑-后缀O = IBM,C = US,分别为Instance1,Instance2和Instance3。

清单30:简单的Master-Forwarder-Replica设置,其中Instance1为Master,Instance2为Forwarder,Instance3为副本
./MFR.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -j testmac3.in.ibm.com -k 2389 -l cn=root -m root

要在三个实例之间设置Master-Forwarder-Replica拓扑-实例1,实例2和实例3(后缀O = IBM,C = US,通过SSL)。

清单31:通过SSL的主-转发器-副本设置,实例1作为主服务器,实例2作为转发器,实例3作为副本
./MFR.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -j testmac3.in.ibm.com -k 2389 -l cn=root -m root
 -n -o supplierc.kdb -p supplier -q LDAP_Server -r cn=LDAP_Server,o=ibm,c=us

要在三个实例之间设置Master-Forwarder-Replica拓扑-实例1,实例2和实例3(后缀O = IBM,C = US,使用kerberos)。

清单32:通过Kerberos进行的Master-Forwarder-Replica设置,其中Instance1为Master,Instance2为Forwarder,Instance3为副本
./MFR.sh -a o=ibm,c=us -b testmac1.ibm.com -c 389 -d cn=root -e root
 -f testmac2.in.ibm.com -g 1389 -h cn=root -i root
 -j testmac3.in.ibm.com -k 2389 -l cn=root -m root
 -s -t ibm-kn=(principle@realm) -u (kdb-password)

结论

本文提供Unix®Shell脚本,可用于在Unix或Windows上的各种TDS实例之间配置不同的复制拓扑。 这些脚本还允许通过SSL和Kerberos身份验证机制配置复制。 可以在没有任何TDS复制详细信息的先验知识的情况下使用这些脚本,因此可以用作复制配置的快速方法。

翻译自: https://www.ibm.com/developerworks/tivoli/library/t-secrep-tds/index.html

ibm tivoli

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值