[Security] - How to make JAAS Login Failure Page more informative ?
by shantanu.u
My stack is as follows :
* JSF 1.2, Facelets, Richfaces 3.2.1
* JAAS - authentication and authorization
* Tomcat 6
Points to note :
1. JAAS is working. I'm able to login into the application.
2. Roles are working. CMA intercepts when I hit a secured resource.
3. Authentication mechanism in web.xml
<login-config>
| <auth-method>FORM</auth-method>
| <realm-name>myrealm</realm-name>
| <form-login-config>
| <form-login-page>/faces/login/login.jsf</form-login-page>
| <form-error-page>/faces/login/loginerror.jsf</form-error-page>
| </form-login-config>
| </login-config>
Problem
4. What I really want is to inform the user why the login failed :
- wrong user id
- wrong password
- account locked due to too many unsuccessful attempts
How can I do this ?
The My JAAS LoginModule does not have any handle to session/request/JSF messages ?
I don't want a generic login failure page.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267132#4267132
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267132
14 years, 10 months
[Clustering] - Re: Forcing a certain node to become master
by bstansberry@jboss.com
For sure you have to make modifications yourself.
The actual service topology is controlled by the org.jboss.ha.framework.server.DistributedReplicantManagerImpl, which is a sub-component of the HAPartition.
The JGroups view that's passed into HAPartition.viewAccepted() provides the list of nodes that have connected to the JGroups channel. But JGroups view != service topology, since not all nodes may have a particular service deployed, and there are timing differences during startup/shutdown of a server. That is, HAPartition connects the channel, so a node appears in the view, and then a service that uses HAPartition is deployed on that node, at which time the node appears in the service topology. The DistributedReplicantManagerImpl deals with that stuff.
A lot of AS clustering stuff works by getting notifications from DistributedReplicantManager when the topology for a service changes. For example, the org.jboss.ha.singleton.HASingletonSupport class uses those notifications to trigger election of an HASingleton master. The org.jboss.ha.framework.server.HATarget class uses the notifications to provide the correct topology to server-side interceptors like org.jboss.aspects.remoting.ReplicantsManagerInterceptor and to the clustered invokers like org.jboss.invocation.unified.server.UnifiedInvokerHA. Those classes advise remote clients when the service topology changes. The proxy factories a la org.jboss.proxy.generic.ProxyFactoryHA listen for notifications and respond by publishing a new version of the proxy in JNDI, so clients doing a lookup get a proxy with the current topology.
So what you're trying to do is to get the topology in the desired order. With that many different places receiving notifications, I don't think you want each one ordering the topology. Rather it's more logical to have the DistributedReplicantManagerImpl order things in the way you want before issuing the notifications.
There are no hooks or configuration points to let you plug in how things are ordered. You'd have to customize to add that. If you are able to come up with a solution that is generally useful, let me know, perhaps we could add it to the AS codebase.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267130#4267130
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267130
14 years, 10 months
[JBoss Messaging Users] - Another Exception
by sacauskis
I'm getting the following exception when running a simple queue example. The problem is that the code is trying to invoke a constructor in org.jboss.remoting.Client that does not exist. I'm running jboss messaging 1.4.5.GA and jboss 4.2.3GA.
org.jboss.jms.exception.MessagingJMSException: Failed to invoke Does the queue exist?org.jboss.jms.exception.MessagingJMSException: Failed to invoke
at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:198)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:80)
at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
at org.jboss.jms.client.JBossConnectionFactory.createTopicConnection(JBossConnectionFactory.java:115)
at org.jboss.jms.client.JBossConnectionFactory.createTopicConnection(JBossConnectionFactory.java:109)
at com.gdit.listener.JMSExample.testMessage(JMSExample.java:36)
at com.gdit.listener.JMSExample.main(JMSExample.java:20)
Caused by: java.lang.NoSuchMethodError: org.jboss.remoting.Client.connect(Lorg/jboss/remoting/ConnectionListener;Ljava/util/Map;)V
at org.jboss.jms.client.remoting.JMSRemotingConnection$1.run(JMSRemotingConnection.java:374)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:368)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:165)
... 10 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267126#4267126
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267126
14 years, 10 months