Bug 1212185 - Login with user without predefined roles causes infinite redirect loop
Summary: Login with user without predefined roles causes infinite redirect loop
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: BAM
Version: 6.0.3
Hardware: All
OS: All
high
high
Target Milestone: CR1
: ---
Assignee: David Gutierrez
QA Contact: Gui Jospin
Dawn Eisner
URL:
Whiteboard:
Depends On: 1209565
Blocks: 1209560 1220522
TreeView+ depends on / blocked
 
Reported: 2015-04-15 18:37 UTC by Rajesh Rajasekaran
Modified: 2020-03-27 20:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1209565
Environment:
Last Closed: 2020-03-27 20:06:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Error after entering problematic credentials on webSphere (4.85 KB, text/plain)
2015-05-22 13:04 UTC, Jan Hrcek
no flags Details

Comment 2 David Gutierrez 2015-05-05 15:01:43 UTC
Fixed.

The solution consists of "logout" the non authorized session created by the app server on an authenticated user who has not the required roles.

(master) https://github.com/droolsjbpm/dashboard-builder/commit/a76e005119aca968a770651e6e290fb0e7402510

(6.2.x) https://github.com/droolsjbpm/dashboard-builder/commit/3d1dec304a0c41764396fd5c54f53bc27436b4a1

Comment 3 Alessandro Lazarotti 2015-05-05 20:55:46 UTC
given the comment above I am setting this BZ as MODIFIED

Comment 4 Jan Hrcek 2015-05-06 11:24:07 UTC
I did some preliminary testing with with EAP 6.4 and tomcat and it's working fine (no more redirect loops). Will test with other containers when we'll have received this fix in the next rollup patch.

Comment 5 Jan Hrcek 2015-05-22 13:03:07 UTC
I tested this with all containers we certify 6.1.1 against. The redirect issue has been resolved for the following containers:
EAP 6.4
EWS 2 (tomcat 7)
EWS 3 (tomcat 8)
Oracle WebLogic

However, the fix is NOT working on IBM Web Sphere. The behavior is as follows:
after entering the problematic user credentials (= correct username & password, but user doesn't have any of the 5 predefined business central roles, he only has some unrelated role) instead of login error page (which we want) the following stacktrace appears (full stacktrace in attachment).

The problem is that after user reloads the page with URL like:
<hostname>:9080/dashbuilder, This stacktrace remains remains displayed and login page is not reloaded. However it can be worked around by typing
<hostname>:9080/dashbuilder/login.jsp as URL to make the login page appear again.
-----------
Error Page Exception
SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below.

Original Exception:
Error Message: com.ibm.ws.security.web.WebSecurityException: AuthorizationFailed
Error Code: 403
Target Servlet:
Error Stack:
com.ibm.ws.security.web.WebSecurityException: AuthorizationFailed
     at com.ibm.ws.security.web.EJSWebCollaborator.preInvoke(EJSWebCollaborator.java:438)
     at com.ibm.ws.webcontainer.collaborator.WebAppSecurityCollaboratorImpl.preInvoke(WebAppSecurityCollaboratorImpl.java:230)
     at com.ibm.wsspi.webcontainer.collaborator.CollaboratorHelper.preInvokeCollaborators(CollaboratorHelper.java:432)

Comment 6 Jan Hrcek 2015-05-22 13:04:48 UTC
Created attachment 1028771 [details]
Error after entering problematic credentials on webSphere

Comment 8 David Gutierrez 2015-05-22 14:36:59 UTC
The good news is that the DV product is based on EAP. The current fix should be fair enough.


The other thing is that on WebSphere, as far as I know, there is no known solution. If the user does not have any of the allowed roles then the security manager will complain with that error message. I do believe, the only thing we can do is to document this corner case in the product documentation.

Comment 9 Marek Baluch 2015-05-22 16:22:14 UTC
Vikram - can you please put a note to the documentation? Thx!

Comment 11 Marek Baluch 2015-05-25 18:05:02 UTC
Vikram,

the issue itself is fixed and verified on 6.1.1. The fix has one one limitation thought and that is described by David in comment #8. That's what I would like to ask you to document. Can we put a note somewhere into documentation and remove this BZ from the known list?

Thank you.

Comment 12 Alessandro Lazarotti 2015-05-27 14:34:48 UTC
Marek, could this be set as VERIFIED ?

Comment 13 Marek Baluch 2015-05-27 14:40:07 UTC
Alessandro - Yes - moving to VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.