⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tls.sdf

📁 OpenLdap是LDAP的开源项目
💻 SDF
字号:
# Copyright 1999-2007 The OpenLDAP Foundation, All Rights Reserved.# COPYING RESTRICTIONS APPLY, see COPYRIGHT.H1: Using TLSOpenLDAP clients and servers are capable of using the{{TERM[expand]TLS}} ({{TERM:TLS}}) framework to provideintegrity and confidentiality protections and to supportLDAP authentication using the {{TERM:SASL}} EXTERNAL mechanism. H2: TLS CertificatesTLS uses {{TERM:X.509}} certificates to carry client and serveridentities. All servers are required to have valid certificates,whereas client certificates are optional. Clients must have avalid certificate in order to authenticate via SASL EXTERNAL.For more information on creating and managing certificates,see the {{PRD:OpenSSL}} documentation.H3: Server CertificatesThe DN of a server certificate must use the CN attributeto name the server, and the {{EX:CN}} must carry the server'sfully qualified domain name. Additional alias names and wildcardsmay be present in the {{EX:subjectAltName}} certificate extension.More details on server certificate names are in {{REF:RFC2830}}.H3: Client CertificatesThe DN of a client certificate can be used directly as anauthentication DN.Since X.509 is a part of the {{TERM:X.500}} standard and LDAPis also based on X.500, both use the same DN formats andgenerally the DN in a user's X.509 certificate should beidentical to the DN of their LDAP entry. However, sometimesthe DNs may not be exactly the same, and so the mappingfacility described in {{SECT:Mapping Authentication identities to LDAP entries}}can be applied to these DNs as well.H2: TLS ConfigurationAfter obtaining the required certificates, anumber of options must be configured on both the clientand the server to enable TLS and make use of the certificates.At a minimum, the clients must be configured with the filenamecontaining all of the {{TERM[expand]CA}} (CA) certificates itwill trust. The server must be configured with the {{TERM:CA}}certificates and also its own server certificate and private key.Typically a single CA will have issued the server certificateand all of the trusted client certificates, so the server onlyneeds to trust that one signing CA. However, a client may wishto connect to a variety of secure servers managed by differentorganizations, with server certificates generated by manydifferent CAs. As such, a client is likely to need a list ofmany different trusted CAs in its configuration.H3: Server ConfigurationThe configuration directives for slapd belong in the global directivessection of {{slapd.conf}}(5). H4: TLSCACertificateFile <filename>This directive specifies the {{TERM:PEM}}-format file containingcertificates for the CA's that slapd will trust. The certificate forthe CA that signed the server certificate must be included amongthese certificates. If the signing CA was not a top-level (root) CA,certificates for the entire sequence of CA's from the signing CA tothe top-level CA should be present. Multiple certificates are simplyappended to the file; the order is not significant.H4: TLSCACertificatePath <path>This directive specifies the path of a directory that containsindividual {{TERM:CA}} certificates in separate files.  In addition,this directory must be specially managed using the OpenSSL {{c_rehash}}utility. When using this feature, the OpenSSL library will attempt tolocate certificate files based on a hash of their name and serial number.The {{c_rehash}} utility is used to generate symbolic links with thehashed names that point to the actual certificate files. As such,this option can only be used with a filesystem that actually supportssymbolic links. In general, it is simpler to use the{{EX:TLSCACertificateFile}} directive instead.H4: TLSCertificateFile <filename>This directive specifies the file that contains the slapd servercertificate. Certificates are generally public information andrequire no special protection.H4: TLSCertificateKeyFile <filename>This directive specifies the file that contains the private keythat matches the certificate stored in the {{EX:TLSCertificateFile}}file. Private keys themselves are sensitive data and are usuallypassword encrypted for protection. However, the current implementationdoesn't support encrypted keys so the key must not be encryptedand the file itself must be protected carefully.H4: TLSCipherSuite <cipher-suite-spec>This directive configures what ciphers will be accepted and thepreference order. {{EX:<cipher-suite-spec>}} should be a cipherspecification for OpenSSL. You can use the command>	openssl ciphers -v ALLto obtain a verbose list of available cipher specifications.Besides the individual cipher names, the specifiers {{EX:HIGH}},{{EX:MEDIUM}}, {{EX:LOW}}, {{EX:EXPORT}}, and {{EX:EXPORT40}}may be helpful, along with {{EX:TLSv1}}, {{EX:SSLv3}},and {{EX:SSLv2}}.H4: TLSRandFile <filename>This directive specifies the file to obtain random bits from when{{EX:/dev/urandom}} is not available. If thesystem provides {{EX:/dev/urandom}} then this option is not needed,otherwise a source of random data must be configured.Some systems (e.g. Linux)provide {{EX:/dev/urandom}} by default, while others (e.g. Solaris)require the installation of a patch to provide it, and others maynot support it at all. In the latter case, EGD or PRNGD should beinstalled, and this directive should specify the name of the EGD/PRNGDsocket. The environment variable {{EX:RANDFILE}} can also be used to specifythe filename. Also, in the absence of these options, the {{EX:.rnd}}file in the slapd user's home directory may be used if it exists. Touse the {{EX:.rnd}} file, just create the file and copy a few hundredbytes of arbitrary data into the file. The file is only used toprovide a seed for the pseudo-random number generator, and it doesn'tneed very much data to work.H4: TLSEphemeralDHParamFile <filename>This directive specifies the file that contains parameters for Diffie-Hellmanephemeral key exchange.  This is required in order to use a DSA certificate onthe server side (i.e. {{EX:TLSCertificateKeyFile}} points to a DSA key).Multiple sets of parameters can be included in the file; all of them willbe processed.  Parameters can be generated using the following command>	openssl dhparam [-dsaparam] -out <filename> <numbits>H4: TLSVerifyClient { never | allow | try | demand }This directive specifies what checks to perform on client certificatesin an incoming TLS session, if any. This option is set to {{EX:never}}by default, in which case the server never asks the client for acertificate. With a setting of {{EX:allow}} the server will askfor a client certificate; if none is provided the session proceedsnormally. If a certificate is provided but the server is unable toverify it, the certificate is ignored and the session proceedsnormally, as if no certificate had been provided. With a setting of{{EX:try}} the certificate is requested, and if none is provided,the session proceeds normally. If a certificate is provided and itcannot be verified, the session is immediately terminated. With asetting of {{EX:demand}} the certificate is requested and a validcertificate must be provided, otherwise the session is immediatelyterminated.Note: The server must request a client certificate in order touse the SASL EXTERNAL authentication mechanism with a TLS session.As such, a non-default {{EX:TLSVerifyClient}} setting must be configuredbefore SASL EXTERNAL authentication may be attempted, and theSASL EXTERNAL mechanism will only be offered to the client if a validclient certificate was received.H3: Client ConfigurationMost of the client configuration directives parallel the serverdirectives. The names of the directives are different, and they gointo {{ldap.conf}}(5) instead of {{slapd.conf}}(5), but theirfunctionality is mostly the same. Also, while most of these options maybe configured on a system-wide basis, they may all be overridden byindividual users in their {{.ldaprc}} files.The LDAP Start TLS operation is used in LDAP to initiate TLSnegotatation.  All OpenLDAP command line tools support a {{E:-Z}}and {{E:-ZZ}} flag to indicate whether a Start TLS operation is tobe issued.  The latter flag indicates that the tool is to ceaseprocessing if TLS cannot be started while the former allows thecommand to continue.In LDAPv2 environments, TLS is normally started using the LDAPSecure URI scheme ({{EX:ldaps://}}) instead of the normal LDAP URIscheme ({{EX:ldap://}}).  OpenLDAP command line tools allow eitherscheme to used with the {{EX:-U}} flag and with the {{EX:URI}}{{ldap.conf}}(5) option.H4: TLS_CACERT <filename>This is equivalent to the server's {{EX:TLSCACertificateFile}} option. Asnoted in the {{SECT:TLS Configuration}} section, a client typicallymay need to know about more CAs than a server, but otherwise thesame considerations apply.H4: TLS_CACERTDIR <path>This is equivalent to the server's {{EX:TLSCACertificatePath}} option. Thespecified directory must be managed with the OpenSSL {{c_rehash}}utility as well.H4: TLS_CERT <filename>This directive specifies the file that contains the client certificate.This is a user-only directive and can only be specified in a user's{{.ldaprc}} file.H4: TLS_KEY <filename>This directive specifies the file that contains the private keythat matches the certificate stored in the {{EX:TLS_CERT}}file. The same constraints mentioned for {{EX:TLSCertificateKeyFile}}apply here. This is also a user-only directive.H4: TLS_RANDFILE <filename>This directive is the same as the server's {{EX:TLSRandFile}}option.H4: TLS_REQCERT { never | allow | try | demand }This directive is equivalent to the server's {{EX:TLSVerifyClient}}option. However, for clients the default value is {{EX:demand}}and there generally is no good reason to change this setting.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -