LDAP configuration!

21 views
Skip to first unread message

wezzax

unread,
Jun 7, 2010, 5:47:00 AM6/7/10
to Open Wonderland Forum
I followed the tutorial on
http://wiki.java.net/bin/view/Javadesktop/ProjectWonderlandAuthentication05#Optional_Add_different_authentic

But I got a ClassFormatError:
<code>

Jun 7, 2010 5:38:30 PM
com.sun.xml.bind.v2.runtime.reflect.opt.Injector inject
WARNING: duplicate class definition bug occured? Please report this :
org/jdesktop/wonderland/modules/securitysession/auth/weblib/
UserPluginConfigList
$JaxbAccessorM_getUserPluginConfigs_setUserPluginConfigs_[Lorg_jdesktop_wonderland_modules_securitysession_auth_weblib_UserPluginConfigList
$UserPluginConfig;
java.lang.ClassFormatError: Illegal class name "org/jdesktop/
wonderland/modules/securitysession/auth/weblib/UserPluginConfigList
$JaxbAccessorM_getUserPluginConfigs_setUserPluginConfigs_[Lorg_jdesktop_wonderland_modules_securitysession_auth_weblib_UserPluginConfigList
$UserPluginConfig;" in class file org/jdesktop/wonderland/modules/
securitysession/auth/weblib/UserPluginConfigList
$JaxbAccessorM_getUserPluginConfigs_setUserPluginConfigs_[Lorg_jdesktop_wonderland_modules_securitysession_auth_weblib_UserPluginConfigList
$UserPluginConfig;
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:
205)
at
com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:
85)
at
com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:
89)
at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:
114)
at com.sun.xml.bind.v2.runtime.reflect.Accessor
$GetterSetterReflection.optimize(Accessor.java:369)
at
com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProperty.java:
65)
at
com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERProperty.java:
84)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(ArrayElementProperty.java:
96)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(ArrayElementNodeProperty.java:
58)
at
sun.reflect.GeneratedConstructorAccessor35.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:
513)
at
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:
124)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:
179)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:
515)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
330)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl
$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
154)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:
202)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:
574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:
522)
at
org.jdesktop.wonderland.modules.securitysession.auth.weblib.UserPluginConfigList.<clinit>(UserPluginConfigList.java:
57)
at
org.jdesktop.wonderland.modules.securitysession.auth.weblib.AuthSessionManagerImpl
$AuthSessionManagerSingleton.loadPlugins(AuthSessionManagerImpl.java:
163) at
org.jdesktop.wonderland.modules.securitysession.auth.weblib.AuthSessionManagerImpl
$AuthSessionManagerSingleton.<init>(AuthSessionManagerImpl.java:144)
at
org.jdesktop.wonderland.modules.securitysession.auth.weblib.AuthSessionManagerImpl.<clinit>(AuthSessionManagerImpl.java:
61)
at java.lang.Class.forName0(Native Method)

</code>

Jonathan Kaplan

unread,
Jun 7, 2010, 1:01:55 PM6/7/10
to openwon...@googlegroups.com
This should be fixed in the latest source. Did you download the authentication module from the module warehouse? If so, I might need to post an updated version there.

wezzax

unread,
Jun 10, 2010, 4:30:46 AM6/10/10
to Open Wonderland Forum
Just tested the latest authentication module from the warehouse, exact
same error.

Please uplod the newer version!


