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

File: [Pegasus] / pegasus / doc / PegasusSSLGuidelines.htm (download) / (as text)
Revision: 1.1, Sun Aug 14 13:12:09 2005 UTC (18 years, 8 months ago) by h.sterling
Branch: MAIN
BUG#:3962
TITLE: 	Add SSL guidance back into security guidance in SDK.

DESCRIPTION:
Submitted document

<HTML>
<TITLE>OpenPegasus SSL Guidelines</TITLE>

<BODY>
<H2>OpenPegasus 2.5 SSL Guidelines</H2>

<UL>
	<LI><A HREF="#OVERVIEW">Overview</A>

	<LI><A HREF="#RELATED">Related Information</A>
	<LI><A HREF="#BUILDING">Building Pegasus with SSL</A>
	<LI><A HREF="#CERTS">Creating SSL Certificates</A>
	<LI><A HREF="#CONFIGURE">Configuring Pegasus for SSL</A>
	<LI><A HREF="#DESIGN">SSL Design Question List</A>
	<LI><A HREF="#TRUSTSTORE">Truststore Management</A>
	<LI><A HREF="#CLI">ssltrustmgr CLI</A>
	<LI><A HREF="#CLIENT">Configuring the Pegasus CIM Client for SSL</A>
	<LI><A HREF="#AUTH">SSL Authorization</A>
	<LI><A HREF="#RESOURCES">Resources</A>
</UL>


<H3><A NAME="OVERVIEW">Overview</A></H3>

<P>
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
infrastructure and configure the Pegasus CIM client.  This guide is intended to help developers and
administrators make the right decisions about how to use SSL for their particular application.  It is important to keep in mind
that these are recommendations and may not be applicable to all scenarios.  This guide assumes a basic understanding of SSL and basic authentication.
For more information on these technologies, consult the sources in the <A HREF="#RESOURCES">Resources</A> section at the bottom.
</P>

<H3><A NAME="RELATED">Related Information</A></H3>
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>
<UL>
<LI>PEP#035 - Add support for /dev/random in SSLContext</LI>
<LI>PEP#060 - SSL support in CIM/XML indication delivery</LI>
<LI>PEP#074 - SSLContext and Certificate verification interface enhancement</LI>
<LI>PEP#155 - Support for Client SSL Certificate Verification in CIM Server for CIMExport requests</LI>
<LI>PEP#165 - SSL Client Verification</LI>
<LI>PEP#187 - SSL Certificate Management Enhancements</LI>
<LI>PEP#200 - Recommended OpenPegasus 2.5 Build and Configuration Options for Selected Platforms</LI>
</UL>
</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>. 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).  
  It has not been tested against major version 0.9.8, which came out in July 2005.
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 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:
<UL>
  <LI>PEGASUS_HAS_SSL=1</LI>
  <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 
    directory, $(OPENSSL_HOME)/lib.</LI>
  <LI>OPENSSL_BIN=&lt;location of the binary package&gt; This only needs to be 
    set if 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. 
To turn on SSLv2 support, enable the additional environment variable: 
<UL>
  <LI> PEGASUS_ENABLE_SSLV2=1 </LI>
</UL>
<P>
It is not recommended to enable this protocol, as there have been many security holes associated with it.  Unless you are dealing
with very outdated clients, you probably do not need to enable it.  
</P>
<P>
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:
<UL>
<LI>Self-signed certificate</LI>
<LI>Certificate issued by a third-party certificate authority</LI>
</UL>
<P>
To generate a self-signed certificate, you must create a private key, a certificate signing request (CSR), and finally the public x509 certificate.
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, 
ssl.cnf in the root directory, or generate your own.  For a self-signed certificate, the 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 your respective installation and source directory.  


<pre

style="font-style: italic; font-family: courier new,courier,monospace; margin-left: 40px;"><small>CN=&quot;Common Name&quot;

EMAIL=&quot;test@email.address&quot;

HOSTNAME=`uname -n`

sed -e &quot;s/$CN/$HOSTNAME/&quot; \

