如何禁用389目录服务器上的空密码和弱密码

我在CentOS上运行389-DS。 版本 – '389-ds-base.i686 1.2.11.15-34.el6_5'。 安全扫描显示,在389和636端口发现了NullCiphers。

我试图通过closuresDS,在所有'/etc/dirsrv/slapd-/dse.ldif'文件中编辑'nsSSL3Ciphers',然后启动DS来禁用它们。 nsSSL3Ciphers现在看起来像这样 –

modifyTimestamp: 20140915221826Z nsSSL3Ciphers: -rsa_null_md5,+rsa_rc4_128_md5,+rsa_rc4_40_md5,+rsa_rc2_40_md5, +rsa_des_sha,+rsa_fips_des_sha,+rsa_3des_sha,+rsa_fips_3des_sha,+fortezza,+fo rtezza_rc4_128_sha,-fortezza_null,+tls_rsa_export1024_with_rc4_56_sha,+tls_rs a_export1024_with_des_cbc_sha numSubordinates: 1 

扫描仍然在这两个端口上显示空密码。

 Here is the list of null SSL ciphers supported by the remote server : Null Ciphers (no encryption) TLSv1 NULL-SHA Kx=RSA Au=RSA Enc=None Mac=SHA1 The fields above are : {OpenSSL ciphername} Port 389 / tcp / ldap 636 / tcp / ldap 

任何想法如何我可以禁用这些空密码?

您可以按照其他答案中的build议手动修复密码,或者在适用的情况下,只需升级到FreeIPA 4.0.3,即修复了开箱即用的密码( 上游票证 )。

这是我用FreeIPA 4.0.3或4.1.0 Alpha1得到的:

 # nmap --script ssl-cert,ssl-enum-ciphers -p 636 `hostname` Starting Nmap 6.40 ( http://nmap.org ) at 2014-10-09 01:52 EDT Nmap scan report for ipa.mkosek-rhel71.test (10.16.78.57) Host is up (0.000092s latency). PORT STATE SERVICE 636/tcp open ldapssl | ssl-cert: Subject: commonName=ipa.mkosek-rhel71.test/organizationName=MKOSEK-RHEL71.TEST | Issuer: commonName=Certificate Authority/organizationName=MKOSEK-RHEL71.TEST | Public Key type: rsa | Public Key bits: 2048 | Not valid before: 2014-10-09T04:52:15+00:00 | Not valid after: 2016-10-09T04:52:15+00:00 | MD5: 0fc7 afd6 343b 9e51 abd0 3ba1 7bde 3c25 |_SHA-1: 246a 02f2 1663 3ca9 e97b cdd4 887e 6e10 7685 5627 | ssl-enum-ciphers: | TLSv1.2: | ciphers: | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - strong | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - strong | TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - strong | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - strong | TLS_RSA_WITH_AES_128_CBC_SHA - strong | TLS_RSA_WITH_AES_128_CBC_SHA256 - strong | TLS_RSA_WITH_AES_128_GCM_SHA256 - strong | TLS_RSA_WITH_AES_256_CBC_SHA - strong | TLS_RSA_WITH_AES_256_CBC_SHA256 - strong | TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong | TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong | TLS_RSA_WITH_SEED_CBC_SHA - strong | compressors: | NULL |_ least strength: strong Nmap done: 1 IP address (1 host up) scanned in 0.91 seconds 

您将不得不使用诸如Apache Directory Studio的LDAP浏览器来修改您的configuration或内置的LDAP实用程序ldapmodify。 我将概述使用ldapmodify的步骤,因为如果您select使用UI工具,它将会有帮助。

要使用ldapmodify,首先创build一个具有特定语法的ldif文件,然后导入它。 请注意,文件已经“replace:”通过它洒了。 这个特定的例子是在cn = encryption,cn = config中修改你也可以用LDAP浏览器查看和修改的东西。 该文件看起来像这样:

 dn: cn=encryption,cn=config changetype: modify replace: nsSSL3 nsSSL3: off - replace: nsSSL2 nsSSL2: off - replace: nsSSL3Ciphers nsSSL3Ciphers: nsSSL3Ciphers: -rc4,-rc4export,-rc2,-rc2export,-des,-desede3,-rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,+rsa_fips_3des_sha,+fips_3des_sha,-rsa_fips_des_sha,-fips_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,-tls_rsa_export1024_with_rc4_56_sha,-rsa_rc4_56_sha,-tls_rsa_export1024_with_des_cbc_sha,-rsa_des_56_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-dhe_dss_des_sha,+dhe_dss_3des_sha,-dhe_rsa_des_sha,+dhe_rsa_3des_sha,+tls_rsa_aes_128_sha,+rsa_aes_128_sha,+tls_dhe_dss_aes_128_sha,+tls_dhe_rsa_aes_128_sha,+tls_rsa_aes_256_sha,+rsa_aes_256_sha,+tls_dhe_dss_aes_256_sha,+tls_dhe_rsa_aes_256_sha,+tls_dhe_dss_1024_rc4_sha,+tls_dhe_dss_rc4_128_sha 

您可以将文件应用到您的LDAP服务器,如下所示:

ldapmodify -x -D“cn =目录pipe理器”-W -f no_null_cipher.ldif

我不能说这些确切的命令是否适用于您的具体设置,但这会使您走上正确的轨道。 您的模式可能会不同,所以cn = encryption,cn = config可能不会在哪里进行更改。 只是要非常小心,如果可能的话,testing你在做什么彻底。