<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://docs.jboss.org/author/display/TEIID/Configuring+SSL">Configuring SSL</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~rareddy">Ramesh Reddy</a>
    </h4>
        <br/>
                         <h4>Changes (3)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >&lt;ssl mode=&quot;login&quot; authentication-mode=&quot;1-way&quot; ssl-protocol=&quot;SSLv3&quot; keymanagement-algorithm=&quot;algo&quot; <br>         enabled-cipher-suites=&quot;SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA&quot;&gt; <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">            &lt;keystore name=&quot;cert.keystore&quot; password=&quot;passwd&quot; type=&quot;JKS&quot;/&gt; <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">            &lt;keystore name=&quot;cert.keystore&quot; password=&quot;passwd&quot; type=&quot;JKS&quot; key-alias=&quot;alias&quot;/&gt; <br></td></tr>
            <tr><td class="diff-unchanged" >            &lt;truststore name=&quot;cert.truststore&quot; password=&quot;passwd&quot;/&gt; <br>&lt;/ssl&gt; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* keystorePassword - password for the keystore. <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">* keystore/key-alias - Alias name for the certificate that is in the key store. <br> <br></td></tr>
            <tr><td class="diff-unchanged" >* truststore/name - if &quot;authenticationMode&quot; is chosen as &quot;2\-way&quot;, then this property must be provided. This is the truststore that contains the public key for the client. Depending upon how you created the keystore and truststores, this may be same file as defined under  &quot;keystoreFilename&quot; property. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>The Teiid's configuration file&#40;s) </p>

<ul>
        <li>standalone&#45;teiid.xml/domain&#45;teiid.xml</li>
        <li>domain-teiid.xml</li>
</ul>


<p>contain transports defined for access into Teiid, and transport contains the properties to configure SSL for socket.</p>

<p>There are two types of transports, each with it's own SSL configuration:</p>

<ul>
        <li>"teiid" - Default configuration to only encrypt login traffic, none of the other properties are used.</li>
        <li>"pg" type - Defaults to no SSL.</li>
</ul>


<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Example Configuration</b></div><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
&lt;ssl mode="login" authentication-mode="1-way" ssl-protocol="SSLv3" keymanagement-algorithm="algo"
         enabled-cipher-suites="SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA"&gt;
            &lt;keystore name="cert.keystore" password="passwd" type="JKS" key-alias="alias"/&gt;
            &lt;truststore name="cert.truststore" password="passwd"/&gt;
&lt;/ssl&gt;
</pre>
</div></div>

<p>Properties</p>

<ul>
        <li>mode - diabled|login|enabled<br/>
  <em>disabled</em> = no transport or message level security will be used. <br/>
  <em>login</em> = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode. <br/>
  <em>enabled</em> = traffic will be secured using the other configuration properties.</li>
</ul>


<ul>
        <li>ssl&#45;protocol- Type of SSL protocol to be used. Default is TLSv1</li>
</ul>


<ul>
        <li>keystore/type - Keystore type created by the keytool. Default "JKS" is used.</li>
</ul>


<ul>
        <li>authentication&#45;mode - anonymous|1&#45;way|2&#45;way,  Type of SSL Authentication Mode.</li>
</ul>


<ul>
        <li>keymanagement&#45;algorithm - Type of key algorithm used. Default is based upon the VM, e.g. "SunX509"</li>
</ul>


<ul>
        <li>keystore/name - The file name of the keystore, which contains the private key of the Server. The file name can be relative resource path available to the Teiid deployer classloader or an absolute file system path. A typical installation would place the keystore file in the conf directory of the profile where Teiid is deployed with a file name relative to the conf path.</li>
</ul>


<ul>
        <li>keystorePassword - password for the keystore.</li>
</ul>


<ul>
        <li>keystore/key-alias - Alias name for the certificate that is in the key store.</li>
</ul>


<ul>
        <li>truststore/name - if "authenticationMode" is chosen as "2&#45;way", then this property must be provided. This is the truststore that contains the public key for the client. Depending upon how you created the keystore and truststores, this may be same file as defined under  "keystoreFilename" property.</li>
</ul>


<ul>
        <li>truststore/password - password for the truststore.</li>
</ul>


<ul>
        <li>enabled&#45;cipher&#45;suites - A comma separated list of cipher suites allowed for encryption between server and client.  The values must be valid supported cipher suites otherwise SSL connections will fail.</li>
</ul>


<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>You can also use CLI to modify the transport configuration.</td></tr></table></div>

<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>If you do not like to leave clear text passwords in the configuration file, then you can use JBoss AS vault mechanism for storing the keystore and truststore passwords. Use the directions defined here <a href="https://community.jboss.org/docs/DOC-17248" class="external-link" rel="nofollow">https://community.jboss.org/docs/DOC-17248</a></td></tr></table></div>

<h1><a name="ConfiguringSSL-SSLAuthenticationModes"></a>SSL Authentication Modes</h1>
<p>SSL supports multiple authentication modes.  In most secure intranet environments, anonymous is suitable to just bulk encrypt traffic without the need to setup SSL certificates. </p>

<ul>
        <li><em>anonymous</em>&#45; no certificates are exchanged, settings are not needed for the keystore and truststore properties. Client must have <tt>org.teiid.ssl.allowAnon</tt> set to true &#40;the default) to connect to an anonymous server.</li>
</ul>


<ul>
        <li><em>1&#45;way</em>&#45; the server will present a certificate, which is obtained from the keystore related properties. The client should have a truststore configured to accept the server certificate.</li>
</ul>


<ul>
        <li><em>2&#45;way</em>&#45; the server will present a certificate, which is obtained from the keystore related properties. The client should have a truststore configured to accept the server certificate.  The client is also expected to present a certificate, which is obtained from its keystore.  The client certificate should be accepted by the trust store configured by the truststore related properties.</li>
</ul>


<h1><a name="ConfiguringSSL-EncryptionStrength"></a>Encryption Strength</h1>
<p>Both anonymous SSL and login only encryption are configured to use 128 bit AES encryption by default.  By default, 1&#45;way and 2&#45;way SSL allow for cipher suite negotiation based upon the default cipher suites supported by the respective Java platforms of the client and server. User can restrict the cipher suites used for encryption by specifying the <em>enabledCipherSuites</em> property above in ssl configuration.                     </p>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://docs.jboss.org/author/display/TEIID/Configuring+SSL">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=18646063&revisedVersion=5&originalVersion=4">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Configuring+SSL?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>