-e &quot;s/$EMAIL/root@$HOSTNAME/&quot; $PEGASUS_ROOT/ssl.cnf \

&gt; $PEGASUS_HOME/ssl.cnf

chmod 644 $PEGASUS_HOME/ssl.cnf

chown bin $PEGASUS_HOME/ssl.cnf

chgrp bin $PEGASUS_HOME/ssl.cnf



/usr/bin/openssl req -x509 -days 365 -newkey rsa:1024 \

-nodes -config $PEGASUS_HOME/ssl.cnf \

-keyout $PEGASUS_HOME/key.pem -out $PEGASUS_HOME/cert.pem 



cp $PEGASUS_HOME/cert.pem $PEGASUS_HOME/client.pem</small></pre>


With the above command, key.pem is sslKeyFilePath. cert.pem is sslCertificateFilePath, and client.pem is the client's truststore file.


<P>
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
send you the signed certificate.
<pre

style="font-style: italic; font-family: courier new,courier,monospace; margin-left: 40px;"><small>
&gt;openssl req -newkey rsa:1024 -nodes -config $PEGASUS_HOME/ssl.cnf -keyout key.pem -out req.pem
</SMALL></PRE>
<P>


After creating the keypair, make sure you protect the information sufficiently by changing permissions on the files and/or directories.  
The following table shows the recommended privileges:
<P>




<TABLE border="1" cellspacing="1" width="30%">
<TBODY>
<TR><TH><B>SSL file</B></TH><TH><B>Pegasus Config property</B></TH><TH><B>Permissions</B></TH></TR>
<TR><TD>Private key</td><TD>sslKeyFilePath</TD><TD>rwx------</TD></TR>
<TR><TD>Public certificate</td><TD>sslCertificateFilePath</TD> <TD>rwxr-xr-x</TD></TR>
<TR><TD>Truststore</td><TD>sslTrustStore, exportSSLTruststore</TD> <TD>rwxr-xr-x</TD></TR>
<TR><TD>CRL store </td><TD>crlStore</TD> <TD>rwxr-xr-x</TD></TR>
</TBODY>
</TABLE>
<P>
Pegasus only checks the following conditions when starting up.  The administrator is responsible for ensuring that the above file permissions
are set correctly.  The administrator should also ensure that all containing directories all the way up to the base directory are not world-writeable.
<UL>
<LI>The sslKeyFilePath and the sslCertificateFilePath are readable by the CIMOM.</LI>
<LI>The sslTrustStore, exportSSLTrustStore, and crlStore are readable by the CIMOM if they are a single file.</LI>
<LI>The sslTrustStore, exportSSLTrustStore, and crlStore are readable and writable by the CIMOM if they are a directory.</LI>
</UL>
<P>
These same file permissions should be used for protecting a client's private key, public key, truststore, and crl store as well.
<p>
  For more information on generating keys and certificates, consult the <A HRef="http://www.openssl.org/docs/HOWTO/">OpenSSL 
  HOW-TO documentation</A>. </p>
<H3><A NAME="CONFIGURE">Configuring Pegasus for SSL</A></H3>

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 enabled by default on most platforms.  It is recommended that 
  all remote communication be done over the HTTPS port. 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. 
<P>
<B>httpsPort</B><BR>
The default setting is 5989, the official WBEM secure port.  
<P> <B>sslCertificateFilePath</B> <BR>
This is the path to the x509 server certificate.  
The server certificate may be a chain in which case the file should contain PEM encoded certificates beginning with the server certificate 
and followed by each signing certificate authority (CA) including the root CA.  If the server certificate is a self signed certificate, 
the file only contains the self-signed certificate in PEM format.
The certificate cannot be encrypted because there is currently no mechanism for decrypting the certificate using a user-supplied password.  
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 Certificates</A> for more information.
<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>
<B>sslClientVerificationMode</b><BR>
  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 
  possible settings: disabled, required, optional. There is no "right" setting 
  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 
  authenticate all client requests. In many applications where a physical person 
  is there to supply a username and password, basic authentication is sufficient.
  Other 
  environments may be heterogeneous, in which case it makes sense to allow both 
  basic authentication and SSL certificate verification. The setting of this variable 
  also impacts what happens during the OpenSSL handshake: 