On Jun 8, 1:01 am, Jonathan Kaplan <jonathan...@gmail.com> wrote:
> This should be fixed in the latest source. Did you download the
> authentication module from the module warehouse? If so, I might need to post
> an updated version there.
>
>
>
> On Mon, Jun 7, 2010 at 2:47 AM, wezzax <wez...@gmail.com> wrote:
> > I followed the tutorial on
>
> >http://wiki.java.net/bin/view/Javadesktop/ProjectWonderlandAuthentica...
>
> > But I got a ClassFormatError:
> > <code>
>
> > Jun 7, 2010 5:38:30 PM
> > com.sun.xml.bind.v2.runtime.reflect.opt.Injector inject
> > WARNING: duplicate class definition bug occured? Please report this :
> > org/jdesktop/wonderland/modules/securitysession/auth/weblib/
> > UserPluginConfigList
>
> > $JaxbAccessorM_getUserPluginConfigs_setUserPluginConfigs_[Lorg_jdesktop_won­derland_modules_securitysession_auth_weblib_UserPluginConfigList
> > $UserPluginConfig;
> > java.lang.ClassFormatError: Illegal class name "org/jdesktop/
> > wonderland/modules/securitysession/auth/weblib/UserPluginConfigList
>
> > $JaxbAccessorM_getUserPluginConfigs_setUserPluginConfigs_[Lorg_jdesktop_won­derland_modules_securitysession_auth_weblib_UserPluginConfigList
> > $UserPluginConfig;" in class file org/jdesktop/wonderland/modules/
> > securitysession/auth/weblib/UserPluginConfigList
>
> > $JaxbAccessorM_getUserPluginConfigs_setUserPluginConfigs_[Lorg_jdesktop_won­derland_modules_securitysession_auth_weblib_UserPluginConfigList
> > $UserPluginConfig;
> >        at java.lang.ClassLoader.defineClass1(Native Method)
> >        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> >        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> >        at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
> >        at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown
> > Source)
> >        at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp­l.java:
> > 25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> > com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:
> > 205)
> >        at
> > com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:
> > 85)
> >        at
>
> > com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorIn­jector.java:
> > 89)
> >        at
>
> > com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(Optimi­zedAccessorFactory.java:
> > 114)
> >        at com.sun.xml.bind.v2.runtime.reflect.Accessor
> > $GetterSetterReflection.optimize(Accessor.java:369)
> >        at
>
> > com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProperty.jav­a:
> > 65)
> >        at
>
> > com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERProperty­.java:
> > 84)
> >        at
>
> > com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(ArrayEleme­ntProperty.java:
> > 96)
> >        at
>
> > com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(ArrayE­lementNodeProperty.java:
> > 58)
> >        at
> > sun.reflect.GeneratedConstructorAccessor35.newInstance(Unknown Source)
> >        at
>
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru­ctorAccessorImpl.java:
> > 27)
> >        at java.lang.reflect.Constructor.newInstance(Constructor.java:
> > 513)
> >        at
>
> > com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory­.java:
> > 124)
> >        at
>
> > com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java­:
> > 179)
> >        at
>
> > com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.jav­a:
> > 515)
> >        at
> > com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
> > 330)
> >        at com.sun.xml.bind.v2.runtime.JAXBContextImpl
> > $JAXBContextBuilder.build(JAXBContextImpl.java:1140)
> >        at
> > com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> > 154)
> >        at
> > com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> > 121)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> >        at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp­l.java:
> > 25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:
> > 202)
> >        at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
> >        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:
> > 574)
> >        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:
> > 522)
> >        at
>
> > org.jdesktop.wonderland.modules.securitysession.auth.weblib.UserPluginConfi­gList.<clinit>(UserPluginConfigList.java:
> > 57)
> >        at
>
> > org.jdesktop.wonderland.modules.securitysession.auth.weblib.AuthSessionMana­gerImpl
> > $AuthSessionManagerSingleton.loadPlugins(AuthSessionManagerImpl.java:
> > 163)        at
>
> > org.jdesktop.wonderland.modules.securitysession.auth.weblib.AuthSessionMana­gerImpl
> > $AuthSessionManagerSingleton.<init>(AuthSessionManagerImpl.java:144)
> >        at
>
> > org.jdesktop.wonderland.modules.securitysession.auth.weblib.AuthSessionMana­gerImpl.<clinit>(AuthSessionManagerImpl.java:
> > 61)
> >        at java.lang.Class.forName0(Native Method)
>
> > </code>- Hide quoted text -
>
> - Show quoted text -

Jonathan Kaplan

unread,
Jun 10, 2010, 1:23:53 PM6/10/10
to openwon...@googlegroups.com
I just uploaded the new version. Let me know if that fixes the issue.

