<!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="http://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;">
    Securing EJB3 traffic with mutual authentication using certificates
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/glenn.bech">Glenn Bech</a> in <i>EJB 3.0</i> - <a href="http://community.jboss.org/message/558279#558279">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;">&#160;</p><p>I am atempting to secure traffic between an Oracle Weblogic 10 and JBOSS 5.1.0 server. Our project is required to both encrypt the traffic and provide mutual authentication. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I know that my aproach does not secure the JNDI lookup, and that it will configure the entire server, and not just my application. I think however that this is the fastest way to reach our deadline, withour having to add annotations and such to our beans. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So far I have done the following; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>Created a self signed server certificate using keytool:&#160; <em>keytool -genkey -alias server -keyalg RSA -keystore server.keystore</em></li><li>Configured the invokerLocator of the bean org.jboss.ejb3.RemotingConnector to use sslsocket transport.</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre>&lt;bean name="org.jboss.ejb3.RemotingConnector"&gt;
&#160;&#160;&#160; &lt;property name="invokerLocator"&gt;
&#160;&#160;&#160;&#160;&#160; &lt;value-factory bean="ServiceBindingManager"
&#160;&#160;&#160;&#160;&#160;&#160;&#160; method="getStringBinding"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;parameter&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/parameter&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;parameter&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;null /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/parameter&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;parameter&gt;sslsocket://${jboss.bind.address}:${port}&lt;/parameter&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;parameter&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;null /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/parameter&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;parameter&gt;3873&lt;/parameter&gt;
&#160;&#160;&#160;&#160;&#160; &lt;/value-factory&gt;
&#160;&#160;&#160; &lt;/property&gt;
&#160;&#160;&#160; &lt;property name="serverConfiguration"&gt;
&#160;&#160;&#160;&#160;&#160; &lt;inject bean="ServerConfiguration" /&gt;
&#160;&#160;&#160; &lt;/property&gt;
&lt;/bean&gt;

<pre><ul><li>On the client side, I also generate a self signed certificate: keytool -genkey -alias client -keyalg RSA -keystore client.keystore</li><li>I then establish mutual authentication</li><li>I export the server certificate from the server keystore and import it into what becomes the client truststore</li><li>I export the client certificate from the client keystore and import it into what becomes the server truststor</li><li>I then configure both weblogic and JBOSS with the comamnd line arguments</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><div id="_mcePaste">-Djavax.net.ssl.keyStore</div><div id="_mcePaste">-Djavax.net.ssl.keyStorePassword</div><div id="_mcePaste">-Djavax.net.ssl.trustStore=</div><div id="_mcePaste">-Djavax.net.ssl.trustStorePassword</div><div id="_mcePaste"> </div><div id="_mcePaste">I have one-way SSL up and running. If I remove the server certificate from the Client trust store, the handshake </div><div id="_mcePaste">fails.</div><div id="_mcePaste"> </div><div id="_mcePaste">My problem is; JBOSS does not authenticate the client certificate and accepts all incoming traffic. It seems to be <br/>ignoring the configured truststore. I have searched all documentation and have found nothing on EJB3 over SSL &amp; mutual authentication </div><div id="_mcePaste">in JBOSS 5.1.0AS</div><div id="_mcePaste"> </div><div id="_mcePaste">Can anyone help? </div></pre>
</pre></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/558279#558279">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB 3.0 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>