allow to use secure replication and to enable ssl (LDAPsport)
| | |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, |
| | | 'dsReplicationPort' : instance.getREPLPort(), |
| | | 'dsSecureReplication' : instance.getSecureReplication(), |
| | | 'refInstanceHost' : instanceSource.getHost(), |
| | | 'refInstancePort' : instanceSource.getLDAPPort(), |
| | | 'refInstanceDn' : DIRECTORY_INSTANCE_DN, |
| | | 'refInstancePswd' : DIRECTORY_INSTANCE_PSWD, |
| | | 'refReplicationPort': instanceSource.getREPLPort(), |
| | | 'replicationDnList' : [suffix.getSuffixDn()], |
| | | 'refSecureReplication' : instanceSource.getSecureReplication(), |
| | | 'expectedRC' : [0,5], |
| | | 'fileFd' : cFileFd |
| | | } |
| | |
| | | Replication port number |
| | | </function-arg-description> |
| | | </function-arg-def> |
| | | |
| | | |
| | | <function-arg-def name="dsSecureReplication" type="optional" |
| | | default="'false'"> |
| | | <function-arg-description> |
| | | Use replication over ssl on first server |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="string"/> |
| | | </function-arg-def> |
| | | |
| | | <function-arg-def name="refInstanceHost" type="optional" |
| | | default="STAF_REMOTE_HOSTNAME"> |
| | | <function-arg-description> |
| | |
| | | DN of the replicated suffix |
| | | </function-arg-description> |
| | | </function-arg-def> |
| | | |
| | | |
| | | <function-arg-def name="refSecureReplication" type="optional" |
| | | default="'false'"> |
| | | <function-arg-description> |
| | | Use replication over ssl on reference server |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="string"/> |
| | | </function-arg-def> |
| | | |
| | | <function-arg-def name="adminUID" type="optional" |
| | | default="DIRECTORY_INSTANCE_DN"> |
| | | <function-arg-description> |
| | |
| | | if replicationDnList: |
| | | for dn in replicationDnList: |
| | | STAFCmdParamsList.append('-b "%s"' % dn) |
| | | |
| | | |
| | | if ( dsSecureReplication == 'true' ): |
| | | STAFCmdParamsList.append('--secureReplication1') |
| | | |
| | | if ( refSecureReplication == 'true' ): |
| | | STAFCmdParamsList.append('--secureReplication2') |
| | | |
| | | if adminUID: |
| | | STAFCmdParamsList.append('-I "%s"' % adminUID) |
| | | |
| | |
| | | def __init__(self, iid, name, product, role, host, installDir, tarball, \ |
| | | portLDAP, portLDAPS, portJMX, portREPL, \ |
| | | sslEnabled, certificate, startTlsEnabled, \ |
| | | tuning): |
| | | secureReplication,tuning): |
| | | # from instance object |
| | | self.iid = iid |
| | | self.name = name |
| | |
| | | self.sslEnabled = sslEnabled |
| | | self.certificate = certificate |
| | | self.startTlsEnabled = startTlsEnabled |
| | | self.secureReplication = secureReplication |
| | | self.tuning = tuning |
| | | |
| | | def getLDAPSPort(self): |
| | |
| | | |
| | | def getIsStartTlsEnabled(self): |
| | | return self.startTlsEnabled |
| | | |
| | | |
| | | def getSecureReplication(self): |
| | | return self.secureReplication |
| | | |
| | | def getTuning(self): |
| | | return self.tuning |
| | | |
| | |
| | | cSslEnabled = 'false' |
| | | cCertificate = NOT_DEFINED |
| | | cStartTlsEnabled = 'false' |
| | | cSecureReplication = 'false' |
| | | cIsJava = 'false' |
| | | cXms = NOT_DEFINED |
| | | cXmx = NOT_DEFINED |
| | |
| | | cSslEnabled = _getAttributeNode(thisSubChild,'sslEnabled') |
| | | cCertificate = _getAttributeNode(thisSubChild,'certificate') |
| | | cStartTlsEnabled = _getAttributeNode(thisSubChild,'startTlsEnabled') |
| | | |
| | | cSecureReplication = _getAttributeNode(thisSubChild,'secureReplication') |
| | | |
| | | elif (thisSubChild.getNodeType() == Node.ELEMENT_NODE and |
| | | thisSubChild.getNodeName() == 'tuning'): |
| | |
| | | opendsZip,\ |
| | | cPortLDAP,cPortLDAPS,cPortJMX,cPortREPL,\ |
| | | cSslEnabled,cCertificate,cStartTlsEnabled,\ |
| | | cOpendsTuning)] |
| | | cSecureReplication,cOpendsTuning)] |
| | | |
| | | |
| | | |
| | |
| | | STAFCmd='%s/dsreplication' % (dsBinPath) |
| | | |
| | | STAFCmdParamsList.append('status -n') |
| | | STAFCmdParamsList.append('--trustAll') |
| | | STAFCmdParamsList.append('-h %s' % instance.getHost()) |
| | | STAFCmdParamsList.append('-p %s' % instance.getLDAPPort()) |
| | | if ( instance.getIsSslEnabled() == 'true' ): |
| | | port = instance.getLDAPSPort() |
| | | STAFCmdParamsList.append('--useSSL') |
| | | else: |
| | | port = instance.getLDAPPort() |
| | | |
| | | STAFCmdParamsList.append('-p %s' % port ) |
| | | STAFCmdParamsList.append('-b %s' % suffix.getSuffixDn()) |
| | | STAFCmdParamsList.append('-I "%s"' % adminDN) |
| | | STAFCmdParamsList.append('-w "%s"' % adminPwd) |
| | |
| | | <iterate in="instances" var="instance"> |
| | | <sequence> |
| | | <script> |
| | | |
| | | if ( instance.getIsSslEnabled() == 'true' ): |
| | | port = instance.getLDAPPort() |
| | | else: |
| | | port = instance.getLDAPSPort() |
| | | |
| | | serverName = '%s:%s' % \ |
| | | (instance.getHost(),instance.getLDAPPort()) |
| | | (instance.getHost(),port) |
| | | nbEntries = NOT_DEFINED |
| | | |
| | | for e in cmdOutput: |
| | |
| | | <!ATTLIST security |
| | | sslEnabled ( true | false ) "false" |
| | | certificate ( generateSelfSigned ) "generateSelfSigned" |
| | | startTlsEnabled ( true | false ) "false"> |
| | | startTlsEnabled ( true | false ) "false" |
| | | secureReplication ( true | false ) "false" > |
| | | <!ELEMENT tuning (java?,databaseCachePercentage?,replicationPurgeDelay?)> |
| | | <!ELEMENT java EMPTY> |
| | | <!ATTLIST java |