RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 918730 - [RFE] Command line perl scripts should support more secure connections - LDAPI and SSL
Summary: [RFE] Command line perl scripts should support more secure connections - LDAP...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-06 18:43 UTC by Nathan Kinder
Modified: 2020-09-13 20:08 UTC (History)
6 users (show)

Fixed In Version: 389-ds-base-1.3.1.2-1.el7
Doc Type: Enhancement
Doc Text:
Cause: By default the servers perl scripts used the non-secure port for ldap connections. Consequence: Servers that requires SSL connections would not work wit the existing scripts. Change: A new protocol argument was added to each scripts where you can set the desired connection protocol(LDAP, LDAPS, START-TLS, and LDAPI). By default, if a protocol is not specified, it will try and use the most secure protocol available. Result: The server scripts can now handle many LDAP connection protocols.
Clone Of:
Environment:
Last Closed: 2014-06-13 11:05:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 332 0 None None None 2020-09-13 20:08:29 UTC

Description Nathan Kinder 2013-03-06 18:43:22 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/332

OS RHEL 6.2  (x86_64)
 
Packages Installed:
{{{
389-admin-1.1.29-1.el6.x86_64
389-admin-console-1.1.8-1.el6.noarch
389-admin-console-doc-1.1.8-1.el6.noarch
389-adminutil-1.1.15-1.el6.x86_64
389-console-1.1.7-1.el6.noarch
389-ds-1.2.2-1.el6.noarch
389-ds-base-1.2.9.14-1.el6_2.2.x86_64
389-ds-base-libs-1.2.9.14-1.el6_2.2.x86_64
389-ds-console-1.2.6-1.el6.noarch
389-ds-console-doc-1.2.6-1.el6.noarch
389-dsgw-1.1.9-1.el6.x86_64
openldap-clients-2.4.23-20.el6.x86_64
}}}

{{{
/usr/lib64/dirsrv/slapd-<instance>/db2bak.pl -v -D "cn=Directory Manager" -w -
Bind Password:
Back up directory: /var/lib/dirsrv/slapd-<instance>/bak/<instance>-2012_3_30_10_13_21
ldap_initialize( ldap://<FQDN>:389 )
ldap_bind: Confidentiality required (13)
        additional info: Operation requires a secure connection
}}}

For me the following simple fix proved to be a working solution (having said that I haven’t tried a restore yet):
With ldapmodify, ldap://<host> apparently kicks off a TLS connection whereas <host> on it’s own doesn’t. All very odd, anyhoo:
 
db2bak.pl : Line 125 add “ldap://” before the host name.

{{{
open(FOO, "| ldapmodify -x $vstr -h ldap://<host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
}}}

Rerunning with ldap:// added: 
{{{
/usr/lib64/dirsrv/slapd-<instance>/db2bak.pl -v -D "cn=Directory Manager" -w -
Bind Password:
Back up directory: /var/lib/dirsrv/slapd-<instance>/bak/<instance>-2012_3_30_10_14_14
ldap_initialize( <DEFAULT> )
add objectclass:
        top
        extensibleObject
add cn:
        backup_2012_3_30_10_14_14
add nsArchiveDir:
        /var/lib/dirsrv/slapd-<instance>/bak/<instance>-2012_3_30_10_14_14
add nsDatabaseType:
        ldbm database
adding new entry "cn=backup_2012_3_30_10_14_14, cn=backup, cn=tasks, cn=config"
modify complete
}}}
 
Straight forward enough change to the template…

Comment 1 Rich Megginson 2013-10-01 23:26:03 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.

Comment 4 Ján Rusnačko 2013-11-11 16:40:16 UTC
[root@localhost slapd-dstet]# ./db2bak.pl -v -D "cn=Directory Manager" -w "Secret123" -P STARTTLS
Back up directory: /var/lib/dirsrv/slapd-dstet/bak/dstet-2013_11_11_9_38_48
Protocol STARTTLS requested, but this protocol is not supported by the Directory Server.
Using the next most secure protocol (LDAP)
ldap_initialize( ldap://dstet.example.com:389 )
Successfully added task entry "cn=backup_2013_11_11_9_38_48, cn=backup, cn=tasks, cn=config"
[root@localhost slapd-dstet]# rpm -qa | grep 389-ds-base
389-ds-base-1.3.1.6-8.el7.x86_64

Feature is implemented in latest RHEL7 389, testing is yet to be done - bugs in this feature will be filed separately.

Comment 5 Amita Sharma 2013-12-18 10:36:37 UTC
Test Plan :: ​https://wiki.idm.lab.bos.redhat.com/export/idmwiki/index.php/Centralize_instance_specific_and_Secure_protocols_for_scripts
Automation :: clu/cluUtil.sh and ldapi/ladirun.sh


All test cases passed hence marking bug as VERIFIED.

Comment 6 Ludek Smid 2014-06-13 11:05:56 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.