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 756942 - pkcs12 passwords for dirsrv/http are not validated while doing an ipa-replica-prepare
Summary: pkcs12 passwords for dirsrv/http are not validated while doing an ipa-replica...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Martin Kosek
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-25 08:58 UTC by Kashyap Chamarthy
Modified: 2015-01-16 12:30 UTC (History)
3 users (show)

Fixed In Version: ipa-4.1.0-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-16 12:30:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kashyap Chamarthy 2011-11-25 08:58:01 UTC
Description of problem:

When generating a replica file (by running ipa-replica-prepare) with both --dirsrv_pkcs12 and --http_pkcs12. 
Two observations :
- pins provided for these p12 files are not validated, aka, random invalid pins are accepted
- *blank* pin is accepted as well for both p12 files


This was discovered while shanks and myself was testing replication w/ OPTIONS

Version-Release number of selected component (if applicable):
==============
[root@jetfire ~]# rpm -qi ipa-server | head -6
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.1.3                             Vendor: Red Hat, Inc.
Release     : 9.el6                         Build Date: Mon 07 Nov 2011 03:00:54 PM EST
Install Date: Fri 11 Nov 2011 01:02:45 AM EST      Build Host: x86-001.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.1.3-9.el6.src.rpm
Size        : 3382131                          License: GPLv3+
[root@jetfire ~]# 
==============

How reproducible:
All the time

Steps to Reproduce:
1. Have a working master IPA instance (host 'jetfire')
2. Prepare replica for host 'ratchet':

We just provided a random password for dirsrv pkcs12 and http pkcs12
#####################################
[root@jetfire ~]# ipa-replica-prepare --dirsrv_pkcs12=dirsrv.p12 --http_pkcs12=apache-ssl-cert.p12 --dirsrv_pin=invalidpasswd --http_pin=in
validpasswd --ip-address=10.65.201.69 ratchet.testrelm -p Secret123
Warning: Hostname (ratchet.testrelm) not found in DNS
Preparing replica for ratchet.testrelm from jetfire.testrelm
Copying SSL certificate for the Directory Server from dirsrv.p12
Creating SSL certificate for the dogtag Directory Server
Copying SSL certificate for the Web Server from apache-ssl-cert.p12
Copying additional files
Finalizing configuration
Packaging replica information into /var/lib/ipa/replica-info-ratchet.testrelm.gpg
Adding DNS records for ratchet.testrelm
Using reverse zone 201.65.10.in-addr.arpa.
[root@jetfire ~]# 
#####################################


=> W/o providing *any* passwords(aka blank passwords)
#####################################
[root@jetfire ~]# ipa-replica-prepare --dirsrv_pkcs12=dirsrv.p12 --http_pkcs12=apache-ssl-cert.p12 --dirsrv_pin= --http_pin= --ip-address=1
0.65.201.69 ratchet.testrelm -p Secret123
Preparing replica for ratchet.testrelm from jetfire.testrelm
Copying SSL certificate for the Directory Server from dirsrv.p12
Creating SSL certificate for the dogtag Directory Server
Copying SSL certificate for the Web Server from apache-ssl-cert.p12
Copying additional files
Finalizing configuration
Packaging replica information into /var/lib/ipa/replica-info-ratchet.testrelm.gpg
Adding DNS records for ratchet.testrelm
Using reverse zone 201.65.10.in-addr.arpa.
[root@jetfire ~]# 
#####################################

  
Actual results:
Replica gpg file is created w/o any errors despite providing incorrect pins(or no pins)

Expected results:
Passwords for both the p12 files should be validated ; appropriate error should be thrown

Comment 2 Martin Kosek 2011-12-01 14:54:11 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2155

Comment 5 Martin Kosek 2015-01-16 12:30:54 UTC
These options were being updated and refactored in Bug 1129558 (upstream ticket https://fedorahosted.org/freeipa/ticket/4489). The PIN should be now used for loading the PKCS#12 files in internal NSS database. Wrong PINs would be therefore reported.

Closing the Bug as fixed in current release then. If you manage to reproduce this issue, please feel free to re-open this bug.


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