<UL>
<LI><B>"required"</B> -- The server requires that the client certificate be trusted in order for the handshake to continue.
	If the client fails to send a certificate or sends an untrusted certificate, the handshake is immediately terminated.</LI>
<LI><B>"optional"</B> -- The server will request that a client certificate be sent, but will continue the handshake even if no certificate is
	received.  If authentication is enabled, the server will seek to authenticate the client via an alternative method of authentication.</LI>
<LI><B>"disabled"</B> -- The server will not prompt the client for a certificate.  <I>This is the default.</I></LI>
</UL>
Pegasus currently ties a certificate to a valid OS user.  Multiple certificates may be registered to the same user.  When a certificate is
authenticated, Pegasus views it in the same way as if a user was authenticated via basic authentication.  The providers
receive the username that the certificate was mapped to.  See the SSL Authorization section
for more information.

<P>
<B>sslTrustStore</B><BR>
This setting controls the truststore for the cimserver's HTTPS connection.  It can be
either a directory or a single root CA file.  When set to a directory, it is recommended that you use the ssltrustmgr CLI 
to populate the truststore as there are strict naming requirements for trusted certificate files.  See the <A HREF="#CLI">ssltrustmgr CLI</A>
section for further information.
<P>
<B>sslTrustStoreUserName</B><BR>
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">ssltrustmgr CLI</A>. 
<P> <B>crlStore</B><BR>
  This is where the CRL (Certificate Revocation List) store resides. There is 
  only one CRL store for all truststores. Currently, only two truststores are 
  supported (cimserver and export) and these both share the same CRL store. It 
  is important to note that certificates are checked first against the CRL (if 
  specified) and then against the truststore. The <A Href="#CLI">ssltrustmgr CLI</A> 
  should be used for CRL management. 
<P>
<B>enableSSLExportClientVerification</B><BR>
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:

<UL>
<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
	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>
<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
	<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
	<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>The verification depth cannot be specified.  Pegasus uses the default OpenSSL depth of 9.  This means the OpenSSL will only accept client
	certificate chains up to 9 levels deep.</LI>
</UL>

<H3><A NAME="DESIGN">SSL Design Question List</A></H3>

<P>The following questions may be helpful in determining how to configure Pegasus CIM Server.</P>

<B>Should I enable the HTTPS port?</B><BR>
Yes, especially if you are sending passwords with requests.  The HTTP port can be disabled for additional security if desired.
<BR>
<B>Should I enable the export port?</B><BR>
Currently, the export connection provides the only way to authenticate incoming CIM indication requests.  
Because basic authentication cannot be used with these requests, the export connection should be enabled if 
there is a concern over rogue client export requests.  Otherwise, the export requests can still be sent over 
HTTPS using the standard port; the information will be encrypted but the client's identity will not be validated.
<BR>
<B>Should I configure the CIMOM to use a truststore?</B><BR>
This depends on the infrastructure of the application.  If all clients are using basic authentication over the secure port
(and the passwords are secured), then a truststore may not be needed.  If an application does not want to store user/pw information,
then it is a good idea to use a certificate-based infrastructure.  If a CIMOM certificate is compromised, the cimserver and the 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 compromised, the entire system may be compromised.
If using peer verification, it is important to ensure that 1) the cimserver is properly configured to use a truststore,
2) the truststore is loaded properly and protected, and 3) authorization checks are performed after a certificate is verified.
These same conditions also apply to a client that is verifying a server.<BR>

