<!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;">
Integrate JBoss 6 to AD - map groups to roles?
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/pathduck">Stian Lund</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/602192#602192">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, I'm new <span> :) </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm in the process of setting up a Test-env for JBoss where we want to connect to Active Directory for authentication of users to the jmx console and admin console. I've created a policy in login-config.xml:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code"><application-policy name="ActiveDirectory">
                <authentication>
            <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required" >
                <module-option name="java.naming.provider.url">ldap://xxx:389/</module-option>
                <module-option name="bindDN">CN=xxx,OU=xxx,DC=xxx,DC=xxx</module-option>
                <module-option name="bindCredential">xxx</module-option>
                    <module-option name="baseCtxDN">cn=Users,dc=xxx,dc=xxx</module-option>
                                <module-option name="baseFilter">(sAMAccountName={0})</module-option>
                                <module-option name="rolesCtxDN">cn=Users,dc=xxx,dc=xxx</module-option>
                                <module-option name="roleFilter">(sAMAccountName={0})</module-option>
                                <module-option name="roleAttributeID">memberOf</module-option>
                                <module-option name="roleAttributeIsDN">true</module-option>
                                <module-option name="roleNameAttributeID">cn</module-option>
                                <module-option name="searchScope">ONELEVEL_SCOPE</module-option>
                                <module-option name="allowEmptyPasswords">false</module-option>
            </login-module>
        </authentication>
    </application-policy>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I've mapped this policy in jboss-web.xml for the WAR files:</p><p><span style="font-family: courier new,courier;">    </span></p><pre class="jive-pre"><code class="jive-code"><security-domain>java:/jaas/ActiveDirectory</security-domain></code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>But now I've hit the wall in regards to how I would map the AD group whose members are admins to the correct role, which I guess is "JBossAdmin".</p><p>For instance we have a group "ga-JBossAdm" in AD and want these members to have the role. I've tried searching for examples how to do this but come up short. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm coming from a Websphere background where this integration is based on mapping AD groups/users to administrative roles in WAS, so maybe I am going at this the wrong way, but I can't really figure out where to go from here. Is <role-name> supposed to map to the same as the name of the AD group?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Hope some of you JBoss gurus can help me proceed here <span> :) </span></p></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/602192#602192">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>