Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1665176

Summary: No host and port validation on ca-kraconnector-add CLI
Product: Red Hat Enterprise Linux 8 Reporter: Deepak Punia <dpunia>
Component: pki-coreAssignee: RHCS Maintainers <rhcs-maint>
Status: CLOSED UPSTREAM QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: ascheel, edewata
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-17 09:51:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Deepak Punia 2019-01-10 15:56:14 UTC
Description of problem:
No Host and port validation on ca-kraconnector-add cli

Version-Release number of selected component (if applicable):
[root@pki1 ~]# rpm -qi pki-ca
Name        : pki-ca
Version     : 10.5.9
Release     : 10.el7_6
Architecture: noarch
Install Date: Monday 31 December 2018 01:03:34 AM EST
Group       : System Environment/Daemons
Size        : 2408924
License     : GPLv2
Signature   : (none)
Source RPM  : pki-core-10.5.9-10.el7_6.src.rpm
Build Date  : Monday 17 December 2018 07:38:34 PM EST
Build Host  : ppc-042.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://pki.fedoraproject.org/
Summary     : Certificate System - Certificate Authority

How reproducible:

# pki -p 20080 -d /opt/pki/certdb/ -c SECret.123 -n "PKI CA Administrator for Example.Org" ca-kraconnector-add --host pki1.example.com --port 8443
--------------------------------------
Added KRA host "pki1.example.com:8443"
--------------------------------------

Accepting anything in port and host and port:-
# pki -p 20080 -d /opt/pki/certdb/ -c SECret.123 -n "PKI CA Administrator for Example.Org" ca-kraconnector-add --host pki1.example.xyz.abc --port abc8443xyz
------------------------------------------------
Added KRA host "pki1.example.xyz.abc:abc8443xyz"
------------------------------------------------


Steps to Reproduce:
1.CLI Accepting anything in port and host and port:-
# pki -p 20080 -d /opt/pki/certdb/ -c SECret.123 -n "PKI CA Administrator for Example.Org" ca-kraconnector-add --host pki1.example.xyz.abc --port abc8443xyz
------------------------------------------------
Added KRA host "pki1.example.xyz.abc:abc8443xyz"
------------------------------------------------

Actual results:
Successful without any error.

Expected results:
Should failed with error message

Additional info:

Comment 2 Endi Sukma Dewata 2020-02-17 09:51:39 UTC
This is a negative scenario. The issue will be addressed upstream:
https://pagure.io/dogtagpki/issue/3121