<B>Should I use a self-signed certificate or one issued by a third-party certificate authority?</B><BR>
Generally, scalability will determine whether it's appropriate to use a self-signed certificate or one issued by Verisign
or another third-party certificate authority.
If an administrator administrates their self-singed certificates correctly, they are 
no less secure than one issued by a CA. What a CA buys you is scalability. An up front cost of 
setting up a CA relationship will be offset by the convenience of having that 
CA &quot;vouch&quot; for certs it has signed, in large deployments. In small deployments 
the incremental cost might never outweigh the initial CA-setup cost. <BR>
One important thing to remember is that 
you should not use the same certificate for multiple CIMOMs. If using a self-signed 
certificate, a different one should be generated for each CIMOM, using some unique 
piece of data to make them different. That way, if one of the certificates is 
compromised, the other ones remain secure. <BR>
<B>Should the truststore be a single root CA file or a directory?</B><BR>
If you only anticipate connections from a narrowly defined set of clients, then a single root CA certificate file should be sufficient. 
Alternatively, multiple trusted certificates may be stored in PEM format inside of a single CA file.
If you anticipate getting requests from a heterogeneous set of clients, then it probably makes sense to use the directory option 
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.
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 
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
does not check CRL validity dates during startup.  Therefore, it is the responsibility of the administrator
to regularly download or acquire the CRL and import it into the CRL store using the <A Href="#CLI">ssltrustmgr CLI</A>.
<BR>
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 ssltrusmgr is primarily intended for self-signed certificates.
Technically, CRL's are the correct way to revoke compromised or invalid certificates.
<BR>
<B>What is the order of operations for certificate verification?</B><BR>
The certificate is checked against any CRLs first before going through the rest of the verification process.  Verification starts with the
root certificate and continues down to the peer certificate.  If verification fails at any of these points, the certificate is considered
untrusted and the verification process reports an error.


<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 implement one or both of these relationships.  Ideally, an application should support both levels of trust for maximum 
security and this is the implementation Pegasus recommends.  However, in some scenarios it may make sense to only implement one of these; 
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
basic authentication over HTTPS, then the server can be setup to "trust all client certificates."  
<p> To tell the cimserver to require that all clients be trusted, simply set the 
  sslClientVerification property to "required."<BR>
  To tell the cimserver to trust all clients, set the sslClientVerification property 
  to "disabled" or "optional".


<P>
The SSL verification in Pegasus is independent of any other authentication mechanism.  It can still be utilized when authentication is disabled.
When authentication is enabled, the first line of defense is SSL client verification.  
In situations where a client is not authenticated by SSL and the setting is "optional", the server will attempt to authenticate the client
via another method of authentication.  In this case, the authentication mechanism specified by the configuration property "httpAuthType" will be used
for remote connections and local authentication will be used for local connections.

<P>
See the <A HREF="#CLIENT">Configuring the Pegasus CIM Client for SSL</A> section below on how to setup the client's truststore.

<H3><A NAME="CLI">ssltrustmgr CLI</A></H3>

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.
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
classes in root/pg_internal.
It is recommended that this CLI 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>
<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.</LI>
<LI>The CLI allows for dynamic deletion of certificates by resetting the SSL context.  Normally, you would need to stop and start
	the cimserver to accomplish this.</LI>
<LI>The CLI, or more correctly the provider it operates 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 ssltrustmgr.  The ssltrustmgr manpage provides more information on commands and syntax.


<H3><A NAME="CLIENT">Configuring the Pegasus CIM Client for SSL</A></H3>
<P> The Pegasus CIM client can be configured for SSL by using a constructor that 
  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 
  details about what happens under the covers, here is a description of the various 
  SSLContext constructor parameters. The descriptions are written from a client 
  perspective even though the same constructors are utilized by the cimserver 
  HTTPS port and export port. 
<UL>
<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>

<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
	only be sent if the server requests it.  If this option is specified, the keyPath parameter must also be specified.</LI>

<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>

<LI><B>crlPath</B> -- This specifies an optional CRL store path.  The client checks the CRL list first, before attempting any further authentication,
	including the user-specified callback.</LI>

<LI><B>verifyCert</B> -- This is a user-specified verification callback.  If this is set to null, the default OpenSSL verification callback will
	be executed.  You can implement this method to "trust all servers" or to perform additional authentication checks that OpenSSL does not perform
	by default.</LI>

