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 1960041

Summary: Unable to issue cert with IP address in SAN - The service principal for subject alt name 10.11.173.11 in certificate request does not exist
Product: Red Hat Enterprise Linux 7 Reporter: Ian Pilcher <ipilcher>
Component: ipaAssignee: Florence Blanc-Renaud <frenaud>
Status: CLOSED NOTABUG QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.9CC: rcritten, tscherf
Target Milestone: rcFlags: pm-rhel: mirror+
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: 2021-05-12 22:22:04 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 Ian Pilcher 2021-05-12 20:59:49 UTC
I am attempting to issue a certificate with an IP address in its SAN extension.

Here is the host for which I want to issue the certificate:

 $ ipa host-show node01-idrac.pemlab.rdu2.redhat.com
   Host name: node01-idrac.pemlab.rdu2.redhat.com
   Principal name: host/node01-idrac.pemlab.rdu2.redhat.com.REDHAT.COM
   Principal alias: host/node01-idrac.pemlab.rdu2.redhat.com.REDHAT.COM
   Password: False
   Keytab: False
   Managed by: node01-idrac.pemlab.rdu2.redhat.com

Here is the CSR:

 $ openssl req -noout -text -in node01-idrac.csr
 Certificate Request:
     Data:
         Version: 0 (0x0)
         Subject: CN=node01-idrac.pemlab.rdu2.redhat.com
         Subject Public Key Info:
             Public Key Algorithm: rsaEncryption
                 Public-Key: (2048 bit)
                 Modulus:
                     ⋮
                 Exponent: 65537 (0x10001)
         Attributes:
         Requested Extensions:
             X509v3 Subject Alternative Name: 
                 DNS:node01-idrac.pemlab.rdu2.redhat.com, DNS:node01-idrac, DNS:10.11.173.11
     Signature Algorithm: sha256WithRSAEncryption
          ⋮

The DNS records:

 $ ipa dnsrecord-show pemlab.rdu2.redhat.com node01-idrac
   Record name: node01-idrac
   A record: 10.11.173.11

 $ ipa dnsrecord-show 173.11.10.in-addr.arpa 11
   Record name: 11
   PTR record: node01-idrac.pemlab.rdu2.redhat.com.

 $ ipa cert-request node01-idrac.csr --certificate-out node01-idrac.crt \
        --principal host/node01-idrac.pemlab.rdu2.redhat.com.REDHAT.COM
 ipa: ERROR: The service principal for subject alt name 10.11.173.11 in certificate request does not exist

Comment 2 Rob Crittenden 2021-05-12 21:19:30 UTC
Please provide the package version, rpm -q ipa-server

Comment 3 Ian Pilcher 2021-05-12 21:24:03 UTC
It's ipa-server-4.6.8-5.el7_9.5.x86_64 on fully updated RHEL 7.9.

Comment 4 Rob Crittenden 2021-05-12 22:15:17 UTC
I see it now. The problem is in the CSR. It has the wrong SAN type for an IP address. It uses a DNSName type, DNS:10.11.173.11

It should an IPAddress type, IP:10.11.173.11

Comment 5 Ian Pilcher 2021-05-12 22:22:04 UTC
(In reply to Rob Crittenden from comment #4)
> I see it now. The problem is in the CSR. It has the wrong SAN type for an IP
> address. It uses a DNSName type, DNS:10.11.173.11
> 
> It should an IPAddress type, IP:10.11.173.11

Son of a ...

Right you are.

Thanks & sorry about the noise!