(file) Return to PegasusSSLGuidelines.htm CVS log (file) (dir) Up to [Pegasus] / pegasus / doc

  1 h.sterling 1.1 <HTML>
  2                <TITLE>OpenPegasus SSL Guidelines</TITLE>
  3                
  4                <BODY>
  5                <H2>OpenPegasus 2.5 SSL Guidelines</H2>
  6                
  7 h.sterling 1.2 <P><B>Version:&nbsp;</B>1.0<BR>
  8                <B>Created:&nbsp;</B>July 20, 2005</P>
  9 h.sterling 1.1 <UL>
 10                	<LI><A HREF="#OVERVIEW">Overview</A>
 11                
 12                	<LI><A HREF="#RELATED">Related Information</A>
 13                	<LI><A HREF="#BUILDING">Building Pegasus with SSL</A>
 14                	<LI><A HREF="#CERTS">Creating SSL Certificates</A>
 15                	<LI><A HREF="#CONFIGURE">Configuring Pegasus for SSL</A>
 16                	<LI><A HREF="#DESIGN">SSL Design Question List</A>
 17                	<LI><A HREF="#TRUSTSTORE">Truststore Management</A>
 18                	<LI><A HREF="#CLI">ssltrustmgr CLI</A>
 19                	<LI><A HREF="#CLIENT">Configuring the Pegasus CIM Client for SSL</A>
 20                	<LI><A HREF="#AUTH">SSL Authorization</A>
 21                	<LI><A HREF="#RESOURCES">Resources</A>
 22                </UL>
 23                
 24                
 25                <H3><A NAME="OVERVIEW">Overview</A></H3>
 26                
 27                <P>
 28                The following document serves as a guide on how to build and configure Pegasus for SSL support.  It also discusses how to utilize a certificate-based
 29 h.sterling 1.2 infrastructure and configure the Pegasus CIM client.  
 30                <P>
 31                This guide requires a basic understanding of SSL, OpenSSL, and basic authentication. This guide is intended to help developers 
 32                and administrators make the right decisions about how to use SSL for their particular application. 
 33                It is not intended to be a primary source of education on SSL. If you are not familiar with these technologies,
 34                consult the sources in the <A HREF="#RESOURCES">Resources</A> section at the bottom.
 35                <P>
 36                
 37                <P>Note: 
 38                In this document, the term "trust" refers only to authentication. It does not imply full trust in the traditional sense, because 
 39                it does not take into account authorization checks. It remains the responsibility of providers and clients to perform authorization, 
 40                and therefore establish real trust. Likewise, the term "Trust Store" can be misleading since the "store" is only a source of 
 41                authentication credentials.  Please bear this in mind when documenting recommended deployments or building clients or providers.
 42 h.sterling 1.1 </P>
 43                
 44                <H3><A NAME="RELATED">Related Information</A></H3>
 45                A significant portion of the information in this document is taken from various PEP's. 
 46                This document attempts to bring all of this information 
 47                together in a cohesive and simplified format. 
 48                <P>
 49                <UL>
 50                <LI>PEP#035 - Add support for /dev/random in SSLContext</LI>
 51                <LI>PEP#060 - SSL support in CIM/XML indication delivery</LI>
 52                <LI>PEP#074 - SSLContext and Certificate verification interface enhancement</LI>
 53                <LI>PEP#155 - Support for Client SSL Certificate Verification in CIM Server for CIMExport requests</LI>
 54                <LI>PEP#165 - SSL Client Verification</LI>
 55                <LI>PEP#187 - SSL Certificate Management Enhancements</LI>
 56                <LI>PEP#200 - Recommended OpenPegasus 2.5 Build and Configuration Options for Selected Platforms</LI>
 57                </UL>
 58                </P>
 59                
 60                <H3><A NAME="BUILDING">Building Pegasus with SSL</A></H3>
 61                
 62                <P> To build Pegasus with HTTPS support, you will need to build against the <A HREF="http://www.openssl.org">OpenSSL 
 63 h.sterling 1.1   package</A>. The SSL support outlined here has been tested against recent releases of the major verions 0.9.6X and 0.9.7X (most notably, 0.9.7d).  
 64 h.sterling 1.2   It has not been tested against major version 0.9.8, which came out in July 2005.  Some tests have found that versions of 0.9.6X prior to 0.9.6c 
 65                  do not contain the certificate revocation list (CRL) support that the OpenPegasus 2.5 utilizes. 
 66 h.sterling 1.1 Because this is an open source project, the SSL support has been tested with many versions of OpenSSL, 
 67                  but we cannot guarantee it has been tested with every version on every platform.  
 68 h.sterling 1.2 A list of recent OpenSSL releases, and important-to-review security advisories and fixes, can
 69                be found on the <A HREF="http://www.openssl.org/news">OpenSSL News page</A>.
 70 h.sterling 1.1 </P>
 71                <P>
 72                After grabbing the OpenSSL source tarball, you need to set the following environment variables before building Pegasus:
 73                <UL>
 74                  <LI>PEGASUS_HAS_SSL=1</LI>
 75                  <LI>OPENSSL_HOME=&lt;location of the SDK package&gt; This directory must contain 
 76                    the OpenSSL include directory, $(OPENSSL_HOME)/include, and the OpenSSL library 
 77                    directory, $(OPENSSL_HOME)/lib.</LI>
 78                  <LI>OPENSSL_BIN=&lt;location of the binary package&gt; This only needs to be 
 79                    set if the OpenSSL binaries are not in $(OPENSSL_HOME)/bin.</LI>
 80                </UL>
 81                
 82                Note that Pegasus supports SSLv3 and TLSv1 by default. It does NOT support SSLv2. 
 83                To turn on SSLv2 support, enable the additional environment variable: 
 84                <UL>
 85                  <LI> PEGASUS_ENABLE_SSLV2=1 </LI>
 86                </UL>
 87                <P>
 88 h.sterling 1.2 It is not recommended to enable this protocol, as there have been many security weaknesses associated with it.  Unless you are dealing
 89 h.sterling 1.1 with very outdated clients, you probably do not need to enable it.  
 90                </P>
 91                <P>
 92                After setting these variables, proceed as normal with the build instructions in the readme file.
 93                </P>
 94                
 95                <H3><A NAME="CERTS">Creating SSL Certificates</A></H3>
 96                
 97                There are two options for creating the CIMOM's certificate:
 98                <UL>
 99                <LI>Self-signed certificate</LI>
