#8451 Certificate SAN sanity check support for external DNS
Opened by lvg. Modified

Request for enhancement

As user , I want the SAN sanity check so that not only freeipa DNS can be used as truth but also an external DNS.

Issue

I can't get an dns:, ip: SAN in my certificate if I'm not using the FreeIPA DNS server. The sanity check will fail with " invalid 'csr': IP address in subjectAltName () unreachable from DNS names". Normal DNS resolution (on external DNS) won't fail (dig -x resolves to , dif resolves to ).

Steps to Reproduce

  1. /bin/ipa-getcert request -f /etc/pki/tls/certs/cert.crt -k /etc/pki/tls/private/key.key -r -I HTTP/ -K HTTP/ -N -g 2048 -D -A
  2. /bin/ipa-getcert list

Actual behavior

Certificate request gets CA_REJECTED

Expected behavior

Certificate requests gets MONITORING

Version/Release/Distribution

$ rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base pki-ca krb5-server
package freeipa-server is not installed
package freeipa-client is not installed
ipa-server-4.6.5-11.el7.centos.4.x86_64
ipa-client-4.6.5-11.el7.centos.4.x86_64
389-ds-base-1.3.9.1-12.el7_7.x86_64
pki-ca-10.5.16-6.el7_7.noarch
krb5-server-1.15.1-37.el7_7.2.x86_64

Additional info:

none


The verification isn't that the name is resolvable, it is that it is owned by the IPA domain.

The problem with relyong on external DNS is there is no proof that you own the SAN. What is to prevent a user from getting a SAN for www.google.com and creating a man-in-the-middle?

First, I understand what you mean.

In my company DNS is unfortunately apart from the IPA so when I want to secure communications I now cannot use freeipa for this. My application needs the ip address SAN.

Is a custom override possible for this security reason?
Or can an override be implemented?

Maybe add a special configuration for company trusted DNS servers?

We could implement a feature whereby administrators could configure alternative "canonical"/"trustworthy" DNS sources to use for CSR ipAddressName validation.
But this would be a significant engineering effort. And there is no simple way to bypass
or override the current behaviour.

@lvg an alternative approach would be to issue a sub-CA certificate (i.e. for a private key that is outside of Dogtag/FreeIPA), and use that CA to issue the IP address certificates.

As adding functionality to FreeIPA is a significant effort, so adding a sub-CA is. FreeIPA support (almost) all we need and we do not need more to manage and maintain.
As a test I bypassed the code to verify the consistency of the SAN and that works as expected. I think that implementing a trustworthy DNS source is preferable.
Also other users will like that I suppose. DNS is not always in Linux Administrators hands but in the hands of Network Administrators , mostly not willing to use FreeIPA for that....

@ftweedal Would Certificate Transparency help with the verification?

@amyra CT doesn't help here.

Metadata