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

Diff for /pegasus/doc/PegasusSSLGuidelines.htm between version 1.1 and 1.4.4.1

version 1.1, 2005/08/14 14:12:09 version 1.4.4.1, 2006/11/23 06:22:36
Line 1 
Line 1 
 <HTML>  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <TITLE>OpenPegasus SSL Guidelines</TITLE>  <html xmlns:o>
           <head>
 <BODY>                  <title>OpenPegasus SSL Guidelines</title>
 <H2>OpenPegasus 2.5 SSL Guidelines</H2>          </head>
           <body>
 <UL>                  <h2>OpenPegasus 2.6 SSL Guidelines</h2>
         <LI><A HREF="#OVERVIEW">Overview</A>                  <p><b>Version:&nbsp;</b>1.1<br>
                           <b>Created:&nbsp;</b>July 20, 2005</p>
         <LI><A HREF="#RELATED">Related Information</A>                  <b>Updated:&nbsp;November</b> 23, 2006
         <LI><A HREF="#BUILDING">Building Pegasus with SSL</A>                  <p></p>
         <LI><A HREF="#CERTS">Creating SSL Certificates</A>                  <ul>
         <LI><A HREF="#CONFIGURE">Configuring Pegasus for SSL</A>                          <li>
         <LI><A HREF="#DESIGN">SSL Design Question List</A>                                  <a href="#OVERVIEW">Overview</a>
         <LI><A HREF="#TRUSTSTORE">Truststore Management</A>                          <li>
         <LI><A HREF="#CLI">ssltrustmgr CLI</A>                                  <a href="#RELATED">Related Information</a>
         <LI><A HREF="#CLIENT">Configuring the Pegasus CIM Client for SSL</A>                          <li>
         <LI><A HREF="#AUTH">SSL Authorization</A>                                  <a href="#BUILDING">Building Pegasus with SSL</a>
         <LI><A HREF="#RESOURCES">Resources</A>                          <li>
 </UL>                                  <a href="#CERTS">Creating SSL Certificates</a>
                           <li>
                                   <a href="#CONFIGURE">Configuring Pegasus for SSL</a>
 <H3><A NAME="OVERVIEW">Overview</A></H3>                          <li>
                                   <a href="#DESIGN">SSL Design Question List</a>
 <P>                          <li>
 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                                  <a href="#TRUSTSTORE">Truststore Management</a>
 infrastructure and configure the Pegasus CIM client.  This guide is intended to help developers and                          <li>
 administrators make the right decisions about how to use SSL for their particular application.  It is important to keep in mind                                  <a href="#CLI">cimtrust &amp; cimcrl CLI</a>
 that these are recommendations and may not be applicable to all scenarios.  This guide assumes a basic understanding of SSL and basic authentication.                          <li>
 For more information on these technologies, consult the sources in the <A HREF="#RESOURCES">Resources</A> section at the bottom.                                  <a href="#CLIENT">Configuring the Pegasus CIM Client for SSL</a>
 </P>                          <li>
                                   <a href="#AUTH">SSL Authorization</a>
 <H3><A NAME="RELATED">Related Information</A></H3>                          <li>
 A significant portion of the information in this document is taken from various PEP's.                                  <a href="#EXT">Critical Extension Handling</a>
 This document attempts to bring all of this information                          <li>
 together in a cohesive and simplified format.                                  <a href="#RESOURCES">Resources</a>
 <P>                          </li>
 <UL>                  </ul>
 <LI>PEP#035 - Add support for /dev/random in SSLContext</LI>                  <h3><a name="OVERVIEW">Overview</a></h3>
 <LI>PEP#060 - SSL support in CIM/XML indication delivery</LI>                  <p>
 <LI>PEP#074 - SSLContext and Certificate verification interface enhancement</LI>                          The following document serves as a guide on how to build and configure Pegasus
 <LI>PEP#155 - Support for Client SSL Certificate Verification in CIM Server for CIMExport requests</LI>                          for SSL support. It also discusses how to utilize a certificate-based
 <LI>PEP#165 - SSL Client Verification</LI>                          infrastructure and configure the Pegasus CIM client.
 <LI>PEP#187 - SSL Certificate Management Enhancements</LI>                  </p>
 <LI>PEP#200 - Recommended OpenPegasus 2.5 Build and Configuration Options for Selected Platforms</LI>                  <p>This guide requires a basic understanding of SSL, OpenSSL, and basic
 </UL>                          authentication. This guide is intended to help developers and administrators
 </P>                          make the right decisions about how to use SSL for their particular application.
                           It is not intended to be a primary source of education on SSL. If you are not
 <H3><A NAME="BUILDING">Building Pegasus with SSL</A></H3>                          familiar with these technologies, consult the sources in the <a href="#RESOURCES">Resources</a>
                           section at the bottom.
 <P> To build Pegasus with HTTPS support, you will need to build against the <A HREF="http://www.openssl.org">OpenSSL                  </p>
   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).                  <p></p>
   It has not been tested against major version 0.9.8, which came out in July 2005.                  <p>Note: In this document, the term "trust" refers only to authentication. It does
 Because this is an open source project, the SSL support has been tested with many versions of OpenSSL,                          not imply full trust in the traditional sense, because it does not take into
   but we cannot guarantee it has been tested with every version on every platform.                          account authorization checks. It remains the responsibility of providers and
         A list of recent OpenSSL releases can be found on the <A HREF="http://www.openssl.org/news">OpenSSL News page</A>.                          clients to perform authorization, and therefore establish real trust. Likewise,
 </P>                          the term "Trust Store" can be misleading since the "store" is only a source of
 <P>                          authentication credentials. Please bear this in mind when documenting
 After grabbing the OpenSSL source tarball, you need to set the following environment variables before building Pegasus:                          recommended deployments or building clients or providers.
 <UL>                  </p>
   <LI>PEGASUS_HAS_SSL=1</LI>                  <h3><a name="RELATED">Related Information</a></h3>
   <LI>OPENSSL_HOME=&lt;location of the SDK package&gt; This directory must contain                  A significant portion of the information in this document is taken from various
                   PEP's. This document attempts to bring all of this information together in a
                   cohesive and simplified format.
                   <p></p>
                   <ul>
                           <li>
                           PEP#035 - Add support for /dev/random in SSLContext
                           <li>
                           PEP#060 - SSL support in CIM/XML indication delivery
                           <li>
                           PEP#074 - SSLContext and Certificate verification interface enhancement
                           <li>
                           PEP#165 - SSL Client Verification
                           <li>
                           PEP#187 - SSL Certificate Management Enhancements
                           <li>
                                   PEP#200 - Recommended OpenPegasus 2.5 Build and Configuration Options for
                                   Selected Platforms</li>
                   </ul>
                   <p></p>
                   <h3><a name="BUILDING">Building Pegasus with SSL</a></h3>
                   <p>
                           To build Pegasus with HTTPS support, you will need to build against the <a href="http://www.openssl.org">
                                   OpenSSL package</a>. <font style="COLOR: rgb(0,0,0)" color="magenta">The SSL
                                   support outlined here has been tested against recent releases of the major
                                   versions 0.9.7X and 0.9.8X (most notably, 0.9.7d). Because some versions of
                                   0.9.6X do not contain full support for the security functions that Pegasus
                                   utilizes (for example, certificate-based authentication is not fully supported
                                   by some versions of 0.9.6X), Pegasus does not officially support major version
                                   0.9.6. See Bugzilla 4048 for more information. </font>Because this is an
                           open source project, the SSL support has been tested with many versions of
                           OpenSSL, but we cannot guarantee it has been tested with every version on every
                           platform. A list of recent OpenSSL releases, and important-to-review security
                           advisories and fixes, can be found on the <a href="http://www.openssl.org/news">OpenSSL
                                   News page</a>.
                   </p>
                   <p>
                           After grabbing the OpenSSL source tarball, you need to set the following
                           environment variables before building Pegasus:
                   </p>
                   <ul>
                           <li>
                           PEGASUS_HAS_SSL=1
                           <li>
                           OPENSSL_HOME=&lt;location of the SDK package&gt; This directory must contain
     the OpenSSL include directory, $(OPENSSL_HOME)/include, and the OpenSSL library     the OpenSSL include directory, $(OPENSSL_HOME)/include, and the OpenSSL library
     directory, $(OPENSSL_HOME)/lib.</LI>                          directory, $(OPENSSL_HOME)/lib.
   <LI>OPENSSL_BIN=&lt;location of the binary package&gt; This only needs to be                          <li>
     set if the OpenSSL binaries are not in $(OPENSSL_HOME)/bin.</LI>                                  OPENSSL_BIN=&lt;location of the binary package&gt; This only needs to be set if
 </UL>                                  the OpenSSL binaries are not in $(OPENSSL_HOME)/bin.</li>
                   </ul>
 Note that Pegasus supports SSLv3 and TLSv1 by default. It does NOT support SSLv2.                  Note that Pegasus supports SSLv3 and TLSv1 by default. It does NOT support
 To turn on SSLv2 support, enable the additional environment variable:                  SSLv2. To turn on SSLv2 support, enable the additional environment variable:
 <UL>                  <ul>
   <LI> PEGASUS_ENABLE_SSLV2=1 </LI>                          <li>
 </UL>                                  PEGASUS_ENABLE_SSLV2=1
 <P>                          </li>
 It is not recommended to enable this protocol, as there have been many security holes associated with it.  Unless you are dealing                  </ul>
 with very outdated clients, you probably do not need to enable it.                  <p>
 </P>                          It is not recommended to enable this protocol, as there have been many security
 <P>                          weaknesses associated with it. Unless you are dealing with very outdated
 After setting these variables, proceed as normal with the build instructions in the readme file.                          clients, you probably do not need to enable it.
 </P>                  </p>
                   <p>
 <H3><A NAME="CERTS">Creating SSL Certificates</A></H3>                          After setting these variables, proceed as normal with the build instructions in
                           the readme file.
                   </p>
                   <h3><a name="CERTS">Creating SSL Certificates</a></h3>
 There are two options for creating the CIMOM's certificate: There are two options for creating the CIMOM's certificate:
 <UL>                  <ul>
 <LI>Self-signed certificate</LI>                          <li>
 <LI>Certificate issued by a third-party certificate authority</LI>                          Self-signed certificate
 </UL>                          <li>
 <P>                                  Certificate issued by a third-party certificate authority</li>
 To generate a self-signed certificate, you must create a private key, a certificate signing request (CSR), and finally the public x509 certificate.                  </ul>
 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,                  <p>
 ssl.cnf in the root directory, or generate your own.  For a self-signed certificate, the subject                          To generate a self-signed certificate, you must create a private key, a
 is the same as the issuer.  Execute the following commands to create a self-signed certificate.                          certificate signing request (CSR), and finally the public x509 certificate. You
 The PEGASUS_ROOT and PEGASUS_HOME have to be set to your respective installation and source directory.                          also need an SSL configuration file that defines the parameters of the
                           Distinguished Name (DN). You can use the one that comes with Pegasus, ssl.cnf
                           in the root directory, or generate your own. For a self-signed certificate, the
 <pre                          subject is the same as the issuer. Execute the following commands to create a
                           self-signed certificate. The PEGASUS_ROOT and PEGASUS_HOME have to be set to
 style="font-style: italic; font-family: courier new,courier,monospace; margin-left: 40px;"><small>CN=&quot;Common Name&quot;                          your respective installation and source directory. You will also need an
                           OpenSSL configuration file. There is a sample configuration file that comes
 EMAIL=&quot;test@email.address&quot;                          with the OpenSSL package.
                   </p>
 HOSTNAME=`uname -n`                  <p></p>
                   <ul>
 sed -e &quot;s/$CN/$HOSTNAME/&quot; \                          <li>
                                   To generate a private key, execute the following:<br>
 -e &quot;s/$EMAIL/root@$HOSTNAME/&quot; $PEGASUS_ROOT/ssl.cnf \                                  <font color="#009900" face="courier">openssl genrsa -out myserver.key 1024</font><br>
                           Set the "sslKeyFilePath" configuration property to point to this key file.
 &gt; $PEGASUS_HOME/ssl.cnf                          <li>
                                   To generate a certificate signing request, execute the following:<br>
 chmod 644 $PEGASUS_HOME/ssl.cnf                                  <font color="#009900" face="courier">openssl req -config openssl.cnf -new -key
                                           myserver.key -out myserver.csr</font>
 chown bin $PEGASUS_HOME/ssl.cnf                          <li>
                                   At this point, the certificate signing request can be sent out to a third-party
 chgrp bin $PEGASUS_HOME/ssl.cnf                                  certificate authority for signing, or a self-signed certificate can be
                                   generated. To generate a self-signed certificate, execute the following:<br>
                                   <font color="#009900" face="courier">openssl x509 -in myserver.csr -out
                                           myserver.cert -req -signkey myserver.key -days 365</font><br>
 /usr/bin/openssl req -x509 -days 365 -newkey rsa:1024 \                                  Set the "sslCertificateFilePath" configuration property to point to this
                                   certificate file. The above CSR file can be discarded after the certificate is
 -nodes -config $PEGASUS_HOME/ssl.cnf \                                  created.
                           </li>
 -keyout $PEGASUS_HOME/key.pem -out $PEGASUS_HOME/cert.pem                  </ul>
                   <p>
                           After creating the keypair, make sure you protect the information sufficiently
                           by changing permissions on the files and/or directories. The following table
 cp $PEGASUS_HOME/cert.pem $PEGASUS_HOME/client.pem</small></pre>                          shows the recommended privileges:
                   </p>
                   <p>
 With the above command, key.pem is sslKeyFilePath. cert.pem is sslCertificateFilePath, and client.pem is the client's truststore file.                          <table border="1" cellspacing="1" width="30%">
                                   <tbody>
                                           <tr>
 <P>                                                  <th>
 To generate a CSR, execute the following command.  This CSR is generally what a third-party CA requires.  You submit the CSR to them and then they                                                          <b>SSL file</b></th>
 send you the signed certificate.                                                  <th>
 <pre                                                          <b>Pegasus Config property</b></th>
                                                   <th>
 style="font-style: italic; font-family: courier new,courier,monospace; margin-left: 40px;"><small>                                                          <b>Permissions</b></th>
 &gt;openssl req -newkey rsa:1024 -nodes -config $PEGASUS_HOME/ssl.cnf -keyout key.pem -out req.pem                                          </tr>
 </SMALL></PRE>                                          <tr>
 <P>                                                  <td>Private key</td>
                                                   <td>sslKeyFilePath</td>
                                                   <td>rwx------</td>
 After creating the keypair, make sure you protect the information sufficiently by changing permissions on the files and/or directories.                                          </tr>
 The following table shows the recommended privileges:                                          <tr>
 <P>                                                  <td>Public certificate</td>
                                                   <td>sslCertificateFilePath</td>
                                                   <td>rwxr-xr-x</td>
                                           </tr>
                                           <tr>
 <TABLE border="1" cellspacing="1" width="30%">                                                  <td>Truststore</td>
 <TBODY>                                                  <td>sslTrustStore</td>
 <TR><TH><B>SSL file</B></TH><TH><B>Pegasus Config property</B></TH><TH><B>Permissions</B></TH></TR>                                                  <td>rwxr-xr-x</td>
 <TR><TD>Private key</td><TD>sslKeyFilePath</TD><TD>rwx------</TD></TR>                                          </tr>
 <TR><TD>Public certificate</td><TD>sslCertificateFilePath</TD> <TD>rwxr-xr-x</TD></TR>                                          <tr>
 <TR><TD>Truststore</td><TD>sslTrustStore, exportSSLTruststore</TD> <TD>rwxr-xr-x</TD></TR>                                                  <td>CRL store
 <TR><TD>CRL store </td><TD>crlStore</TD> <TD>rwxr-xr-x</TD></TR>                                                  </td>
 </TBODY>                                                  <td>crlStore</td>
 </TABLE>                                                  <td>rwxr-xr-x</td>
 <P>                                          </tr>
 Pegasus only checks the following conditions when starting up.  The administrator is responsible for ensuring that the above file permissions                                  </tbody>
 are set correctly.  The administrator should also ensure that all containing directories all the way up to the base directory are not world-writeable.                          </table>
 <UL>                  </p>
 <LI>The sslKeyFilePath and the sslCertificateFilePath are readable by the CIMOM.</LI>                  <p>The administrator is responsible for ensuring that the above file permissions
 <LI>The sslTrustStore, exportSSLTrustStore, and crlStore are readable by the CIMOM if they are a single file.</LI>                          are set correctly. The administrator should also ensure that all containing
 <LI>The sslTrustStore, exportSSLTrustStore, and crlStore are readable and writable by the CIMOM if they are a directory.</LI>                          directories all the way up to the base directory are not world-writable.
 </UL>                          Pegasus only checks the following conditions when starting up:
 <P>                  </p>
 These same file permissions should be used for protecting a client's private key, public key, truststore, and crl store as well.                  <ul>
 <p>                          <li>
   For more information on generating keys and certificates, consult the <A HRef="http://www.openssl.org/docs/HOWTO/">OpenSSL                          The sslKeyFilePath and the sslCertificateFilePath are readable by the CIMOM.
   HOW-TO documentation</A>. </p>                          <li>
 <H3><A NAME="CONFIGURE">Configuring Pegasus for SSL</A></H3>                          The sslTrustStore and crlStore are readable by the CIMOM if they are a single
                           file.
 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                          <li>
 create a more secure environment.  More information on the default and recommended settings can be found in                                  The sslTrustStore and crlStore are readable and writable by the CIMOM if they
 PEP#200 Recommended OpenPegasus 2.5 Build and Configuration Options for Selected Platforms.  Additionally, the section on                                  are a directory.</li>
 <A HREF="#DESIGN">Design Question List</A> should help determine what these settings should be for a given application.                  </ul>
                   <p>
 <P>                          These same file permissions should be used for protecting a client's private
 <B>enableHttpsConnection</b><BR>                          key, public key, truststore, and crl store as well.
   This is enabled by default on most platforms.  It is recommended that                  </p>
   all remote communication be done over the HTTPS port. If you are sending cleartext                  <p>
   passwords over the wire, it is imperative that you only use the secure port.                          For more information on generating keys and certificates, consult the <a href="http://www.openssl.org/docs/HOWTO/">
   For added security, the HTTP port can be disabled to prevent clients from connecting                                  OpenSSL HOW-TO documentation</a>.
   to it.                  </p>
 <P>                  <h3><a name="CONFIGURE">Configuring Pegasus for SSL</a></h3>
 <B>httpsPort</B><BR>                  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 create a more secure environment. More information on the default and
                   recommended settings can be found in PEP#200 Recommended OpenPegasus 2.5 Build
                   and Configuration Options for Selected Platforms. Additionally, the section on <a href="#DESIGN">
                           Design Question List</a> should help determine what these settings should
                   be for a given application.
                   <p><b>enableHttpsConnection</b><br>
                           This is disabled by default on most platforms. It is recommended that all
                           remote communication be done over the HTTPS port. However, if you are sending
                           cleartext passwords over the wire, it is imperative that you only use the
                           secure port. For added security, the HTTP port can be disabled to prevent
                           clients from connecting to it. The HTTPS connection is enabled by default only
                           on the following platforms:
                   </p>
                   <p></p>
                   <ul>
                           <li>
                           LINUX
                           <li>
                           OS-400
                           <li>
                           HP_UX (if PEGASUS_USE_RELEASE_CONFIG_OPTIONS is true)
                           <li>
                                   VMS (if PEGASUS_USE_RELEASE_CONFIG_OPTIONS is true)</li>
                   </ul>
                   <p></p>
                   <p>
                           <b>httpsPort</b><br>
 The default setting is 5989, the official WBEM secure port. The default setting is 5989, the official WBEM secure port.
 <P> <B>sslCertificateFilePath</B> <BR>                  </p>
 This is the path to the x509 server certificate.                  <p>
 The server certificate may be a chain in which case the file should contain PEM encoded certificates beginning with the server certificate                          <b>sslCertificateFilePath</b>
 and followed by each signing certificate authority (CA) including the root CA.  If the server certificate is a self signed certificate,                          <br>
 the file only contains the self-signed certificate in PEM format.                          This is the path to the x509 server certificate. The server certificate may be
 The certificate cannot be encrypted because there is currently no mechanism for decrypting the certificate using a user-supplied password.                          a chain in which case the file should contain PEM encoded certificates
 This property must be defined if enableHttpsConnection is true.                          beginning with the server certificate and followed by each signing certificate
 Any failure in finding this file will result in the cimserver failing to start.                          authority (CA) including the root CA. If the server certificate is a self
 See <A HREF="#CERTS">Creating SSL Certificates</A> for more information.                          signed certificate, the file only contains the self-signed certificate in PEM
 <P>                          format. The certificate cannot be encrypted because there is currently no
 <B>sslKeyFilePath</B><BR>                          mechanism for decrypting the certificate using a user-supplied password. This
 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                          property must be defined if enableHttpsConnection is true. Any failure in
 enableHttpsConnection is true. Any failure in finding this file will result in the cimserver failing to start.                          finding this file will result in the cimserver failing to start. See <a href="#CERTS">
 See <A HREF="#CERTS">Creating SSL Certificate</A> for more information.                                  Creating SSL Certificates</a> for more information.
 <P>                  </p>
 <B>sslClientVerificationMode</b><BR>                  <p><b>sslKeyFilePath</b><br>
                           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 enableHttpsConnection is true. Any
                           failure in finding this file will result in the cimserver failing to start. See <a href="#CERTS">
                                   Creating SSL Certificate</a> for more information.
                   </p>
                   <p><b>sslClientVerificationMode</b><br>
   This setting controls how the cimserver (i.e. the HTTPS port) is configured.   This setting controls how the cimserver (i.e. the HTTPS port) is configured.
   It does not control the configuration of the export connection. There are three                          There are three possible settings: disabled, required, optional. There is no
   possible settings: disabled, required, optional. There is no "right" setting                          "right" setting for this property. The default is disabled and it is fine to
   for this property. The default is disabled and it is fine to  
   leave the setting as disabled if you are going to use basic authentication to   leave the setting as disabled if you are going to use basic authentication to
   authenticate all client requests. In many applications where a physical person   authenticate all client requests. In many applications where a physical person
   is there to supply a username and password, basic authentication is sufficient.   is there to supply a username and password, basic authentication is sufficient.
   Other                          Other environments may be heterogeneous, in which case it makes sense to allow
   environments may be heterogeneous, in which case it makes sense to allow both                          both basic authentication and SSL certificate verification. The setting of this
   basic authentication and SSL certificate verification. The setting of this variable                          variable also impacts what happens during the OpenSSL handshake:
   also impacts what happens during the OpenSSL handshake:                  </p>
 <UL>                  <ul>
 <LI><B>"required"</B> -- The server requires that the client certificate be trusted in order for the handshake to continue.                          <li>
         If the client fails to send a certificate or sends an untrusted certificate, the handshake is immediately terminated.</LI>                                  <b>"required"</b>
 <LI><B>"optional"</B> -- The server will request that a client certificate be sent, but will continue the handshake even if no certificate is                          -- The server requires that the client certificate be trusted in order for the
         received.  If authentication is enabled, the server will seek to authenticate the client via an alternative method of authentication.</LI>                          handshake to continue. If the client fails to send a certificate or sends an
 <LI><B>"disabled"</B> -- The server will not prompt the client for a certificate.  <I>This is the default.</I></LI>                          untrusted certificate, the handshake is immediately terminated.
 </UL>                          <li>
 Pegasus currently ties a certificate to a valid OS user.  Multiple certificates may be registered to the same user.  When a certificate is                                  <b>"optional"</b> -- The server will request that a client certificate be sent,
 authenticated, Pegasus views it in the same way as if a user was authenticated via basic authentication.  The providers                                  but will continue the handshake even if no certificate is received. If
 receive the username that the certificate was mapped to.  See the SSL Authorization section                                  authentication is enabled, the server will seek to authenticate the client via
 for more information.                                  an alternative method of authentication. <font style="COLOR: rgb(0,0,0)" color="magenta">
                                           As of 2.5.1, if a certificate is sent but it is not validated, the handshake
 <P>                                          will fail. <i>Before 2.5.1,the handshake would have continued and basic
 <B>sslTrustStore</B><BR>                                                  authentication would have proceeded.</i></font>
 This setting controls the truststore for the cimserver's HTTPS connection.  It can be                          <li>
 either a directory or a single root CA file.  When set to a directory, it is recommended that you use the ssltrustmgr CLI                                  <b>"disabled"</b> -- The server will not prompt the client for a certificate. <i>This
 to populate the truststore as there are strict naming requirements for trusted certificate files.  See the <A HREF="#CLI">ssltrustmgr CLI</A>                                          is the default.</i></li>
 section for further information.                  </ul>
 <P>                  Pegasus currently ties a certificate to a valid OS user. Multiple certificates
 <B>sslTrustStoreUserName</B><BR>                  may be registered to the same user. When a certificate is authenticated,
 This setting is only utilized if the sslTrustStore is a single CA file.  It is not used if the sslTrustStore setting is a directory,                  Pegasus views it in the same way as if a user was authenticated via basic
 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                  authentication. The providers receive the username that the certificate was
 setting.  This property represents the valid OS user that corresponds to the root certificate.  All requests authenticated with a certificate                  mapped to. See the SSL Authorization section for more information.
 under the root CA will be associated with this user and the username will be propagated to providers.  If applications desire for there to                  <p><b>sslTrustStore</b><br>
 be a one-to-one correspondence between users and certificates, it is recommended that each certificate be registered individually using the                          This setting controls the truststore for the cimserver's HTTPS connection. It
 <A HREF="#CLI">ssltrustmgr CLI</A>.                          can be either a directory or a single root CA file. When set to a directory, it
 <P> <B>crlStore</B><BR>                          is recommended that you use the cimtrust CLI to populate the truststore as
   This is where the CRL (Certificate Revocation List) store resides. There is                          there are strict naming requirements for trusted certificate files. See the <a href="#CLI">
   only one CRL store for all truststores. Currently, only two truststores are                                  cimtrust &amp; cimcrl CLI</a> section for further information.
   supported (cimserver and export) and these both share the same CRL store. It                  </p>
   is important to note that certificates are checked first against the CRL (if                  <p><b>sslTrustStoreUserName</b><br>
   specified) and then against the truststore. The <A Href="#CLI">ssltrustmgr CLI</A>                          This setting is only utilized if the sslTrustStore is a single CA file. It is
                           not used if the sslTrustStore setting is a directory, 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 setting. This property represents the valid
                           OS user that corresponds to the root certificate. All requests authenticated
                           with a certificate under the root CA will be associated with this user and the
                           username will be propagated to providers. If applications desire for there to
                           be a one-to-one correspondence between users and certificates, it is
                           recommended that each certificate be registered individually using the <a href="#CLI">
                                   cimtrust CLI</a>.
                   </p>
                   <p>
                           <b>crlStore</b><br>
                           This is where the CRL (Certificate Revocation List) store resides. It is
                           important to note that certificates are checked first against the CRL (if
                           specified) and then against the server truststore. The <a href="#CLI">cimcrl CLI</a>
   should be used for CRL management.   should be used for CRL management.
 <P>                  </p>
 <B>enableSSLExportClientVerification</B><BR>                  <h4>Configuration Limitations</h4>
 This setting controls whether an ADDITIONAL port is used to listen for incoming indications.  This port is used only as a CIM indication listener  
 and only supports HTTPS.  The port number of the export connection is currently not configurable; the port is determined by looking  
 in /etc/services for the service name wbem-exp-https.  The default value of this port is 5990.  
   
 The export port is primarily used as a way to authenticate client indication requests.  Because indications are generated by providers  
 and do not have a username/password associated with them, traditional basic authentication cannot be sent in the export request.  To work  
 around this, a truststore can be configured to authenticate incoming requests.  This truststore is configured like the "required"  
 setting of sslClientVerificationMode.  
 <P>  
 <B>exportSSLTrustStore</B><BR>  
 This setting controls the truststore for the export connection.  It may be the same as the sslTrustStore.  Additionally, it can be  
 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>  
 to populate the truststore as there are strict naming requirements for trusted certificate files.  
   
 <H4>Configuration Limitations</H4>  
   
 The following are configuration limitations: The following are configuration limitations:
                   <ul>
 <UL>                          <li>
 <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                                  The x509 server certificate file cannot be encrypted. The reason for this is
         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>                                  that there is currently no mechanism in Pegasus to grab the password needed to
 <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                                  unencrypt it. Therefore, the best way to secure the file is to follow the file
         <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                                  permissions settings specified in <a href="#CERTS">Creating SSL Certificates.</a>
         <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>                          <li>
 <LI>The verification depth cannot be specified.  Pegasus uses the default OpenSSL depth of 9.  This means the OpenSSL will only accept client                                  There is no property to specify supported cipher lists at this time. Pegasus
         certificate chains up to 9 levels deep.</LI>                                  uses the default OpenSSL cipher list. The cipher lists can be found at <a href="http://www.openssl.org/docs/apps/ciphers.html#SSL_v3_0_cipher_suites_">
 </UL>                                          http://www.openssl.org/docs/apps/ciphers.html#SSL_v3_0_cipher_suites_</a> and
                                   <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>
 <H3><A NAME="DESIGN">SSL Design Question List</A></H3>                          <li>
                           The verification depth cannot be specified. Pegasus uses the default OpenSSL
 <P>The following questions may be helpful in determining how to configure Pegasus CIM Server.</P>                          depth of 9. This means the OpenSSL will only accept client certificate chains
                           up to 9 levels deep.
 <B>Should I enable the HTTPS port?</B><BR>                          <li>
 Yes, especially if you are sending passwords with requests.  The HTTP port can be disabled for additional security if desired.                                  No hostname checking is performed to ensure that the subject field of the
 <BR>                                  distinguished name (DN) matches the hostname.</li>
 <B>Should I enable the export port?</B><BR>                  </ul>
 Currently, the export connection provides the only way to authenticate incoming CIM indication requests.                  <h3><a name="DESIGN">SSL Design Question List</a></h3>
 Because basic authentication cannot be used with these requests, the export connection should be enabled if                  <p>The following questions may be helpful in determining how to configure Pegasus
 there is a concern over rogue client export requests.  Otherwise, the export requests can still be sent over                          CIM Server.</p>
 HTTPS using the standard port; the information will be encrypted but the client's identity will not be validated.                  <b>Should I enable the HTTPS port?</b><br>
 <BR>                  Yes, especially if you are sending passwords with requests. The HTTP port can
 <B>Should I configure the CIMOM to use a truststore?</B><BR>                  be disabled for additional security if desired.
 This depends on the infrastructure of the application.  If all clients are using basic authentication over the secure port                  <br>
 (and the passwords are secured), then a truststore may not be needed.  If an application does not want to store user/pw information,                  <b>Should I configure the CIMOM to use a truststore?</b><br>
 then it is a good idea to use a certificate-based infrastructure.  If a CIMOM certificate is compromised, the cimserver and the providers                  This depends on the infrastructure of the application. If all clients are using
 of the system are compromised.  The severity of this scenario is dependent on the resources the providers have access to.                  basic authentication over the secure port (and the passwords are secured), then
 If an OS password is compromised, the entire system may be compromised.                  a truststore may not be needed. If an application does not want to store
 If using peer verification, it is important to ensure that 1) the cimserver is properly configured to use a truststore,                  user/pw information, then it is a good idea to use a certificate-based
 2) the truststore is loaded properly and protected, and 3) authorization checks are performed after a certificate is verified.                  infrastructure. If a CIMOM certificate is compromised, the cimserver and the
 These same conditions also apply to a client that is verifying a server.<BR>                  providers of the system are compromised. The severity of this scenario is
                   dependent on the resources the providers have access to. If an OS password is
 <B>Should I use a self-signed certificate or one issued by a third-party certificate authority?</B><BR>                  compromised, the entire system may be compromised. If using peer verification,
 Generally, scalability will determine whether it's appropriate to use a self-signed certificate or one issued by Verisign                  it is important to ensure that 1) the cimserver is properly configured to use a
 or another third-party certificate authority.                  truststore, 2) the truststore is loaded properly and protected, and 3)
 If an administrator administrates their self-singed certificates correctly, they are                  authorization checks are performed after a certificate is verified. These same
 no less secure than one issued by a CA. What a CA buys you is scalability. An up front cost of                  conditions also apply to a client that is verifying a server.<br>
 setting up a CA relationship will be offset by the convenience of having that                  <b>Should I use a self-signed certificate or one issued by a third-party
 CA &quot;vouch&quot; for certs it has signed, in large deployments. In small deployments                          certificate authority?</b><br>
 the incremental cost might never outweigh the initial CA-setup cost. <BR>                  Generally, scalability will determine whether it's appropriate to use a
 One important thing to remember is that                  self-signed certificate or one issued by Verisign or another third-party
 you should not use the same certificate for multiple CIMOMs. If using a self-signed                  certificate authority. If an administrator administrates their self-signed
 certificate, a different one should be generated for each CIMOM, using some unique                  certificates correctly, they are no less secure than one issued by a CA. What a
 piece of data to make them different. That way, if one of the certificates is                  CA buys you is scalability. An up front cost of setting up a CA relationship
 compromised, the other ones remain secure. <BR>                  will be offset by the convenience of having that CA "vouch" for certs it has
 <B>Should the truststore be a single root CA file or a directory?</B><BR>                  signed, in large deployments. In small deployments the incremental cost might
 If you only anticipate connections from a narrowly defined set of clients, then a single root CA certificate file should be sufficient.                  never outweigh the initial CA-setup cost.
 Alternatively, multiple trusted certificates may be stored in PEM format inside of a single CA file.                  <br>
 If you anticipate getting requests from a heterogeneous set of clients, then it probably makes sense to use the directory option                  One important thing to remember is that you should not use the same certificate
 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.                  for multiple CIMOMs. If using a self-signed certificate, a different one should
 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                  be generated for each CIMOM, using some unique piece of data to make them
 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.                  different. That way, if one of the certificates is compromised, the other ones
 <BR>                  remain secure.
 <B>How do I protect the keystore and the truststore?</B><BR>                  <br>
 The server's private key should always be protected; it is private for a reason.                  <b>Should the truststore be a single root CA file or a directory?</b><br>
 Only the system administrator should be able to see it. The public certificate                  If you only anticipate connections from a narrowly defined set of clients, then
 can be viewed by anyone, however, it should be protected from alteration by system                  a single root CA certificate file should be sufficient. Alternatively, multiple
 users. Similarly, any truststore or CRL file or directory should also be protected                  trusted certificates may be stored in PEM format inside of a single CA file. If
 from alteration. See <A HREF="#CERTS">Creating SSL Certificates</A> for the recommended                  you anticipate getting requests from a heterogeneous set of clients, then it
 file privileges. <BR>                  probably makes sense to use the directory option to allow flexibility in the
 <B>When do I need to use a CRL?</B><BR>                  future. In the latter scenario, the same single root CA file can still be used
                   with the additional step of using cimtrust to register it. 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 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.
                   <br>
                   <b>How do I protect the keystore and the truststore?</b><br>
                   The server's private key should always be protected; it is private for a
                   reason. Only the system administrator should be able to see it. The public
                   certificate can be viewed by anyone, however, it should be protected from
                   alteration by system users. Similarly, any truststore or CRL file or directory
                   should also be protected from alteration. See <a href="#CERTS">Creating SSL
                           Certificates</a> for the recommended file privileges.
                   <br>
                   <b>When do I need to use a CRL?</b><br>
 Certificate Revocation Lists are regularly issued by CA's. They contain a list Certificate Revocation Lists are regularly issued by CA's. They contain a list
 of certificates that have been revoked. Any application using a CA certificate of certificates that have been revoked. Any application using a CA certificate
 in its truststore should also implement CRLs (if the CA supports them). Pegasus itself                  in its truststore should also implement CRLs (if the CA supports them). Pegasus
 does not check CRL validity dates during startup.  Therefore, it is the responsibility of the administrator                  itself does not check CRL validity dates during startup. Therefore, it is the
 to regularly download or acquire the CRL and import it into the CRL store using the <A Href="#CLI">ssltrustmgr CLI</A>.                  responsibility of the administrator to regularly download or acquire the CRL
 <BR>                  and import it into the CRL store using the <a href="#CLI">cimcrl CLI</a>. <font style="COLOR: rgb(0,0,0)" color="magenta">
 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                          CRLs are not checked for expiration during the SSL callback. This means that if
 necessary).  Because of this, the certificate deletion option available via ssltrusmgr is primarily intended for self-signed certificates.                          a CRL for a particular issuer has expired, Pegasus still accepts certificates
 Technically, CRL's are the correct way to revoke compromised or invalid certificates.                          from the issuer and uses the expired CRL as the latest. Again, it is the
 <BR>                          responsibility of the administrator to ensure the CRL is up to date. CRLs are
 <B>What is the order of operations for certificate verification?</B><BR>                          not checked for critical extensions during CRL verification. If a CRL contains
 The certificate is checked against any CRLs first before going through the rest of the verification process.  Verification starts with the                          a critical extension it will be ignored. </font>
 root certificate and continues down to the peer certificate.  If verification fails at any of these points, the certificate is considered                  <br>
 untrusted and the verification process reports an error.                  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 necessary). Because of
                   this, the certificate deletion option available via cimtrust is primarily
 <H3><A NAME="TRUSTSTORE">Truststore Management</A></H3>                  intended for self-signed certificates. Technically, CRL's are the correct way
 There are two directions of trust in an SSL client-server handshake: The client trusts the server.  The server trusts the client.  Pegasus                  to revoke compromised or invalid certificates.
 provides a way to implement one or both of these relationships.  Ideally, an application should support both levels of trust for maximum                  <br>
 security and this is the implementation Pegasus recommends.  However, in some scenarios it may make sense to only implement one of these;                  <b>What is the order of operations for certificate verification?</b><br>
 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                  The certificate is checked against any CRLs first before going through the rest
 basic authentication over HTTPS, then the server can be setup to "trust all client certificates."                  of the verification process. Verification starts with the root certificate and
 <p> To tell the cimserver to require that all clients be trusted, simply set the                  continues down to the peer certificate. If verification fails at any of these
   sslClientVerification property to "required."<BR>                  points, the certificate is considered untrusted and the verification process
   To tell the cimserver to trust all clients, set the sslClientVerification property                  reports an error.
   to "disabled" or "optional".                  <h3><a name="TRUSTSTORE">Truststore Management</a></h3>
                   There are two directions of trust in an SSL client-server handshake: The client
                   trusts the server. The server trusts the client. Pegasus provides a way to
 <P>                  implement one or both of these relationships. Ideally, an application should
 The SSL verification in Pegasus is independent of any other authentication mechanism.  It can still be utilized when authentication is disabled.                  support both levels of trust for maximum security and this is the
 When authentication is enabled, the first line of defense is SSL client verification.                  implementation Pegasus recommends. However, in some scenarios it may make sense
 In situations where a client is not authenticated by SSL and the setting is "optional", the server will attempt to authenticate the client                  to only implement one of these; in that case, it is possible to override the
 via another method of authentication.  In this case, the authentication mechanism specified by the configuration property "httpAuthType" will be used                  client or the server to "trust all certificates." For example, if all clients
 for remote connections and local authentication will be used for local connections.                  will be using basic authentication over HTTPS, then the server can be setup to
                   "trust all client certificates."
 <P>                  <p>
 See the <A HREF="#CLIENT">Configuring the Pegasus CIM Client for SSL</A> section below on how to setup the client's truststore.                          To tell the cimserver to require that all clients be trusted, simply set the
                           sslClientVerification<font style="COLOR: rgb(0,0,0)" color="magenta">Mode</font>
 <H3><A NAME="CLI">ssltrustmgr CLI</A></H3>                          property to "required."<br>
                           To tell the cimserver to trust all clients, set the sslClientVerification<font style="COLOR: rgb(0,0,0)" color="magenta">Mode</font>
 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.                          property to "disabled" or "optional".
 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                  </p>
 classes in root/pg_internal.                  <p>The SSL verification in Pegasus is independent of any other authentication
 It is recommended that this CLI be used in place of manual configuration for several reasons:                          mechanism. It can still be utilized when authentication is disabled. When
 <UL>                          authentication is enabled, the first line of defense is SSL client
 <LI>OpenSSL places strict naming restrictions on certificates and CRLs in a directory (the files are looked up via a subject hash code)</LI>                          verification. <font style="COLOR: rgb(0,0,0)" color="magenta">In situations where a
 <LI>Certificate instances are stored in the repository along with the corresponding username.  If the certificate is not properly registered,                                  client is not authenticated by SSL because the client sent no certificate and
         the username mapping will fail.</LI>                                  the setting is "optional", the server will attempt to authenticate the client
 <LI>The CLI allows for dynamic deletion of certificates by resetting the SSL context.  Normally, you would need to stop and start                                  via another method of authentication . In this case, the authentication
         the cimserver to accomplish this.</LI>                                  mechanism specified by the configuration property "httpAuthType" will be used
 <LI>The CLI, or more correctly the provider it operates on, performs a ton of error checking you would not get by manually configuring                                  for remote connections and local authentication will be used for local
         the stores.  This alerts the administrator to various error conditions (e.g. the certificate expired) associated with a certificate or CRL.</LI>                                  connections. In situations where a client is not authenticated by SSL because
 </UL>                                  the client certificate was invalid, the handshake will be terminated.
                                   <br>
 The CIMOM must be up and running while executing ssltrustmgr.  The ssltrustmgr manpage provides more information on commands and syntax.                                  <i>Note: Before 2.5.1, in the latter case, authentication would have proceeded in
                                           the same way as if the client had sent no certificate. To enable the legacy
                                           behavior, the compile-time flag PEGASUS_OVERRIDE_SSL_CERT_VERIFICATION_RESULT
 <H3><A NAME="CLIENT">Configuring the Pegasus CIM Client for SSL</A></H3>                                          should be defined.</i> </font>
 <P> The Pegasus CIM client can be configured for SSL by using a constructor that                  </p>
                   <p>See the <a href="#CLIENT">Configuring the Pegasus CIM Client for SSL</a> section
                           below on how to setup the client's truststore.
                   </p>
                   <h3><a name="CLI">cimtrust &amp; cimcrl CLI</a></h3>
                   cimtrust CLI may be used to add, remove or list X509 certificates in a PEM
                   format truststore. cimcrl CLI may be used to add, remove or list X509
                   Certificate Revocation Lists in a PEM format CRL store. The CLIs interface with
                   a Certificate control provider that runs as part of Pegasus's core. It operates
                   on the PG_SSLCertificate and PG_SSLCertificateRevocationList classes in
                   root/PG_Internal. It is recommended that the CLIs be used in place of manual
                   configuration for several reasons:
                   <ul>
                           <li>
                           OpenSSL places strict naming restrictions on certificates and CRLs in a
                           directory (the files are looked up via a subject hash code)
                           <li>
                                   Certificate instances are stored in the repository along with the corresponding
                                   username. If the certificate is not properly registered, the username mapping
                                   will fail.<font color="magenta">
                                           <span style="COLOR: rgb(0,0,0)">cimtrust CLI supports the
   ability to register a certificate without a username for root
   certificates and intermediate certificates, since these certificates
   represent a collection of users. In this scenario, each leaf
   certificate must be registered to an individual user. See the
   Authorization section for more information on username validation.</span></font>
                           <li>
                                   <font color="magenta">
                                           <span style="COLOR: rgb(0,0,0)">The CLIs,
   or more correctly the provider they operate on, supports dynamic
   deletion of certificates by resetting the cimserver's SSL context.</span>
                                   </font>
                           Normally, you would need to stop and start the cimserver to accomplish this.
                           <li>
                                   The CLIs, or more correctly the provider they operate on, performs a ton of
                                   error checking you would not get by manually configuring the stores. This
                                   alerts the administrator to various error conditions (e.g. the certificate
                                   expired) associated with a certificate or CRL.</li>
                   </ul>
                   The CIMOM must be up and running while executing cimtrust/cimcrl CLI. The
                   cimtrust and cimcrl manpages provide more information on commands and syntax.
                   <h3><a name="CLIENT">Configuring the Pegasus CIM Client for SSL</a></h3>
                   <p>
                           A Pegasus CIM client can be configured to use SSL by using a constructor that
   takes an SSLContext. The construction of the SSLContext is really what controls   takes an SSLContext. The construction of the SSLContext is really what controls
   the behavior of the client during the SSL handshake. Without going into minute   the behavior of the client during the SSL handshake. Without going into minute
   details about what happens under the covers, here is a description of the various                          details about what happens under the covers, here is a description of the
   SSLContext constructor parameters. The descriptions are written from a client                          various SSLContext constructor parameters.
   perspective even though the same constructors are utilized by the cimserver                  </p>
   HTTPS port and export port.                  <p>
 <UL>                          Here's a code snippet that shows how to call a client constructor that connects
 <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>                          to a server over SSL and can present its own trusted certificate if the server
                           requests it. In this scenario, the client also checks the server certificate
 <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                          against its truststore and specifies an additional callback in addition to the
         only be sent if the server requests it.  If this option is specified, the keyPath parameter must also be specified.</LI>                          default one (the user-specified callback is optional and can be set to null).
                   </p>
 <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>                  <ul>
                           <font face="courier">client.connect( hostname, port, <b>SSLContext(trustStore,
 <LI><B>crlPath</B> -- This specifies an optional CRL store path.  The client checks the CRL list first, before attempting any further authentication,                                          certPath, keyPath, verifyCert, randomFile),</b> username, password); </font>
         including the user-specified callback.</LI>                  </ul>
                   <p></p>
 <LI><B>verifyCert</B> -- This is a user-specified verification callback.  If this is set to null, the default OpenSSL verification callback will                  <p>
         be executed.  You can implement this method to "trust all servers" or to perform additional authentication checks that OpenSSL does not perform                          Here's a code snippet that shows how to call a client constructor that connects
         by default.</LI>                          to a server over SSL and does not possess its own trusted certificate. In this
                           scenario, the client also checks the server certificate against its truststore.
 <LI><B>randomFile</B> -- A file to seed the pseudo random number generator (PRNG).</LI>                  </p>
                   <ul>
 </UL>                          <font face="courier">client.connect( hostname, port, <b>SSLContext(trustStore, NULL,
                                           randomFile),</b> username password); </font>
 <P>Here are some general guidelines on implementing peer verification for the client:                  </ul>
 <UL>                  <p></p>
 <LI>The client should enable peer verification by specifying a truststore and (optionally) a user-specified callback function.</LI>                  <ul>
 <LI>The client should employ a truststore in order to properly verify the server.  The truststore should contain a file or directory of                          <li>
         trusted CA certificates.  The ssltrustmgr CLI cannot be used to configure client truststores.  The trusted certificate(s) should be placed                                  <b>trustStore</b>
         in a protected file or directory specified by the trustStore parameter.  Keep in mind that the SSL context generally has to be reloaded                          -- This specifies the truststore that the client uses to verify server
         to pick up any truststore changes.</LI>                          certificates. It can be String::EMPTY if no truststore exists.
 <LI>The client should use a user-specified callback in addition to the default if there are additional error conditions the client wants to check.                          <li>
         In most cases, the default verification callback is sufficient for checking untrusted certificates.</LI>                                  <b>certPath</b>
 <LI>The client should ensure that adequate entropy is attained.</LI>                          -- This specifies the x509 certificate of the client that will be sent during
 <LI>The client should use a CRL store if the truststore contains CA certificates that support one.</LI>                          an SSL handshake. Note that this certificate will only be sent if the server
 <LI>The client should only use the SSLv3 and TLSv1 protocols.  By default, Pegasus is not built with SSLv2 support.</LI>                          requests it. If this option is specified, the keyPath parameter must also be
                           specified.
             <li>The client should terform post-connection checks. </li>                          <li>
     <ul>                                  <b>keyPath</b>
       <li>Ensure a certificate was received.</li>                          -- This specifies the private key of the client. If this option is specified,
       <ul>                          the certPath parameter must also be specified.
         <li>WARNING:&nbsp; In some implementations of SSL                          <li>
           a NULL server certificate is perfectly valid and authenticates against                                  <b>crlPath</b>
           all trust stores.&nbsp; If the client does not ensure a certificate                          -- This specifies an optional CRL store path. The client checks the CRL list
           exists then the client is not providing server authentication and could                          first, before attempting any further authentication, including the
           have a security bulletin class defect.</li>                          user-specified callback.
       </ul>                          <li>
       <li>Validate that the certificate received was issued to the                                  <b>verifyCert</b>
         host for which the client was attempting to connect.</li>                          -- This is a user-specified verification callback. If this is set to null, the
       <ul>                          default OpenSSL verification callback will be executed. You can implement this
         <li>Ensure that the common name (CN) in the server&#8217;s                          method to "trust all servers" or to perform additional authentication checks
           certificate subject matches the host name of the server.&nbsp; For X509v3                          that OpenSSL does not perform by default.
           certificates, the &#8220;<span class=SpellE>SubjectAltName</span>&#8221;                          <li>
           fields in the certificate's extended attributes are also valid host names                                  <b>randomFile</b> -- A file to seed the pseudo random number generator (PRNG).</li>
           for the certificate. </li>                  </ul>
         <li>WARNING:&nbsp; If the client does not ensure                  <p>Here are some general guidelines on implementing peer verification for the
           the host name of the server is the same as one of the host names explicitly                          client:
           described in the server&#8217;s certificate, you have not authenticated                  </p>
           the server&#8217;s identity.&nbsp; Any other server which was issued                  <ul>
           a certificate from the same trusted CA can masquerade as the server                          <li>
                           The client should enable peer verification by specifying a truststore and
                           (optionally) a user-specified callback function.
                           <li>
                           The client should employ a truststore in order to properly verify the server.
                           The truststore should contain a file or directory of trusted CA certificates.
                           The cimtrust CLI cannot be used to configure client truststores. The trusted
                           certificate(s) should be placed in a protected file or directory specified by
                           the trustStore parameter. Keep in mind that the SSL context generally has to be
                           reloaded to pick up any truststore changes.
                           <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. In most cases, the default verification callback
                           is sufficient for checking server certificates.
                           <li>
                           The client should ensure that adequate entropy is attained.
                           <li>
                           The client should use a CRL store if the truststore contains CA certificates
                           that support one.
                           <li>
                           The client should only use the SSLv3 and TLSv1 protocols. By default, Pegasus
                           is not built with SSLv2 support.
                           <li>
                                   The client should perform post-connection checks.
                                   <ul>
                                           <li>
                                                   Ensure a certificate was received.
                                                   <ul>
                                                           <li>
                                                                   WARNING:&nbsp; In some implementations of SSL a NULL server certificate is
                                                                   perfectly valid and authenticates against all trust stores.&nbsp; If the client
                                                                   does not ensure a certificate exists then the client is not providing server
                                                                   authentication and could have a security bulletin class defect.</li>
                                                   </ul>
                                           <li>
                                                   Validate that the certificate received was issued to the host for which the
                                                   client was attempting to connect.
                                                   <ul>
                                                           <li>
                                                                   Ensure that the common name (CN) in the server’s certificate subject matches
                                                                   the host name of the server.&nbsp; For X509v3 certificates, the “<span class="SpellE">SubjectAltName</span>”
                                                           fields in the certificate's extended attributes are also valid host names for
                                                           the certificate.
                                                           <li>
                                                                   WARNING:&nbsp; If the client does not ensure the host name of the server is the
                                                                   same as one of the host names explicitly described in the server’s certificate,
                                                                   you have not authenticated the server’s identity.&nbsp; Any other server which
                                                                   was issued a certificate from the same trusted CA can masquerade as the server
           unless the client performs the host name check.</li>           unless the client performs the host name check.</li>
       </ul>       </ul>
       <li>Ensure that certificate verification methods/routines                                          <li>
         return no errors.</li>                                                  Ensure that certificate verification methods/routines return no errors.</li>
     </ul>     </ul>
                           </li>
                   </ul>
 </UL>                  <p>
                           Because only the above arguments can be passed into the Pegasus SSLContext,
 <P>                          there are some limitations in the client configuration:
 Because only the above arguments can be passed into the Pegasus SSLContext, there are some limitations in the client configuration:                  </p>
 <UL>                  <ul>
 <LI>The verification depth cannot be specified.  Pegasus uses the default OpenSSL depth of 9.</LI>                          <li>
 <LI>The cipher list cannot be specified.  Pegasus uses the default OpenSSL cipher list.  The cipher lists can be found at                          The verification depth cannot be specified. Pegasus uses the default OpenSSL
         <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                          depth of 9.
         <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>                          <li>
 </UL>                                  The cipher list cannot be specified. Pegasus uses the default OpenSSL cipher
                                   list. The cipher lists can be found at <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
 <H3><A NAME="AUTH">SSL Authorization</A></H3>                                  <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>
 <P>The following paragraphs concern authorization of users authenticated by certificate on the cimserver's HTTPS port.                          <li>
 <P> It is important to note that SSL certificates are verified during the initial                                  No hostname checking is performed to ensure that the subject field of the
   handshake, BEFORE any further authentication takes place. If a certificate fails,                                  distinguished name (DN) matches the hostname. If desired, a user-specified
   the connection can be terminated immediately, resulting in a connection exception.                                  callback should be configured to perform this check or any additional checks
   This scenario will occur if the sslClientVerification property is set to "required"                                  relevant to the application.</li>
   and no certificate or an untrusted certificate is sent. The export connection                  </ul>
   will also terminate the connection if an untrusted certificate is presented.                  <h3><a name="AUTH">SSL Authorization</a></h3>
   Once a certificate is verified, no further <I><B>authentication</B></I> is attempted.                  <p>The following paragraphs concern authorization of users authenticated by
   This effectively results in any basic or local authentication headers being                          certificate on the cimserver's HTTPS port.
   ignored.                  </p>
 <P>                  <p>
   Further <I><B>authorization</B></I> checks may be performed when validating                          It is important to note that SSL certificates are verified during the initial
   the user that is mapped to the certificate. First, the user that is registered to the certificate                          handshake, BEFORE any further authentication takes place. If a certificate
   is validated as a valid system user and a valid cimuser (if the cimuser function has been configured).                          fails, the connection can be terminated immediately, resulting in a connection
   Additionally, if Pegasus was configured to use PAM, the pam_acct_mgmt function will be called with the                          exception. This scenario will occur if the sslClientVerification property is
   user that is mapped to the certificate.  This ensures that any login conditions that would have been placed                          set to "required" and no certificate or an untrusted certificate is sent.
   on a user authenticated via basic authentication are still applied to a user authenticated via certificate.                  </p>
   The pam_authenticate method will NOT be called.  Lastly, the providers must authorize the user.  They receive the                  <p>
   username that was mapped to the certificate in the OperationContext.                          Further <i><b>authorization</b></i> checks must be performed when validating
                           the user that is mapped to the certificate. First, the user that is registered
 <H3><A NAME="RESOURCES">Resources</A></H3>                          to the certificate is validated as a valid system user and a valid cimuser (if
                           the cimuser function has been configured). <font color="magenta">
 <P>                                  <span style="COLOR: rgb(0,0,0)">In the case of
 For OpenSSL information pick up a copy of O'Reilly's Network Security with OpenSSL or go to the OpenSSL Site:<BR>  a certificate chain, the username authorization starts with the leaf
 <A HREF="http://www.openssl.org">http://www.openssl.org</A>  certificate. If it successfully finds a mapping
   for the leaf certificate, it continues; if there is no username for the
 <P>  leaf certificate, the validation proceeds up to the root certificate.
 A really fabulous guide on certificate management and installation with OpenSSL:<BR>  If the root certificate is reached and there is still no mapped
 <A HREF="http://www.gagravarr.org/writing/openssl-certs/index.shtml">http://www.gagravarr.org/writing/openssl-certs/index.shtml</A>  username, the authorization fails.</span>
                           </font>Additionally, if Pegasus was configured to use PAM, the pam_acct_mgmt
 <P>                          function will be called with the user that is mapped to the certificate. This
 x509 Certificate and CRL RFC:<BR>                          ensures that any login conditions that would have been placed on a user
 <A HREF="http://www.ietf.org/rfc/rfc2459.txt?number=2459">http://www.ietf.org/rfc/rfc2459.txt?number=2459</A>                          authenticated via basic authentication are still applied to a user
                           authenticated via certificate. The pam_authenticate method will NOT be called.
 <P>                          Lastly, the providers must authorize the user. They receive the username that
 SSLv3 RFC:<BR>                          was mapped to the certificate in the OperationContext.
 <A HREF="http://wp.netscape.com/eng/ssl3/">http://wp.netscape.com/eng/ssl3</A>                  </p>
                   <P>A provider may request the client's certificate chain information through its
 <P>                          provider registration MOF. The "RequestedOperationContextContainers" property
 TLSv1 RFC:<BR>                          of PG_Provider should be set to include the "SSLCertificateChainContainer"
 <A HREF="http://www.ietf.org/rfc/rfc2246.txt">http://www.ietf.org/rfc/rfc2246.txt</A>                          value. If a client is authenticated via trusted certificate, then the container
                           will include a certificate for each level in the client's certificate chain, up
 <P>                          to a maximum depth of seven.</P>
 Basic Authentication RFC:<BR>                  <P><SPAN style="FONT-FAMILY: Times">The behavior of this property is dependent on the overall
 <A HREF="http://www.faqs.org/rfcs/rfc2617.html">http://www.faqs.org/rfcs/rfc2617.html</A>  CIMOM settings. The "enableHttpsConnection" configuration property must be set
   to true for the property to have any effect. Additionally, the
   "sslClientVerificationMode" configuration property must be set to either
   "required" or "optional". If "required" is specified, then the container will
   always be populated. If "optional" is specified, the container will be populated
   only if the client is authenticated via trusted certificate, as opposed to
   another mechanism such as basic authentication. Because the container may not
   always be included in the OperationContext, providers should always check for
   its existence before performing operations on it. See the SSLCertificateInfo
   class in Pegasus/Common/SSLContext.h for a full list of certificate parameters
   that the SSLCertificateChainContainer supports.
   <o:p></o:p></SPAN></P>
                   <h3><a name="EXT">Critical Extension Handling</a></h3>
                   <p><font color="magenta"><span style="COLOR: rgb(0,0,0)">
   The extensions defined for X.509 v3 certificates provide methods for
   associating additional attributes with users or public keys and for
   managing the certification hierarchy. Each extension in a certificate
   may be designated as critical or non-critical. Pegasus relies on the
   underlying OpenSSL implementation to handle critical extensions
   specified in a certificate. Please refer to the OpenSSL documentation
   for more information on currently supported extensions in OpenSSL and
   on the behavior of OpenSSL in the case of unhandled critical extensions.</span>
                           </font>
                   </p>
                   <h3><a name="RESOURCES">Resources</a></h3>
                   <p>
                           For OpenSSL information pick up a copy of O'Reilly's Network Security with
                           OpenSSL or go to the OpenSSL Site:<br>
                           <a href="http://www.openssl.org">http://www.openssl.org</a>
                   </p>
                   <p>A really fabulous guide on certificate management and installation with OpenSSL:<br>
                           <a href="http://www.gagravarr.org/writing/openssl-certs/index.shtml">http://www.gagravarr.org/writing/openssl-certs/index.shtml</a>
                   </p>
                   <p>x509 Certificate and CRL RFC:<br>
                           <a href="http://www.ietf.org/rfc/rfc2459.txt?number=2459">http://www.ietf.org/rfc/rfc2459.txt?number=2459</a>
                   </p>
                   <p>SSLv3 RFC:<br>
                           <a href="http://wp.netscape.com/eng/ssl3/">http://wp.netscape.com/eng/ssl3</a>
                   </p>
                   <p>TLSv1 RFC:<br>
                           <a href="http://www.ietf.org/rfc/rfc2246.txt">http://www.ietf.org/rfc/rfc2246.txt</a>
                   </p>
                   <p>Basic Authentication RFC:<br>
                           <a href="http://www.faqs.org/rfcs/rfc2617.html">http://www.faqs.org/rfcs/rfc2617.html</a>
                   </p>
 <hr> <hr>
   
 <p><i><font size="2">Copyright (c) 2005 EMC Corporation; Hewlett-Packard Development <p><i><font size="2">Copyright (c) 2005 EMC Corporation; Hewlett-Packard Development
   
   Company, L.P.; IBM Corp.; The Open Group; VERITAS Software Corporation</font><br>   Company, L.P.; IBM Corp.; The Open Group; VERITAS Software Corporation</font><br>
   
 <br> <br>
   
 <font size="1">Permission is hereby granted, free of charge, to any person <font size="1">Permission is hereby granted, free of charge, to any person
   
 obtaining a copy&nbsp; of this software and associated documentation files (the obtaining a copy&nbsp; of this software and associated documentation files (the
                                           "Software"), to deal in the Software without restriction, including without
 &quot;Software&quot;), to deal in the Software without restriction, including without  
   
 limitation the rights to use, copy, modify, merge, publish, distribute, limitation the rights to use, copy, modify, merge, publish, distribute,
   
 sublicense, and/or sell copies of the Software, and to permit persons to whom sublicense, and/or sell copies of the Software, and to permit persons to whom
   
 the Software is furnished to do so, subject to the following conditions:</font><br> the Software is furnished to do so, subject to the following conditions:</font><br>
                                   <font size="2">
 <font size="2"><br>                                          <br>
                                   </font><font size="1">THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL
 </font>                                          BE INCLUDED IN ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE
                                           IS PROVIDED&nbsp; "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 <font size="1">THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL                                          INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
                                           PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED&nbsp;                                          COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT                                          IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
                                           CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</font></i></p>
 LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE  
   
 AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE  
   
 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF  
   
 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE  
   
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</font></i></p>  
   
 <hr> <hr>
           </body>
 </BODY>  </html>
 </HTML>  
   
   
   
   
   
   


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4.4.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2