100                <LI>Certificate issued by a third-party certificate authority</LI>
101                </UL>
102                <P>
103                To generate a self-signed certificate, you must create a private key, a certificate signing request (CSR), and finally the public x509 certificate.
104                You also need an SSL configuration file that defines the parameters of the Distinguished Name (DN).  You can use the one that comes with Pegasus, 
105                ssl.cnf in the root directory, or generate your own.  For a self-signed certificate, the subject
106                is the same as the issuer.  Execute the following commands to create a self-signed certificate.  
107 h.sterling 1.2 The PEGASUS_ROOT and PEGASUS_HOME have to be set to your respective installation and source directory.  You will also need an OpenSSL configuration
108                file.  There is a sample configuration file that comes with the OpenSSL package. 
109 h.sterling 1.1 
110                <P>
111 h.sterling 1.2 <UL>
112                <LI>To generate a private key, execute the following:<BR>
113                	<FONT FACE="courier" color="009900">openssl genrsa -out myserver.key 1024</FONT><BR>
114                	Set the "sslKeyFilePath" configuration property to point to this key file. 
115                </LI>
116                <LI>To generate a certificate signing request, execute the following:<BR>
117                	<FONT FACE="courier" color="009900">openssl req -config openssl.cnf -new -key myserver.key -out myserver.csr</font>
118                </LI>
119                <LI>	At this point, the certificate sigining request can be sent out to a third-party certificate authority for signing,
120                	or a self-signed certificate can be generated.  To generate a self-signed certificate, execute the following:<BR>
121                    <FONT FACE="courier" color="009900">openssl x509 -in myserver.csr -out myserver.cert -req -signkey myserver.key -days 365</FONT><BR>
122                	Set the "sslCertificateFilePath" configuration property to point to this certificate file. The above CSR file can be discarded
123                	after the certificate is created.
124                </LI>
125                </UL>
126 h.sterling 1.1 
127                <P>
128                After creating the keypair, make sure you protect the information sufficiently by changing permissions on the files and/or directories.  
129                The following table shows the recommended privileges:
130                <P>
131                
132                <TABLE border="1" cellspacing="1" width="30%">
133                <TBODY>
134                <TR><TH><B>SSL file</B></TH><TH><B>Pegasus Config property</B></TH><TH><B>Permissions</B></TH></TR>
135                <TR><TD>Private key</td><TD>sslKeyFilePath</TD><TD>rwx------</TD></TR>
136                <TR><TD>Public certificate</td><TD>sslCertificateFilePath</TD> <TD>rwxr-xr-x</TD></TR>
137                <TR><TD>Truststore</td><TD>sslTrustStore, exportSSLTruststore</TD> <TD>rwxr-xr-x</TD></TR>
138                <TR><TD>CRL store </td><TD>crlStore</TD> <TD>rwxr-xr-x</TD></TR>
139                </TBODY>
140                </TABLE>
141                <P>
142 h.sterling 1.2 The administrator is responsible for ensuring that the above file permissions are set correctly.  
143                The administrator should also ensure that all containing directories all the way up to the base directory are not world-writeable. Pegasus only checks the following conditions when starting up:
144 h.sterling 1.1 <UL>
145                <LI>The sslKeyFilePath and the sslCertificateFilePath are readable by the CIMOM.</LI>
146                <LI>The sslTrustStore, exportSSLTrustStore, and crlStore are readable by the CIMOM if they are a single file.</LI>
147                <LI>The sslTrustStore, exportSSLTrustStore, and crlStore are readable and writable by the CIMOM if they are a directory.</LI>
148                </UL>
149                <P>
150                These same file permissions should be used for protecting a client's private key, public key, truststore, and crl store as well.
151                <p>
152                  For more information on generating keys and certificates, consult the <A HRef="http://www.openssl.org/docs/HOWTO/">OpenSSL 
153                  HOW-TO documentation</A>. </p>
154                <H3><A NAME="CONFIGURE">Configuring Pegasus for SSL</A></H3>
155                
156                There are many environment variable settings associated with SSL.  Here is a brief discussion of the subtleties of these options and how they work together to
157                create a more secure environment.  More information on the default and recommended settings can be found in 
158                PEP#200 Recommended OpenPegasus 2.5 Build and Configuration Options for Selected Platforms.  Additionally, the section on 
159                <A HREF="#DESIGN">Design Question List</A> should help determine what these settings should be for a given application.
160                
161                <P>
162                <B>enableHttpsConnection</b><BR>
163 h.sterling 1.2   This is disabled by default on most platforms.  It is recommended that 
164                  all remote communication be done over the HTTPS port. However, if you are sending cleartext 
165 h.sterling 1.1   passwords over the wire, it is imperative that you only use the secure port. 
166                  For added security, the HTTP port can be disabled to prevent clients from connecting 
167                  to it. 
168 h.sterling 1.2   The HTTPS connection is enabled by default only on the following platforms:
169                <P>
170                <UL>
171                <LI>LINUX</LI>
172                <LI>OS-400</LI>
173                <LI>HP_UX (if PEGASUS_USE_RELEASE_CONFIG_OPTIONS is true)</LI>
174                <LI>VMS   (if PEGASUS_USE_RELEASE_CONFIG_OPTIONS is true)</LI>
175                </UL>
176                </P>
177                
178 h.sterling 1.1 <P>
179                <B>httpsPort</B><BR>
180                The default setting is 5989, the official WBEM secure port.  
181                <P> <B>sslCertificateFilePath</B> <BR>
182                This is the path to the x509 server certificate.  
183                The server certificate may be a chain in which case the file should contain PEM encoded certificates beginning with the server certificate 
184                and followed by each signing certificate authority (CA) including the root CA.  If the server certificate is a self signed certificate, 
185                the file only contains the self-signed certificate in PEM format.
186                The certificate cannot be encrypted because there is currently no mechanism for decrypting the certificate using a user-supplied password.  
187                This property must be defined if enableHttpsConnection is true. 
188                Any failure in finding this file will result in the cimserver failing to start.  
189                See <A HREF="#CERTS">Creating SSL Certificates</A> for more information.
190                <P>
191                <B>sslKeyFilePath</B><BR>
192                This is the path to the server's private key.  All keys should be at least 1024 bytes long.  This property must be defined if 
193                enableHttpsConnection is true. Any failure in finding this file will result in the cimserver failing to start.  
194                See <A HREF="#CERTS">Creating SSL Certificate</A> for more information.
195                <P>
196                <B>sslClientVerificationMode</b><BR>
197                  This setting controls how the cimserver (i.e. the HTTPS port) is configured. 
198                  It does not control the configuration of the export connection. There are three 
199 h.sterling 1.1   possible settings: disabled, required, optional. There is no "right" setting 
200                  for this property. The default is disabled and it is fine to 
201                  leave the setting as disabled if you are going to use basic authentication to 
202                  authenticate all client requests. In many applications where a physical person 
203                  is there to supply a username and password, basic authentication is sufficient.
204                  Other 
205                  environments may be heterogeneous, in which case it makes sense to allow both 
206                  basic authentication and SSL certificate verification. The setting of this variable 
207                  also impacts what happens during the OpenSSL handshake: 
208                <UL>
209                <LI><B>"required"</B> -- The server requires that the client certificate be trusted in order for the handshake to continue.
210                	If the client fails to send a certificate or sends an untrusted certificate, the handshake is immediately terminated.</LI>
211                <LI><B>"optional"</B> -- The server will request that a client certificate be sent, but will continue the handshake even if no certificate is
212                	received.  If authentication is enabled, the server will seek to authenticate the client via an alternative method of authentication.</LI>
213                <LI><B>"disabled"</B> -- The server will not prompt the client for a certificate.  <I>This is the default.</I></LI>
214                </UL>
215                Pegasus currently ties a certificate to a valid OS user.  Multiple certificates may be registered to the same user.  When a certificate is
216                authenticated, Pegasus views it in the same way as if a user was authenticated via basic authentication.  The providers
217                receive the username that the certificate was mapped to.  See the SSL Authorization section
218                for more information.
219                
220 h.sterling 1.1 <P>
221                <B>sslTrustStore</B><BR>
222                This setting controls the truststore for the cimserver's HTTPS connection.  It can be
223                either a directory or a single root CA file.  When set to a directory, it is recommended that you use the ssltrustmgr CLI 
224                to populate the truststore as there are strict naming requirements for trusted certificate files.  See the <A HREF="#CLI">ssltrustmgr CLI</A>
225                section for further information.
226                <P>
227                <B>sslTrustStoreUserName</B><BR>
228                This setting is only utilized if the sslTrustStore is a single CA file.  It is not used if the sslTrustStore setting is a directory, 
229                but it still must be set to a valid system user.  This is because the validation of the property is done independently of the sslTrustStore
230                setting.  This property represents the valid OS user that corresponds to the root certificate.  All requests authenticated with a certificate
231                under the root CA will be associated with this user and the username will be propagated to providers.  If applications desire for there to 
232                be a one-to-one correspondence between users and certificates, it is recommended that each certificate be registered individually using the
233                <A HREF="#CLI">ssltrustmgr CLI</A>. 
234                <P> <B>crlStore</B><BR>
235                  This is where the CRL (Certificate Revocation List) store resides. There is 
236                  only one CRL store for all truststores. Currently, only two truststores are 
237                  supported (cimserver and export) and these both share the same CRL store. It 
238                  is important to note that certificates are checked first against the CRL (if 
239                  specified) and then against the truststore. The <A Href="#CLI">ssltrustmgr CLI</A> 
240                  should be used for CRL management. 
241 h.sterling 1.1 <P>
242                <B>enableSSLExportClientVerification</B><BR>
243                This setting controls whether an ADDITIONAL port is used to listen for incoming indications.  This port is used only as a CIM indication listener
244                and only supports HTTPS.  The port number of the export connection is currently not configurable; the port is determined by looking
245 h.sterling 1.2 in /etc/services for the service name wbem-exp-https.
246 h.sterling 1.1 The export port is primarily used as a way to authenticate client indication requests.  Because indications are generated by providers
247                and do not have a username/password associated with them, traditional basic authentication cannot be sent in the export request.  To work
248                around this, a truststore can be configured to authenticate incoming requests.  This truststore is configured like the "required"
249                setting of sslClientVerificationMode.
250                <P>
251                <B>exportSSLTrustStore</B><BR>
252                This setting controls the truststore for the export connection.  It may be the same as the sslTrustStore.  Additionally, it can be
253                either a directory or a single root CA file.  When set to a directory, it is recommended that you use the <A HREF="#CLI">ssltrustmgr CLI</A>
254                to populate the truststore as there are strict naming requirements for trusted certificate files.  
255                
256                <H4>Configuration Limitations</H4>
257                
258                The following are configuration limitations:
259                
260                <UL>
261                <LI>The x509 server certificate file cannot be encrypted.  The reason for this is that there is currently no mechanism in Pegasus to grab the
262                	password needed to unencrypt it.  Therefore, the best way to secure the file is to follow the file permissions settings specified in <A HREF="#CERTS">Creating SSL Certificates.</A></LI>
263                <LI>There is no property to specify supported cipher lists at this time.  Pegasus uses the default OpenSSL cipher list.  The cipher lists can be found at
264                	<A HREF="http://www.openssl.org/docs/apps/ciphers.html#SSL_v3_0_cipher_suites_">http://www.openssl.org/docs/apps/ciphers.html#SSL_v3_0_cipher_suites_</A> and
265                	<A HREF="http://www.openssl.org/docs/apps/ciphers.html#TLS_v1_0_cipher_suites_">http://www.openssl.org/docs/apps/ciphers.html#TLS_v1_0_cipher_suites_</A></LI>
266                <LI>The verification depth cannot be specified.  Pegasus uses the default OpenSSL depth of 9.  This means the OpenSSL will only accept client
267 h.sterling 1.1 	certificate chains up to 9 levels deep.</LI>
268 h.sterling 1.2 <LI>No hostname checking is performed to ensure that the subject field of the distinguished name (DN) matches the hostname.</LI>
269 h.sterling 1.1 </UL>
270                
271                <H3><A NAME="DESIGN">SSL Design Question List</A></H3>
272                
273                <P>The following questions may be helpful in determining how to configure Pegasus CIM Server.</P>
274                
275                <B>Should I enable the HTTPS port?</B><BR>
276                Yes, especially if you are sending passwords with requests.  The HTTP port can be disabled for additional security if desired.
277                <BR>
278                <B>Should I enable the export port?</B><BR>
279                Currently, the export connection provides the only way to authenticate incoming CIM indication requests.  
280                Because basic authentication cannot be used with these requests, the export connection should be enabled if 
281                there is a concern over rogue client export requests.  Otherwise, the export requests can still be sent over 
282                HTTPS using the standard port; the information will be encrypted but the client's identity will not be validated.
283                <BR>
284                <B>Should I configure the CIMOM to use a truststore?</B><BR>
285                This depends on the infrastructure of the application.  If all clients are using basic authentication over the secure port
286                (and the passwords are secured), then a truststore may not be needed.  If an application does not want to store user/pw information,
287                then it is a good idea to use a certificate-based infrastructure.  If a CIMOM certificate is compromised, the cimserver and the providers
288                of the system are compromised.  The severity of this scenario is dependent on the resources the providers have access to. 
289                If an OS password is compromised, the entire system may be compromised.
290 h.sterling 1.1 If using peer verification, it is important to ensure that 1) the cimserver is properly configured to use a truststore,
291                2) the truststore is loaded properly and protected, and 3) authorization checks are performed after a certificate is verified.
292                These same conditions also apply to a client that is verifying a server.<BR>
293                
294                <B>Should I use a self-signed certificate or one issued by a third-party certificate authority?</B><BR>
295                Generally, scalability will determine whether it's appropriate to use a self-signed certificate or one issued by Verisign
296                or another third-party certificate authority.
297 h.sterling 1.2 If an administrator administrates their self-signed certificates correctly, they are 
298 h.sterling 1.1 no less secure than one issued by a CA. What a CA buys you is scalability. An up front cost of 
299                setting up a CA relationship will be offset by the convenience of having that 
300                CA &quot;vouch&quot; for certs it has signed, in large deployments. In small deployments 
301                the incremental cost might never outweigh the initial CA-setup cost. <BR>
302                One important thing to remember is that 
303                you should not use the same certificate for multiple CIMOMs. If using a self-signed 
304                certificate, a different one should be generated for each CIMOM, using some unique 
305                piece of data to make them different. That way, if one of the certificates is 
306                compromised, the other ones remain secure. <BR>
307                <B>Should the truststore be a single root CA file or a directory?</B><BR>
308                If you only anticipate connections from a narrowly defined set of clients, then a single root CA certificate file should be sufficient. 
309                Alternatively, multiple trusted certificates may be stored in PEM format inside of a single CA file.
310                If you anticipate getting requests from a heterogeneous set of clients, then it probably makes sense to use the directory option 
311                to allow flexibility in the future.  In the latter scenario, the same single root CA file can still be used with the additional step of using ssltrustmgr to register it.
312                It's important to note that when registering a root CA, only one user can be associated with ALL certificates under that CA.  Following the principle of
313                least privilege, it is not a good idea to register a root CA to a privileged user if lesser privileged users will be connecting with it.
314                <BR>
315                <B>How do I protect the keystore and the truststore?</B><BR>
316                The server's private key should always be protected; it is private for a reason. 
317                Only the system administrator should be able to see it. The public certificate 
318                can be viewed by anyone, however, it should be protected from alteration by system 
319 h.sterling 1.1 users. Similarly, any truststore or CRL file or directory should also be protected 
320                from alteration. See <A HREF="#CERTS">Creating SSL Certificates</A> for the recommended 
321                file privileges. <BR>
322                <B>When do I need to use a CRL?</B><BR>
323                Certificate Revocation Lists are regularly issued by CA's. They contain a list 
324                of certificates that have been revoked. Any application using a CA certificate 
325                in its truststore should also implement CRLs (if the CA supports them). Pegasus itself
326                does not check CRL validity dates during startup.  Therefore, it is the responsibility of the administrator
327                to regularly download or acquire the CRL and import it into the CRL store using the <A Href="#CLI">ssltrustmgr CLI</A>.
328                <BR>
329                If using self-signed certificates, however, a CRL is most likely not needed (You can create a self-signed CRL but it is not really
330                necessary).  Because of this, the certificate deletion option available via ssltrusmgr is primarily intended for self-signed certificates.
331                Technically, CRL's are the correct way to revoke compromised or invalid certificates.
332                <BR>
333                <B>What is the order of operations for certificate verification?</B><BR>
334                The certificate is checked against any CRLs first before going through the rest of the verification process.  Verification starts with the
335                root certificate and continues down to the peer certificate.  If verification fails at any of these points, the certificate is considered
336                untrusted and the verification process reports an error.
337                
338                
339                <H3><A NAME="TRUSTSTORE">Truststore Management</A></H3>
340 h.sterling 1.1 There are two directions of trust in an SSL client-server handshake: The client trusts the server.  The server trusts the client.  Pegasus
341                provides a way to implement one or both of these relationships.  Ideally, an application should support both levels of trust for maximum 
342                security and this is the implementation Pegasus recommends.  However, in some scenarios it may make sense to only implement one of these; 
343                in that case, it is possible to override the client or the server to "trust all certificates."  For example, if all clients will be using
344                basic authentication over HTTPS, then the server can be setup to "trust all client certificates."  
345                <p> To tell the cimserver to require that all clients be trusted, simply set the 
346                  sslClientVerification property to "required."<BR>
347                  To tell the cimserver to trust all clients, set the sslClientVerification property 
348                  to "disabled" or "optional".
349                
350                
351                <P>
352                The SSL verification in Pegasus is independent of any other authentication mechanism.  It can still be utilized when authentication is disabled.
353                When authentication is enabled, the first line of defense is SSL client verification.  
354                In situations where a client is not authenticated by SSL and the setting is "optional", the server will attempt to authenticate the client
355                via another method of authentication.  In this case, the authentication mechanism specified by the configuration property "httpAuthType" will be used
356                for remote connections and local authentication will be used for local connections.
357                
358                <P>
359                See the <A HREF="#CLIENT">Configuring the Pegasus CIM Client for SSL</A> section below on how to setup the client's truststore.
360                
361 h.sterling 1.1 <H3><A NAME="CLI">ssltrustmgr CLI</A></H3>
362                
363                Pegasus 2.5 comes with a new CLI, ssltrustmgr, that should be used to manage the cimserver's truststore, the export truststore, and the CRL store.
364                The CLI interfaces with a certificate control provider that runs as part of Pegasus's core.  It operates on the PG_SSLCertificate and PG_SSLCertificateRevocationList
365                classes in root/pg_internal.
366                It is recommended that this CLI be used in place of manual configuration for several reasons:
367                <UL>
368                <LI>OpenSSL places strict naming restrictions on certificates and CRLs in a directory (the files are looked up via a subject hash code)</LI>
369                <LI>Certificate instances are stored in the repository along with the corresponding username.  If the certificate is not properly registered,
370                	the username mapping will fail.</LI>
371                <LI>The CLI allows for dynamic deletion of certificates by resetting the SSL context.  Normally, you would need to stop and start
372                	the cimserver to accomplish this.</LI>
373                <LI>The CLI, or more correctly the provider it operates on, performs a ton of error checking you would not get by manually configuring
374                	the stores.  This alerts the administrator to various error conditions (e.g. the certificate expired) associated with a certificate or CRL.</LI>
375                </UL>
376                
377                The CIMOM must be up and running while executing ssltrustmgr.  The ssltrustmgr manpage provides more information on commands and syntax.
378                
379                
380                <H3><A NAME="CLIENT">Configuring the Pegasus CIM Client for SSL</A></H3>
381 h.sterling 1.2 <P> A Pegasus CIM client can be configured to use SSL by using a constructor that 
382 h.sterling 1.1   takes an SSLContext. The construction of the SSLContext is really what controls 
383                  the behavior of the client during the SSL handshake. Without going into minute 
384                  details about what happens under the covers, here is a description of the various 
385                  SSLContext constructor parameters. The descriptions are written from a client 
386                  perspective even though the same constructors are utilized by the cimserver 
387                  HTTPS port and export port. 
388 h.sterling 1.2 
389                <P>
390                  Here's a code snippet that shows how to call a client constructor that connects to a server over SSL and can present its own trusted certificate if
391                  the server requests it. In this scenario, the client also checks the server certificate against its truststore and specifies an additional
392                  callback in addition to the default one (the user-specified callback is optional and can be set to null).
393                <UL><FONT FACE="courier">
394                    client.connect(
395                        hostname,
396                        port,
397                        <B>SSLContext(trustStore, certPath, keyPath, verifyCert, randomFile),</B>
398                        username,
399                        password);
400                		</FONT>
401                </UL>
402                </P>
403                <P>
404                  Here's a code snippet that shows how to call a client constructor that connects to a server over SSL and does not possess its own trusted certificate.
405                  In this scenario, the client also checks the server certificate against its truststore.
406                <UL>
407                	<FONT FACE="courier">
408                    client.connect(
409 h.sterling 1.2         hostname,
410                        port,
411                        <B>SSLContext(trustStore, NULL, randomFile),</B>
412                        username
413                        password);
414                		</FONT>
415                </UL>
416                </P>
417 h.sterling 1.1 <UL>
418                <LI><B>trustStore</B> -- This specifies the truststore that the client uses to verify server certificates.  It can be String::EMPTY if no truststore exists. </LI>
419                
420                <LI><B>certPath</B> -- This specifies the x509 certificate of the client that will be sent during an SSL handshake.  Note that this certificate will
421                	only be sent if the server requests it.  If this option is specified, the keyPath parameter must also be specified.</LI>
422                
423                <LI><B>keyPath</B> -- This specifies the private key of the client.  If this option is specified, the certPath parameter must also be specified.</LI>
424                
425                <LI><B>crlPath</B> -- This specifies an optional CRL store path.  The client checks the CRL list first, before attempting any further authentication,
426                	including the user-specified callback.</LI>
427                
428                <LI><B>verifyCert</B> -- This is a user-specified verification callback.  If this is set to null, the default OpenSSL verification callback will
429                	be executed.  You can implement this method to "trust all servers" or to perform additional authentication checks that OpenSSL does not perform
430                	by default.</LI>
431                
432                <LI><B>randomFile</B> -- A file to seed the pseudo random number generator (PRNG).</LI>
433                
434                </UL>
435                
436                <P>Here are some general guidelines on implementing peer verification for the client:
437                <UL>
438 h.sterling 1.1 <LI>The client should enable peer verification by specifying a truststore and (optionally) a user-specified callback function.</LI>
439                <LI>The client should employ a truststore in order to properly verify the server.  The truststore should contain a file or directory of
440                	trusted CA certificates.  The ssltrustmgr CLI cannot be used to configure client truststores.  The trusted certificate(s) should be placed
441                	in a protected file or directory specified by the trustStore parameter.  Keep in mind that the SSL context generally has to be reloaded
442                	to pick up any truststore changes.</LI>
443 h.sterling 1.2 <LI>The client could also use a user-specified callback in addition to the default verification callback, if additional verifications are desired over the normal checks that OpenSSL performs. 
444                	In most cases, the default verification callback is sufficient for checking server certificates.</LI>
445 h.sterling 1.1 <LI>The client should ensure that adequate entropy is attained.</LI>
446                <LI>The client should use a CRL store if the truststore contains CA certificates that support one.</LI>
447                <LI>The client should only use the SSLv3 and TLSv1 protocols.  By default, Pegasus is not built with SSLv2 support.</LI>
448                
449                	    <li>The client should terform post-connection checks. </li>
450                    <ul>
451                      <li>Ensure a certificate was received.</li>
452                      <ul>
453                        <li>WARNING:&nbsp; In some implementations of SSL 
454                          a NULL server certificate is perfectly valid and authenticates against 
455                          all trust stores.&nbsp; If the client does not ensure a certificate 
456                          exists then the client is not providing server authentication and could 
457                          have a security bulletin class defect.</li>
458                      </ul>
459                      <li>Validate that the certificate received was issued to the 
460                        host for which the client was attempting to connect.</li>
461                      <ul>
462                        <li>Ensure that the common name (CN) in the server&#8217;s 
463                          certificate subject matches the host name of the server.&nbsp; For X509v3 
464                          certificates, the &#8220;<span class=SpellE>SubjectAltName</span>&#8221; 
465                          fields in the certificate's extended attributes are also valid host names 
466 h.sterling 1.1           for the certificate. </li>
467                        <li>WARNING:&nbsp; If the client does not ensure 
468                          the host name of the server is the same as one of the host names explicitly 
469                          described in the server&#8217;s certificate, you have not authenticated 
470                          the server&#8217;s identity.&nbsp; Any other server which was issued 
471                          a certificate from the same trusted CA can masquerade as the server 
472                          unless the client performs the host name check.</li>
473                      </ul>
474                      <li>Ensure that certificate verification methods/routines 
475                        return no errors.</li>
476                    </ul>
477                
478                
479                </UL>
480                
481                <P>
482                Because only the above arguments can be passed into the Pegasus SSLContext, there are some limitations in the client configuration:
483                <UL>
484                <LI>The verification depth cannot be specified.  Pegasus uses the default OpenSSL depth of 9.</LI>
485                <LI>The cipher list cannot be specified.  Pegasus uses the default OpenSSL cipher list.  The cipher lists can be found at
486                	<A HREF="http://www.openssl.org/docs/apps/ciphers.html#SSL_v3_0_cipher_suites_">http://www.openssl.org/docs/apps/ciphers.html#SSL_v3_0_cipher_suites_</A> and
487 h.sterling 1.1 	<A HREF="http://www.openssl.org/docs/apps/ciphers.html#TLS_v1_0_cipher_suites_">http://www.openssl.org/docs/apps/ciphers.html#TLS_v1_0_cipher_suites_</A></LI>
488 h.sterling 1.2 <LI>No hostname checking is performed to ensure that the subject field of the distinguished name (DN) matches the hostname.  If desired, a user-specified callback should be configured
489                	to perform this check or any additional checks relevant to the application.</LI>
490 h.sterling 1.1 </UL>
491                
492                
493                <H3><A NAME="AUTH">SSL Authorization</A></H3>
494                <P>The following paragraphs concern authorization of users authenticated by certificate on the cimserver's HTTPS port.
495                <P> It is important to note that SSL certificates are verified during the initial 
496                  handshake, BEFORE any further authentication takes place. If a certificate fails, 
497                  the connection can be terminated immediately, resulting in a connection exception. 
498                  This scenario will occur if the sslClientVerification property is set to "required" 
499                  and no certificate or an untrusted certificate is sent. The export connection 
500                  will also terminate the connection if an untrusted certificate is presented. 
501                  Once a certificate is verified, no further <I><B>authentication</B></I> is attempted. 
502                  This effectively results in any basic or local authentication headers being 
503                  ignored. 
504                <P>
505 h.sterling 1.2   Further <I><B>authorization</B></I> checks must be performed when validating 
506 h.sterling 1.1   the user that is mapped to the certificate. First, the user that is registered to the certificate
507                  is validated as a valid system user and a valid cimuser (if the cimuser function has been configured).
508                  Additionally, if Pegasus was configured to use PAM, the pam_acct_mgmt function will be called with the
509                  user that is mapped to the certificate.  This ensures that any login conditions that would have been placed
510                  on a user authenticated via basic authentication are still applied to a user authenticated via certificate.
511                  The pam_authenticate method will NOT be called.  Lastly, the providers must authorize the user.  They receive the
512                  username that was mapped to the certificate in the OperationContext.
513                  
514                <H3><A NAME="RESOURCES">Resources</A></H3>
515                
516                <P>
517                For OpenSSL information pick up a copy of O'Reilly's Network Security with OpenSSL or go to the OpenSSL Site:<BR>
518                <A HREF="http://www.openssl.org">http://www.openssl.org</A>
519                 
520                <P>
521                A really fabulous guide on certificate management and installation with OpenSSL:<BR>
522                <A HREF="http://www.gagravarr.org/writing/openssl-certs/index.shtml">http://www.gagravarr.org/writing/openssl-certs/index.shtml</A>
523                
524                <P>
525                x509 Certificate and CRL RFC:<BR>
526                <A HREF="http://www.ietf.org/rfc/rfc2459.txt?number=2459">http://www.ietf.org/rfc/rfc2459.txt?number=2459</A>
527 h.sterling 1.1 
528                <P>
529                SSLv3 RFC:<BR>
530                <A HREF="http://wp.netscape.com/eng/ssl3/">http://wp.netscape.com/eng/ssl3</A>
531                
532                <P>
533                TLSv1 RFC:<BR>
534                <A HREF="http://www.ietf.org/rfc/rfc2246.txt">http://www.ietf.org/rfc/rfc2246.txt</A>
535                
536                <P>
537                Basic Authentication RFC:<BR>
538                <A HREF="http://www.faqs.org/rfcs/rfc2617.html">http://www.faqs.org/rfcs/rfc2617.html</A>
539                
540                <hr>
541                
542                <p><i><font size="2">Copyright (c) 2005 EMC Corporation; Hewlett-Packard Development 
543                
544                  Company, L.P.; IBM Corp.; The Open Group; VERITAS Software Corporation</font><br>
545                
546                <br>
547                
548 h.sterling 1.1 <font size="1">Permission is hereby granted, free of charge, to any person 
549                
550                obtaining a copy&nbsp; of this software and associated documentation files (the 
551                
552                &quot;Software&quot;), to deal in the Software without restriction, including without 
553                
554                limitation the rights to use, copy, modify, merge, publish, distribute, 
555                
556                sublicense, and/or sell copies of the Software, and to permit persons to whom 
557                
558                the Software is furnished to do so, subject to the following conditions:</font><br>
559                
560                <font size="2"><br>
561                
562                </font>
563                
564                <font size="1">THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL 
565                
566                COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED&nbsp; 
567                &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 
568                
569 h.sterling 1.1 LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
570                
571                AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
572                
573                LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
574                
575                CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
576                
577                SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</font></i></p>
578                
579                <hr>
580                
581                </BODY>
582                </HTML>
583                
584                
585                
586                
587                
588                

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2