<!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;">
    Management API Security Possible Configuration Samples
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="http://community.jboss.org/people/dlofthouse">Darran Lofthouse</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/docs/DOC-16576">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><h1>Management API Security Possible Configuration Samples</h1><p>For domain management security we are looking to achieve the following: -</p><ul><li>Simplified configuration without need to understand inner workings of JAAS</li><li>Configuration and implementation compatible with both SASL negotiated connections and the simpler single challenge / response we are used to.</li><li>Option to still make use of JAAS if desired.</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2>Sample Configuration</h2><p>The following sample configuration shows the extent of the configuration to be made possible in the context of the standalone.xml descriptor.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;server xmlns="urn:jboss:domain:1.0"
...
&#160;&#160;&#160; &lt;management&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-realms&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-realm name="Management Realm"&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;server-identities&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;certificate&gt;</span><span class="jive-xml-tag">&lt;/certificate&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;kerberos&gt;</span><span class="jive-xml-tag">&lt;/kerberos&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/server-identities&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;authentication useDomainController="true|false"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;user-properties location="" /&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;user-database connection="UsersDatabase" query="select password from Users where username=%1" /&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;user-ldap connection="UsersDirectory"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;simple userDNPrefix="..." userDNSuffix="... /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;advanced userSearch="..." /&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/user-ldap&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;jaas&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;login-module &gt;</span><span class="jive-xml-tag">&lt;/login-module&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/jaas
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/authentication&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;authorization useDomainController="true|false"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-properties location="" /&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-database connection="UsersDatabase" query="select RoleName from Rolers where User=%1" /&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;role-ldap connection="UsersDirectory"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;simple userDNPrefix="..." userDNSuffix="... /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;advanced userSearch="..." /&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/role-ldap&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;jaas&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;login-module &gt;</span><span class="jive-xml-tag">&lt;/login-module&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/jaas
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/authorization&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-realm&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-realms&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;connections&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;database name="UsersDatabase"&gt;</span><span class="jive-xml-tag">&lt;connection-properties/&gt;</span><span class="jive-xml-tag">&lt;/database&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;ldap name="UsersDirectory"&gt;</span><span class="jive-xml-tag">&lt;connection-properties/&gt;</span><span class="jive-xml-tag">&lt;/ldap&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/connections&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;authorization-control&gt;</span><span class="jive-xml-tag">&lt;/authorization-control&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/management&gt;</span>

&#160;&#160;&#160; <span class="jive-xml-tag">&lt;management-apis&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;native-api interface="public" port="9991" realm="Management Realm"/&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;http-api interface="public" port="9992" realm="Management Realm" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/management-apis&gt;</span> 
...
<span class="jive-xml-tag">&lt;/server&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2>Description</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If security is enabled the management element will hold one or more security realms, the security realm will contain 3 sub sections: -</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>server-identities</h3><p>There are a couple of places where a server requires an identity of it's own a couple of examples are the server certificate used for SSL or a Kerberos identity when used with GSSAPI.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The identities will not be named as they are nested in the security realm, instead there will be some form of ServerIdentityManager with methods such as getX509Idenity or getKerberosIdentity.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>authentication</h3><p>The SASL mechanisms being used require a number of callbacks to be made available whilst the connection is negotiated, for consistency the HTTP API will follow the same approach although SASL will not be directly used.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The authentication element will list one or more 'components' for accessing user stores.&#160; These components will advertise their capabilities so that their suitability with the currently selected SASL / HPP authentication mechanism can be verified.</p><p>&#160; e.g. The User-Database component is expected to be able to return a password so it can be used with both Plan and Digest_MD5, the User-LDAP component will only be able to verify a password it is provided so will only work with Plain.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>To allow for legacy modules a JAAS component will also be provided, this allow a list of login modules to be specified and is intended for Plain or External for the scenarios previously covered up to AS6.&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It is not intended for new modules to be supported for other negotiated mechanisms.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In the future if we choose to publish an SPI for these components we may allow for custom components to be defined.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The useDomainController attribute is to specify if the requests should be delegated to the domain controller.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>authorization</h3><p>The purpose of this element is to define how additional information relating to the customers identity will be loaded so that it can be used later for authorization checks - generally this would be a list of roles but other information could be added.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As for authentication this will define a number of components to access user repositories, these will be queried to load the identity information.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>A JAAS option will also be available to use existing login modules for role queries.&#160; (We will ensure these login modules are only loading the roles and not attempting authentication.)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The useDomainController attribute is to specify if the requests should be delegated to the domain controller.</p><h3>connections</h3><p>At a higher level a connections element will be defined, this will be used to configure all connections to external systems during the security processing - as authentication and authorization has been split this will allow for connection information to be shared with both parts.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>management-apis</h3><p>Within the management APIs itwill be possible to specify the security-realm that should be used for that connection.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It will be possible once the security-realm has been identified to query the server-identities and the authentication components to identify what capabilities we have.&#160; We could decide to support the list of available mechanisms or define additional configuration on the API definition to specify the supported mechanisms.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>authorization-control</h3><p>This is not being defined at this stage but this is where the authorization requirements will be defined.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2>Domain Management</h2><p>For managing a domain it will be expected that the &lt;management&gt; element will be defined within the domain.xml and the &lt;management-apis&gt; element will be defined in the host.xml.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It will also be possible to add a &lt;management&gt; element within the host.xml - this will allow any parts of the &lt;management&gt; element from the master domain controller to be overriden, possible needs for this are: -</p><ul><li>Host specific server identities.</li><li>Host specific connection definitions e.g. Using a different database or different connection to same database.</li><li>Different authentication requirements for host direct connections.</li></ul></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-16576">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


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

</div>

</body>
</html>