[JBoss jBPM] - Re: JBPM process composition
by Thinkstream09
Actually, I am rethinking the usefulness of the process composition feature.
I have several processes that share some elements. I thought factoring the shared elements out would work
What I need is this:
1. The parent process and child process must be identifiable by the same id.
2. Assignments made in either process must be visible to the other process.
It seems the "subprocess" gets different id than the parent process. Also, it appear the assignments made in the subprocess would not be visible in the parent process.
So it looks I would end-up with 2 separate process id (parent + child) as well as assignment mismatch.
Unless I am incorrect here I think I will just add the steps to the all processes, despite the multiplication factor.
Am I missing something here?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219155#4219155
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219155
17 years, 1 month
[Security & JAAS/JBoss] - Re: Jboss SSO Questions
by sohil.shah@jboss.com
anonymous wrote :
| 1. Once I successfully logged in to the application, if I open a new Brower and access the same application, it asks for login again.
| Is there a way to make the sso cookie persistent for a certain time and reused by all browser sessions from same machine?
|
JBoss SSO uses http cookie to manage security tokens. Cookies by design are not usable across different Browser processes. The cookie can be used only within the context of the Browser process. However, multiple tabs within the same Browser process should be supported
anonymous wrote :
| 2. Can we have a centralise login page for Jboss sso, which will be shown to user for login data, irrespective of the application ?
|
JBoss SSO by design has a de-centralized architecture for managing an authenticated session across a Federation of web applications both in-domain/cross-domain. With that in mind, web applications provide their own Login screen and Login Processor. For a central Login screen/Processor to be shared by all applications, you would need a dedicated web application that presents the Login Screen integrated with the JBoss SSO stack. Then within the individual web applications instead of presenting a Login Screen, you would provide an http redirect to this central web application. This should work in theory, as I have not tried it personally since its not one of the usecases that is typically used by JBoss SSO architecture
anonymous wrote :
| 3. Once authenticated, if the application needs to get user data ( like user id ) is there any way ?
|
Once an authenticated session is established you should be able to access the user/identity information from your application's Security Context. Like for instance if you are using standard JAAS based authentication you should be able to access it in the Servlet layer via HttpRequest.getRemoteUser etc
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219148#4219148
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219148
17 years, 1 month
[J2EE Compliance] - Login issue with JAAS in JBOSS
by latikapuri
Hi,
I am having an application with implements JSF with EJB3.0 and Shale as the controller. I am using Jboss 4.2.3 to implement JAAS feature. I have the required configuration like login-config.xml, jboss-web.xml and web.xml. I am using org.jboss.security.auth.spi.DatabaseServerLoginModule for authentication.
WhenI try to login using login.jsf, the server log shows that the correct values are passed for user and password (testuser, testuser123) but still I am unable to login.
Also when I try to print the values using the helper-methods getRemoteUser and getUserPrincipal, I see NULL in my log. Please help as I am unable to login as I kepe getting authentication failure even though the values are present in the required tables and views used in login-config.xml.
public String getUserPrincipal()
{
FacesContext context = FacesContext.getCurrentInstance();
ExternalContext externalContext = context.getExternalContext();
return externalContext.getUserPrincipal() != null ? externalContext.getUserPrincipal().toString() : "null";
}
public String getRemoteUser()
{
FacesContext context = FacesContext.getCurrentInstance();
ExternalContext externalContext = context.getExternalContext();
String remoteUser = externalContext.getRemoteUser();
return remoteUser;
}
Server log:
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Postback: Restored view for /login.jsf
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Exiting RestoreViewPhase
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase RESTORE_VIEW 1
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.timing] [TIMING] - [0ms] : Execution time for phase (including any PhaseListeners) -> RESTORE_VIEW 1
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase APPLY_REQUEST_VALUES 2
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Entering ApplyRequestValuesPhase
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.RendererBase] Start decoding of component _viewRoot with class org.ajax4jsf.component.AjaxViewRoot
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.AjaxContainerRenderer] Decode ajax request status for _viewRoot
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.component.AjaxRegionBrige] Submitted AJAX request - Queue Event to AjaxListeners
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.RendererBase] Start decoding of component j_id6 with class org.richfaces.component.html.HtmlToolTip
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.RendererBase] Start decoding of component j_id7 with class org.richfaces.component.html.HtmlToolTip
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] UIForm with client ID login, submitted
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] No decoding necessary since the component username is not an instance or a sub class of UIInput
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] Set submitted value testuser on component
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] new value after decoding testuser
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] No decoding necessary since the component j_id12 is not an instance or a sub class of UIInput
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.RendererBase] Start decoding of component login:j_id11 with class org.richfaces.component.html.HtmlRichMessage
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] No decoding necessary since the component password is not an instance or a sub class of UIInput
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] Set submitted value testuser123 on component
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] new value after decoding testuser123
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] No decoding necessary since the component j_id17 is not an instance or a sub class of UIInput
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.RendererBase] Start decoding of component login:j_id16 with class org.richfaces.component.html.HtmlRichMessage
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.RendererBase] Start decoding of component login:submit with class org.ajax4jsf.component.html.HtmlAjaxCommandLink
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.renderkit.AjaxCommandRendererBase] Decode submit of the Ajax component login:submit
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Exiting ApplyRequestValuesPhase
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase APPLY_REQUEST_VALUES 2
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.timing] [TIMING] - [0ms] : Execution time for phase (including any PhaseListeners) -> APPLY_REQUEST_VALUES 2
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase PROCESS_VALIDATIONS 3
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Entering ProcessValidationsPhase
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] No conversion necessary for value testuser of component usernameField
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] No conversion necessary for value testuser123 of component passwordField
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Exiting ProcessValidationsPhase
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase PROCESS_VALIDATIONS 3
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.timing] [TIMING] - [0ms] : Execution time for phase (including any PhaseListeners) -> PROCESS_VALIDATIONS 3
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase UPDATE_MODEL_VALUES 4
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Entering UpdateModelValuesPhase
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase UPDATE_MODEL_VALUES 4
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.timing] [TIMING] - [0ms] : Execution time for phase (including any PhaseListeners) -> UPDATE_MODEL_VALUES 4
2009-03-18 19:46:19,609 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase INVOKE_APPLICATION 5
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Entering InvokeApplicationsPhase
2009-03-18 19:46:19,609 DEBUG [javax.enterprise.resource.webcontainer.jsf.application] processAction(submit)
2009-03-18 19:46:19,609 INFO [STDOUT] userPrincipal: null
2009-03-18 19:46:19,609 INFO [STDOUT] remoteUser: null
2009-03-18 19:46:19,609 DEBUG [org.jboss.ejb3.security.Ejb3AuthenticationInterceptor] Authentication failure
javax.security.auth.login.LoginException: java.lang.NullPointerException
at org.jboss.security.Util.createPasswordHash(Util.java:409)
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.createPasswordHash(UsernamePasswordLoginModule.java:415)
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:603)
at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:537)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
at org.jboss.aspects.security.AuthenticationInterceptor.authenticate(AuthenticationInterceptor.java:123)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:66)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
at $Proxy120.doLogin(Unknown Source)
at com.sortmybooksonline.web.controller.LoginController.doLogin(LoginController.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.shale.view.faces.ViewActionListener.processAction(ViewActionListener.java:74)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219146#4219146
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219146
17 years, 1 month