wezzax

unread,
Jun 11, 2010, 5:45:09 AM6/11/10
to Open Wonderland Forum
Thanks Jonathan,

It works good! But I'm wondering about TLS support.
> > > - Show quoted text -- Hide quoted text -

Jonathan Kaplan

unread,
Jun 11, 2010, 4:30:54 PM6/11/10
to openwon...@googlegroups.com
TLS support in the LDAP connector or in the Wonderland security module?

wezzax

unread,
Jun 14, 2010, 3:52:12 AM6/14/10
to Open Wonderland Forum
I was just asking about the LDAP connector, but yeah, what about the
security module?

wezzax

unread,
Jun 24, 2010, 4:35:59 AM6/24/10
to Open Wonderland Forum
Hi Jonathan,

I need more info on the authentication methods on the LDAP module.
For example, does it support more than Simple Bind authentication? If
so, what are they and their configurations?

thanks.

Jonathan Kaplan

unread,
Jun 28, 2010, 6:34:36 PM6/28/10
to openwon...@googlegroups.com
The existing LDAP module only supports simple bind authentication. It should be quite easy to extend to use other mechanisms. The main code for authenticating is at line 170 of LDAPUserPlugin.java:


By passing different properties into the secureEnv hashmap, you can get different authentication types. See this tutorial for more information on implementing SASL authentication this way:

wezzax

unread,
Jun 29, 2010, 4:56:48 AM6/29/10
to Open Wonderland Forum
Thanks Jonathan : )

For the M$ Active Directory Manager/Editor - ADSI Edit. Does anyone
know what kind of authentication it uses to connect to AD server if
I'm using LDAP protocol, specific user credential, but NOT simple
bind?

Anyway, the simple program in the SASL page should be useful!

cheers.





On Jun 29, 6:34 am, Jonathan Kaplan <jonathan...@gmail.com> wrote:
> The existing LDAP module only supports simple bind authentication. It should
> be quite easy to extend to use other mechanisms. The main code for
> authenticating is at line 170 of LDAPUserPlugin.java:
>
> http://code.google.com/p/openwonderland-modules/source/browse/trunk/0...

wezzax

unread,
Jun 29, 2010, 5:36:28 AM6/29/10
to Open Wonderland Forum
Where can I get the full version of the LDAPUserPlugin.java?

Cause even if i click "view raw file" (http://openwonderland-
modules.googlecode.com/svn/trunk/0.5/unstable/ldaplogin/src/classes/
org/jdesktop/wonderland/modules/ldaplogin/weblib/LDAPUserPlugin.java)
The line "public PasswordResult credentialsMatch(String username,
Object... credentials)" is the same, which does not show the full pass-
in list!


On Jun 29, 6:34 am, Jonathan Kaplan <jonathan...@gmail.com> wrote:
> The existing LDAP module only supports simple bind authentication. It should
> be quite easy to extend to use other mechanisms. The main code for
> authenticating is at line 170 of LDAPUserPlugin.java:
>
> http://code.google.com/p/openwonderland-modules/source/browse/trunk/0...

Nussbaum-Jones, Nina

unread,
Jun 29, 2010, 7:33:24 AM6/29/10
to openwon...@googlegroups.com
I am a bit rushed for time right now, but basically you need to authenticate using your AD account first. The info you pass for this doesn't have to change (no "new" each time). After this, you can pretty much use Jonathan's code, creating a second set of search attributes, using the username and password specified by the user to verify the account credentials.

If this isn't clear enough, let me know and I can post more later. I'm off to college orientation with #1 (birth order) son....

-N-

Jonathan Kaplan

unread,
Jun 29, 2010, 10:23:31 AM6/29/10
to openwon...@googlegroups.com
That is the full file. The syntax you are referring to on line 134 is a variable argument list (a Java 5 feature). See:


In this case, the Wonderland authentication system passes the full password (as a character array) as the argument to this method. On line 172, you can see how to access the password:

(char[]) credentials[0]
Reply all
Reply to author
Forward
0 new messages