users@glassfish.java.net

Active Directory LDAP Realm Configuration

From: <glassfish_at_javadesktop.org>
Date: Fri, 04 May 2007 09:51:25 PDT

Using Sun Java System Application Server 9.1 (build b33e-beta)

I am trying to create a new LDAP Realm for Active Directory, here are the properties as I enter them into Edit Realm in the admin console. I named the realm "ActiveDirectoryRealm"

base-dn: dc=mydomain,dc=com
directory: ldap://myldapserver:389
group-target: memberOf
group-search-filter: (&(objectClass=user)(userPrincipalName=%s))
jaas-context: ldapRealm

I am running a simple test calling methods on a session bean, which has the following entry in sun-ejb-jar.xml config

      <ior-security-config>
        <as-context>
          <auth-method>USERNAME_PASSWORD</auth-method>
          <realm>ActiveDirectoryRealm</realm>
          <required>true</required>
        </as-context>
      </ior-security-config>


I supply credentials in the form of username_at_mydomain.com, and I also tried just username, but the server is rejecting the login. If I go totally outside the appserver and write a standalone piece that uses LdapContext to authenticate it works fine, so I figure it must be the properties I am supplying to the LDAPRealm. Has anyone achieved this? Thanks for any help.
[Message sent by forum member 'bryanking' (bryanking)]

http://forums.java.net/jive/thread.jspa?messageID=215582