<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
mod_cluster SSL setup/implementation (JBoss AS --> httpd)
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/jicken">Torben Jaeger</a> in <i>Clustering Development</i> - <a href="https://community.jboss.org/message/804615#804615">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi, </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have little problems with how the password attribute of the ssl element in the JBoss AS7 modcluster subsystem is used.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Let's say we already have a truststore defined using system properties:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;"><system-properties></span></p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;"><property name="javax.net.ssl.trustStore" value="${jboss.server.config.dir}/certs/myCA.jks"/></span></p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;"><property name="javax.net.ssl.trustStorePassword" value="mypasswd"/></span></p><p><span style="background-color: #ffffff; font-family: serif; font-size: 12pt;"><span style="color: #000000; font-family: 'andale mono', times; font-size: medium; text-align: -webkit-auto; background-color: #ffffff;"></system-properties></span><br/></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In addition I have different keystores for the client certificates with different passwords.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>If the password is used in the subsystem config, <span style="color: #000000; font-family: serif; font-size: medium; text-align: -webkit-auto; background-color: #ffffff;">ModClusterSubsystemAdd.java</span> (as shown below) will overwrite my settings which will lead to exceptions b/c my truststore cannot be read anymore.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;">if (password.isDefined()) {</span></p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;">config.setSslTrustStorePassword(password.asString());</span></p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;">config.setSslKeyStorePassword(password.asString());</span></p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This fact gives me two options:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1. I will set a password in the ssl element</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This means I have to duplicate my already existing CA truststore and use the same password I am using for my client certificate keystore.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2. I do not set a password.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My truststore can be read w/o modification, BUT my keystore has to use the default "changeit" password which needs considering due to security implications.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This is in <span style="color: #000000; font-family: serif; font-size: medium; text-align: -webkit-auto; background-color: #ffffff;">ModClusterConfig.java</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #000000; font-family: 'andale mono', times; font-size: medium; text-align: -webkit-auto; background-color: #ffffff;">private String sslKeyStorePassword = "changeit";</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 10pt; text-align: -webkit-auto; background-color: #ffffff;">What I'd like to discuss is:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #000000; text-align: -webkit-auto; font-size: 10pt; background-color: #ffffff; font-family: arial, helvetica, sans-serif;">1. Guard the truststore password set in <span style="color: #000000; font-family: serif; font-size: medium; text-align: -webkit-auto; background-color: #ffffff;">ModClusterSubsystemAdd.java</span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;">if (System.getProperty("javax.net.ssl.trustStorePassword") == null) {</span></p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;">     config.setSslTrustStorePassword(password.asString());</span></p><p><span style="background-color: #ffffff; font-family: 'andale mono', times; font-size: 12pt;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #000000; text-align: -webkit-auto; font-size: 10pt; background-color: #ffffff; font-family: arial, helvetica, sans-serif;">2. use the javax.net.ssl.keyStore* system properties like it's done for the javax.net.ssl.trustStore* ones</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-align: -webkit-auto; color: #000000; font-size: medium; background-color: #ffffff; font-family: 'andale mono', times;">private String sslKeyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword");</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-align: -webkit-auto; color: #000000; font-size: 10pt; background-color: #ffffff; font-family: arial, helvetica, sans-serif;">What do you think?</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-align: -webkit-auto; color: #000000; font-size: 10pt; background-color: #ffffff; font-family: arial, helvetica, sans-serif;">Thx, </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-align: -webkit-auto; color: #000000; font-size: medium; background-color: #ffffff; font-family: 'andale mono', times;"><span style="font-family: arial, helvetica, sans-serif; font-size: 10pt;">Torben</span><br/></span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/804615#804615">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Clustering Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2103">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>