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 1146143

Summary: RFE: allow to override Subject line from .csr when issuing a certificate
Product: Red Hat Enterprise Linux 7 Reporter: David Jaša <djasa>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED DEFERRED QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: djasa, dpal, mkosek, pasik, pvoborni, rcritten
Target Milestone: pre-dev-freezeKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-13 20:50:46 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 David Jaša 2014-09-24 14:39:54 UTC
Description of problem:
I tried to issue a certificate for a remote server management console (HP iLO 2 to be precise) and I didn't succeed because IPA refuses to sign a .csr that the device generates. The device seems to be configured correctly (ILO 2 Subsystem Name: <base_hostname>, Domain Name: <idm_domain>) yet it generates .csr with this subject:
Subject: C=US, ST=Texas, L=Houston, O=Hewlett-Packard Development Company, OU=ISS, CN=<base_hostname>

And IPA refuses (rightly so) to issue a certificate:
"Insufficient access: hostname in subject of request 'spice-dl380-01-mgmt' does not match principal hostname 'spice-dl380-01-mgmt.spice.brq.redhat.com'"
with options Retry and Cancel.

IMO there should also be another option: override CN with host FQDN (or possibly IP) in the Subject line


Version-Release number of selected component (if applicable):
ipa-server-3.0.0-37.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a Host in IPA web UI
2. generate a .csr request with just basename as a CN
3. try to issue a certificate for the request

Actual results:
the attempt is flat-out denied

Expected results:
an option to issue cert with CN=FQDN instead of CN=base_hostname is offered

Additional info:

Comment 1 David Jaša 2014-09-24 14:42:03 UTC
Created attachment 940793 [details]
example .csr

Comment 2 Jan Cholasta 2014-09-25 08:09:26 UTC
A server certificate with just the local part of the hostname in common name will fail validation on clients, unless it has a Subject Alternative Name extension with a DNSName of the FQDN.

Is the hostname on the remote management console configured correctly to the FQDN?

Can the remote management console be configured to include the SAN in the CSR it generates?

This could be solved on IPA side by allowing one to override the subject name when issuing a certificate, would that be OK for your use case?

Comment 3 David Jaša 2014-09-25 09:36:22 UTC
(In reply to Jan Cholasta from comment #2)
> A server certificate with just the local part of the hostname in common name
> will fail validation on clients, unless it has a Subject Alternative Name
> extension with a DNSName of the FQDN.

Yes, this is the reason why I reported the bug. :)

> Is the hostname on the remote management console configured correctly to the
> FQDN?

It seems so: the domain name is entered there (host name doesn't allow periods)

> 
> Can the remote management console be configured to include the SAN in the
> CSR it generates?
> 

It doesn't seem so, there are no more knobs to tune in the ILO.

> This could be solved on IPA side by allowing one to override the subject
> name when issuing a certificate, would that be OK for your use case?

I think so. There might be an issue though if the console validates that the certificate parameters are equal to .csr parameters - but this might or might not be the case.

Comment 4 Jan Cholasta 2014-09-25 09:40:00 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4572

Comment 6 Martin Kosek 2015-10-07 12:26:38 UTC
This Bugzilla is a feature request and as such will not make it to RHEL-6 where IdM server is only being stabilized and new functionality is not being added.

I am thus moving the Bugzilla to RHEL-7.x series. When/if the RFE is implemented, please clone a Bugzilla to RHEL-6 and provide business justification so that we can re-consider backporting to RHEL-6.

Comment 8 Petr Vobornik 2017-02-23 15:47:37 UTC
The bugzilla doesn't have high enough priority in comparison to other bugs/RFEs for 7.4. Moving to next release. Without sufficient justification it can be moved again later.

Comment 11 Dmitri Pal 2019-03-13 20:50:46 UTC
Hello,

The issues is partially addressed:

You can do it with Kerberos principal aliases. If you want to issue a cert for principal
host/shortname.example.com with CN=shortname, just add a Kerberos
principal alias:

ipa host-add-principal shortname.example.com 'host/shortname'
Then the certificate request will be allowed.

But this does not result in overriding the shortname with the FQDN in the issued cert.

It does not seem that this use case is popular and thus worth pursuing.
The upstream ticket is still open but this BZ will be closed for now.
If you have any feedback or additional requirements please do not hesitate to provide.

Thank you
Dmitri