<div style="white-space:pre-wrap">Actually, looking at the source code of 389DS it is impossible.<br><br><br>I gave up.<br><br><br><a href="http://fossies.org/linux/389-ds-base/ldap/servers/slapd/ssl.c">http://fossies.org/linux/389-ds-base/ldap/servers/slapd/ssl.c</a><br>(see screenshot)<br><br><br>Only RSA and some mysterious Fortezza are allowed. NSS' SSL_ConfigSecureServer actually does support kt_dh, not sure if it applies to ECDH as well.<br><br>I think working around 389DS' SSL code would be harder than just wrapping port 389 into stunnel, but FreeIPA installer doesn't allow the port 636 to be used by anyone else.<br><br>Seriously, can we just drop Apache+mod_nss and LDAP+libnss? Instead, have the web GUI wrapped into nginx and LDAP into stunnel?<br><br>One may argue that there won't be single sign-on, because Kerberos, but is anyone seriously using IE anymore?<br><br>As you might have seen from a parallel thread, NSS does a terrible job with sslabs by default. It is almost 2016, TLSv1.3 will be released soon, but it barely had support of TLSv1.2.<img src="cid:150dc1764b4dab68c281" style="width:568px; max-width:100%;"><br>As for now, I suggest writing it in docs and add a check to ipa CLI tools not to allow ECC certs.<br><br>Marat</div><br><div class="gmail_quote"><div dir="ltr">2015年11月6日(金) 17:50 Martin Kosek <<a href="mailto:mkosek@redhat.com">mkosek@redhat.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11/05/2015 02:39 PM, Marat Vyshegorodtsev wrote:<br>
> Hi!<br>
><br>
> I've been fighting for the past week with FreeIPA and trying to make<br>
> it work with my own CA certificate that is ECDSA_SHA256.<br>
><br>
> Even though I somehow fixed /etc/httpd/conf.d/nss.conf to make it work<br>
> (basically added correct NSSCipherSuite), LDAP (389DS) is a tough nut.<br>
><br>
> The command I used is:<br>
><br>
> ipa-server-install --mkhomedir --hostname '<a href="http://ipa.mydomain.com" rel="noreferrer" target="_blank">ipa.mydomain.com</a>' --realm<br>
> <a href="http://MYDOMAIN.COM" rel="noreferrer" target="_blank">MYDOMAIN.COM</a> --domain <a href="http://mydomain.com" rel="noreferrer" target="_blank">mydomain.com</a> --ds-password 'DS_PASSWORD_HERE'<br>
> --admin-password 'ADMIN_PASSWORD_HERE' --no-ntp --unattended<br>
> --no-host-dns --dirsrv-cert-file /etc/ipa/ipa.p12 --http-cert-file<br>
> /etc/ipa/ipa.p12 --dirsrv-pin 'PIN_FOR_CERT' --http-pin 'PIN_FOR_CERT'<br>
> --ca-cert-file /etc/ipa/myownca.pem<br>
><br>
> In this case, installation fails at the following step:<br>
> Unable to set admin password Command ''/usr/bin/ldappasswd' '-h'<br>
> '<a href="http://ipa.rpay.us" rel="noreferrer" target="_blank">ipa.rpay.us</a>' '-ZZ' '-x' '-D' 'cn=Directory Manager' '-y'<br>
> '/var/lib/ipa/tmp5KkCae' '-T' '/var/lib/ipa/tmpTC27Ap'<br>
> 'uid=admin,cn=users,cn=accounts,dc=rpay,dc=us'' returned non-zero exit<br>
> status 1<br>
><br>
> In /var/log/ipaserver-install.log I see a message:<br>
> DEBUG stderr=ldap_start_tls: Protocol error (2)<br>
>         additional info: SSL not supported by this server.<br>
><br>
> Basically, LDAP is broken now (it doesn't allow connecting without -ZZ<br>
> flag, and fails with it, since TLS is misconfigured at this point).<br>
><br>
> What actually happens, LDAP gets configured to use RSA as a key<br>
> exchange algorithm, and fails, since the cert is an ECC cert.<br>
><br>
> In /var/log/dirsrv/slapd-MYDOMAIN-COM/errors you can see:<br>
> [05/Nov/2015:12:22:36 +0000] - SSL alert: ConfigSecureServer: Server<br>
> key/certificate is bad for cert FreeIPA of family<br>
> cn=RSA,cn=encryption,cn=config (Netscape Portable Runtime error -12200<br>
> - The certificate provided cannot be used with the selected key<br>
> exchange algorithm.)<br>
><br>
> This is configured by ipaserver/install/dsinstance.py under def __enable_ssl:<br>
><br>
>        entry = conn.make_entry(<br>
>             DN(('cn', 'RSA'), ('cn', 'encryption'), ('cn', 'config')),<br>
>             objectclass=["top", "nsEncryptionModule"],<br>
>             cn=["RSA"],<br>
>             nsSSLPersonalitySSL=[self.nickname],<br>
>             nsSSLToken=["internal (software)"],<br>
>             nsSSLActivation=["on"],<br>
>         )<br>
>         conn.add_entry(entry)<br>
><br>
> My question is, is it possible to replace RSA with ECDSA here? If so,<br>
> what parameters should I pass to LDAP?<br>
<br>
Honza or Ludwig, do you know? This is certainly an uncharted territory, you are<br>
the first person I know about trying to install FreeIPA CA-less with ECC<br>
certificate.<br>
<br>
There is a ticket to get ECC support in PKI (i.e. not CA-less), but it was not<br>
completed yet:<br>
<a href="https://fedorahosted.org/freeipa/ticket/3951" rel="noreferrer" target="_blank">https://fedorahosted.org/freeipa/ticket/3951</a><br>
<br>
><br>
> If this is fixable, can someone add autodetect of the type of the<br>
> certificate and enable appropriate algorithms in LDAP and Apache?<br>
><br>
> Best regards,<br>
> Marat Vyshegorodtsev<br>
><br>
<br>
</blockquote></div>