You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ivan (JIRA)" <ji...@apache.org> on 2009/12/23 09:57:29 UTC

[jira] Resolved: (GERONIMO-4997) Can not connect to a ldap server in an anonymous way

     [ https://issues.apache.org/jira/browse/GERONIMO-4997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan resolved GERONIMO-4997.
----------------------------

       Resolution: Fixed
    Fix Version/s: 3.0
                   2.2.1
                   2.1.5

Commit changes to 2.1 at rev 893429. 2.2.1-snapshot at rev 893431, trunk at rev 893433

> Can not connect to a ldap server in an anonymous way
> ----------------------------------------------------
>
>                 Key: GERONIMO-4997
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4997
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: security
>    Affects Versions: 2.1.4, 2.2
>         Environment: OS:Windows XP SP2
> Server: Geronimo 2.2
> JDK:1.6
>            Reporter: Lu Jiang
>            Priority: Minor
>             Fix For: 2.1.5, 2.2.1, 3.0
>
>
> I tried to deploy an web application which uses Apache Directory Server for user authentication.
> So I created a realm file as follows and add a reference to this realm file in deploy plan
> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
>     <environment>
>         <moduleId>
>             <groupId>console.realm</groupId>
>             <artifactId>testLDAP</artifactId>
>             <version>1.0</version>
>             <type>car</type>
>         </moduleId>
>         <dependencies>
>             <dependency>
>                 <groupId>org.apache.geronimo.framework</groupId>
>                 <artifactId>j2ee-security</artifactId>
>                 <type>car</type>
>             </dependency>
>         </dependencies>
>     </environment>
>     <gbean name="testLDAP" class="org.apache.geronimo.security.realm.GenericSecurityRealm" xsi:type="dep:gbeanType" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>         <attribute name="realmName">testLDAP</attribute>
>         <reference name="ServerInfo">
>             <name>ServerInfo</name>
>         </reference>
>         <xml-reference name="LoginModuleConfiguration">
>             <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0">
>                 <log:login-module control-flag="REQUIRED" wrap-principals="false">
>                     <log:login-domain-name>testLDAP</log:login-domain-name>
>                     <log:login-module-class>org.apache.geronimo.security.realm.providers.LDAPLoginModule</log:login-module-class>
>                     <log:option name="connectionURL">ldap://pages.test.com:389</log:option>
>                     <log:option name="roleBase">ou=members,ou=testgroups,o=test.com</log:option>
>                     <log:option name="initialContextFactory">com.sun.jndi.ldap.LdapCtxFactory</log:option>
>                     <log:option name="roleName">cn</log:option>
>                     <log:option name="roleSearchMatching">uniquemember={0}</log:option>
>                     <log:option name="roleSearchSubtree">false</log:option>
>                     <log:option name="userRoleName">uniquemember={0}</log:option>
>                     <log:option name="authentication">simple</log:option>
>                     <log:option name="userSearchSubtree">true</log:option>
>                     <log:option name="userBase">ou=users,o=test.com</log:option>
>                     <log:option name="userSearchMatching">(mail={0})</log:option>
>                 </log:login-module>
>             </log:login-config>
>         </xml-reference>
>     </gbean>
> </module>
> It provides no connectionUsername and password ,because I intend to connect the ldap server anonymously.
> Eache time,I login the web application ,it will try to connect the Apache directory server to authenticate users.
> But a NullPointerException will always occur.
> Caused by: 
> java.lang.NullPointerException
> 	at java.util.Hashtable.put(Hashtable.java:770)
> 	at org.apache.geronimo.security.realm.providers.LDAPLoginModule.open(LDAPLoginModule.java:455)
> 	at org.apache.geronimo.security.realm.providers.LDAPLoginModule.authenticate(LDAPLoginModule.java:267)
> 	at org.apache.geronimo.security.realm.providers.LDAPLoginModule.login(LDAPLoginModule.java:186)
> 	... 28 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.