[JBoss Portal] - Failing to login using LDAP UserModule
by maph2880
I am trying to configure LDAP for jboss portal BETA1. I am attempting to login but the site returns a generic login exception when using valid credentials. There are no exceptions generated in the log.
I have configured per the instructions at..
http://cruisecontrol.jboss.com/cc/artifacts/jboss-portal-latest-doc/refer...
I am using the LDAPUserModuleImpl user module.. For the user module, i have specified the common properties for userCtxDN and uidAttributeID. For the Role and Membership modules, I am using DB. I have the server configured to use Mysql. (when i use the DB specific usermodule, I can login using user credentials from the DB so the DB is configured correctely) In the DB the user mpetteys is assigned the roles for Admin and User.
When I attempt a login i see the following messages are logged..
2007-04-22 07:34:13,680 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] Authenticating username 'mpetteys'
2007-04-22 07:34:13,686 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModuleImpl] findUserByUserName(): username = mpetteys
2007-04-22 07:34:13,686 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModuleImpl] Search filter: (uid=mpetteys)
2007-04-22 07:34:13,686 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModuleImpl] Search filter: (uid=mpetteys)
2007-04-22 07:34:13,705 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModule] user uid: cn=Matt Petteys,ou=people,dc=yellowguppy,dc=com
2007-04-22 07:34:13,705 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModule] user dn: cn=Matt Petteys,ou=people,dc=yellowguppy,dc=com
2007-04-22 07:34:13,715 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModuleImpl] findUserByUserName(): username = mpetteys
2007-04-22 07:34:13,715 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModuleImpl] Search filter: (uid=mpetteys)
2007-04-22 07:34:13,715 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModuleImpl] Search filter: (uid=mpetteys)
2007-04-22 07:34:13,736 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModule] user uid: cn=Matt Petteys,ou=people,dc=yellowguppy,dc=com
2007-04-22 07:34:13,736 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModule] user dn: cn=Matt Petteys,ou=people,dc=yellowguppy,dc=com
2007-04-22 07:34:13,739 DEBUG [org.apache.catalina.core.ApplicationDispatcher] servletPath=/error.jsp, pathInfo=null, queryString=null, name=null
2007-04-22 07:34:13,739 DEBUG [org.apache.catalina.core.ApplicationDispatcher] Path Based Forward
2007-04-22 07:34:13,740 DEBUG [org.apache.jasper.servlet.JspServlet] JspEngine --> /error.jsp
2007-04-22 07:34:13,740 DEBUG [org.apache.jasper.servlet.JspServlet] ServletPath: /error.jsp
2007-04-22 07:34:13,740 DEBUG [org.apache.jasper.servlet.JspServlet] PathInfo: null
2007-04-22 07:34:13,740 DEBUG [org.apache.jasper.servlet.JspServlet] RealPath: /opt/jboss-portal-2.6-BETA1/server/default/./deploy/jboss-portal.sar/portal-server.war/error.jsp
2007-04-22 07:34:13,740 DEBUG [org.apache.jasper.servlet.JspServlet] RequestURI: /portal/error.jsp
2007-04-22 07:34:13,740 DEBUG [org.apache.jasper.servlet.JspServlet] QueryString: null
I see valid bind requests for LDAP but there are not queries sent to mysql to lookup role associations. There is no apparent reasons why the authentication fails. Any ideas..?
The only weirdness that i have found in the error messages..
007-04-22 07:34:13,736 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModule] user uid: cn=Matt Petteys,ou=people,dc=yellowguppy,dc=com
2007-04-22 07:34:13,736 DEBUG [org.jboss.portal.identity.ldap.LDAPUserModule] user dn: cn=Matt Petteys,ou=people,dc=yellowguppy,dc=com
My ldap entries look something like..
# Matt Petteys, people, yellowguppy.com
dn: cn=Matt Petteys,ou=people,dc=yellowguppy,dc=com
sn: Petteys
givenName: Matt
cn: Matt Petteys
gecos: Matt Petteys
uid: mpetteys
userPassword:: xxxxx=
As you can see, i suspect the uid value should be mpetteys.. This appears to be caused by..
http://anonsvn.jboss.org/repos/portal/tags/JBoss_Portal_2_6_0_BETA1/ident...
Note in.. LDAPUserImpl createUserInstance(Attributes attrs, String dn)
The LDAPUserImpl is initialized using the dn in the third parameters which represents the uid..
ldapu = new LDAPUserImpl(dn,getIdentityContext(), dn);
There is a commented out initializer using the uid attribute in this function..
//ldapu = new LDAPUserImpl(dn,getIdentityContext(), uida.get().toString());
I don't know if this is related..?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039666#4039666
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039666
19 years
[JNDI/Naming/Network] - JNDI Lookup issue
by wspiteri
I have deployed a new EAR application to both Jboss AS version 5.0.0 Beta2 and 4.0.GA and I am getting a Connection Exception thrown (see below) when the web application is starting up.
2007-04-23 11:10:31,592 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientAccountMgmtEJBLocal' defined in ServletContext resource [/WEB-INF/applicationContext-xfire.xml]: Invocation of init method failed; nested exception is javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
Caused by:
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1417)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:124)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:86)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:122)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:147)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:90)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:101)
at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.refreshHome(AbstractSlsbInvokerInterceptor.java:104)
at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.afterPropertiesSet(AbstractSlsbInvokerInterceptor.java:91)
at org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean.afterPropertiesSet(LocalStatelessSessionProxyFactoryBean.java:84)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
The actual EJB itself is starting up fine, and have performed a remote call to confirm this. It seems that when Spring is doing a JNDI lookup of the EJB it is getting the connection time out issue. Below is the spring configuration that I am using.
<bean id="clientAccountMgmtEJBLocal"
| class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean">
| <property name="jndiName" value="ClientAccountManagement-EAR-0.0.1/ClientAccountMgmtEJB/local" />
| <property name="businessInterface"
| value="com.xxx.clientaccountmgmt.bs.iface.ClientAccountMgmt" />
| </bean>
Any help would be appreciated.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039665#4039665
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039665
19 years
[JBoss Seam] - Re: Disable butons till the screen renders
by tony.herstell@gmail.com
Perhaps I can explain why it takes so long to render (although if you had a busy server you could get it for any site... anyhow!).
I have a main screen (Wizard) that has about 7 steps you have to do.
I was required to go "free flight" mode in that any step of the wizard could be done at any time... so teh main page has ticks/crosses to show how you are progressing.
Each step, in itself, can contain a number of steps (this got me round using javascript to show/hide bits which really messes up JSF and is really against the JSF paradigm anyhow!).
So I shield parts of the monolith by using s:fragment...
JSF seems to still render all the bits shielded by s:fragments anyhow!! So I have The Mother of all Pages being rendered.. pulling in about 14 other .xhtml pages built on top of a couple of nested templates!
:(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039660#4039660
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039660
19 years
[JBoss Seam] - Re: HowTo: When going to a page to enter data, pull from db
by CptnKirk
christian.bauer(a)jboss.com wrote : I prefer exactly the opposite, with a Search conversation scoped component that holds my prototype entity during the search conversation. Gives me a lot of control over what the user can select on the search screen and how I handle this in the backend:
I really like your search controller. I especially wish Seam's generic DAO (or maybe Query) construct came with *ByExample() methods.
The problem I usually face, and maybe search is a bad example, is the necessary reuse of the entities in other controllers. Lets take profile or preferences. Maybe our users are able to set the default number of entries per page in some profile entity. We could have a ProfileController.profileEntity type system (ok, an EntityHome would probably work well here, whatever just an example). But then what if you want to access some profileEntity properties in your UserSearchController. In the past there was value binding expression ugliness and you had to couple your ProfileController to your UserSearchController because it was the accessor. Seam allows me to avoid all of that baggage.
Unfortunately, I seem to get bitten by this regularly. It seems like no sooner do I define a UserSearch like yours, than a PM wants to reuse the entity used in this search in some other area of the application (without re-entering the data of course). This is why I generally prefer to separate my entity creation logic from my entity manipulation and business logic. I still love the UserSearch example, I'd just pass in the exampleUser along with the other values.
On the flip side, I'd love to learn something new. If I could be achieving my goals in a better way, please set me straight.
What my original post was trying to get at was that regardless of whether exampleUser is passed in or is part of the UserSearch component, the exampleUser is not retrieved via a call to UserHome.instance. Where UserHome is created for the sole purpose of providing the exampleUser. This is what I think the original thread creator was doing, and I think we can both advise against using EntityHome in such a way.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039658#4039658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039658
19 years