<LI><B>randomFile</B> -- A file to seed the pseudo random number generator (PRNG).</LI>

</UL>

<P>Here are some general guidelines on implementing peer verification for the client:
<UL>
<LI>The client should enable peer verification by specifying a truststore and (optionally) a user-specified callback function.</LI>
<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 ssltrustmgr 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>
<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.
	In most cases, the default verification callback is sufficient for checking untrusted certificates.</LI>
<LI>The client should ensure that adequate entropy is attained.</LI>
<LI>The client should use a CRL store if the truststore contains CA certificates that support one.</LI>
<LI>The client should only use the SSLv3 and TLSv1 protocols.  By default, Pegasus is not built with SSLv2 support.</LI>

	    <li>The client should terform post-connection checks. </li>
    <ul>
      <li>Ensure a certificate was received.</li>
      <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.</li>
      <ul>
        <li>Ensure that the common name (CN) in the server&#8217;s 
          certificate subject matches the host name of the server.&nbsp; For X509v3 
          certificates, the &#8220;<span class=SpellE>SubjectAltName</span>&#8221; 
          fields in the certificate's extended attributes are also valid host names 
          for the certificate. </li>
        <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&#8217;s certificate, you have not authenticated 
          the server&#8217;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>
      </ul>
      <li>Ensure that certificate verification methods/routines 
        return no errors.</li>
    </ul>


</UL>

<P>
Because only the above arguments can be passed into the Pegasus SSLContext, there are some limitations in the client configuration:
<UL>
<LI>The verification depth cannot be specified.  Pegasus uses the default OpenSSL depth of 9.</LI>
<LI>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
	<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>
</UL>


<H3><A NAME="AUTH">SSL Authorization</A></H3>
<P>The following paragraphs concern authorization of users authenticated by certificate on the cimserver's HTTPS port.
<P> It is important to note that SSL certificates are verified during the initial 
  handshake, BEFORE any further authentication takes place. If a certificate fails, 
  the connection can be terminated immediately, resulting in a connection exception. 
  This scenario will occur if the sslClientVerification property is set to "required" 
  and no certificate or an untrusted certificate is sent. The export connection 
  will also terminate the connection if an untrusted certificate is presented. 
  Once a certificate is verified, no further <I><B>authentication</B></I> is attempted. 
  This effectively results in any basic or local authentication headers being 
  ignored. 
<P>
  Further <I><B>authorization</B></I> checks may be performed when validating 
  the user that is mapped to the certificate. First, the user that is registered to the certificate
  is validated as a valid system user and a valid cimuser (if the cimuser function has been configured).
  Additionally, if Pegasus was configured to use PAM, the pam_acct_mgmt function will be called with the
  user that is mapped to the certificate.  This ensures that any login conditions that would have been placed
  on a user authenticated via basic authentication are still applied to a user authenticated via certificate.
  The pam_authenticate method will NOT be called.  Lastly, the providers must authorize the user.  They receive the
  username that was mapped to the certificate in the OperationContext.
  
<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>
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>
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>
SSLv3 RFC:<BR>
<A HREF="http://wp.netscape.com/eng/ssl3/">http://wp.netscape.com/eng/ssl3</A>

<P>
TLSv1 RFC:<BR>
<A HREF="http://www.ietf.org/rfc/rfc2246.txt">http://www.ietf.org/rfc/rfc2246.txt</A>

<P>
Basic Authentication RFC:<BR>
<A HREF="http://www.faqs.org/rfcs/rfc2617.html">http://www.faqs.org/rfcs/rfc2617.html</A>

<hr>

<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>

<br>

<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 

&quot;Software&quot;), to deal in the Software without restriction, including without 

limitation the rights to use, copy, modify, merge, publish, distribute, 

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>

<font size="2"><br>

</font>

<font size="1">THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL 

COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED&nbsp; 
&quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 

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>

</BODY>
</HTML>







No CVS admin address has been configured
Powered by
ViewCVS 0.9.2