-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.5.0, 7.0.0
-
Component/s: SAML
Bug description
If AM is installed into the container root context, then when you hit /idpssoinit to being a SAML flow the redirect to the AM login UI fails because an incorrect redirect is generated.
How to reproduce the issue
- Install AM into the container root context
- Configure SAML with a hosted IDP and remote SP
- Start an SSO flow using /idpssoinit (or idpSSOInit.jsp)
Expected behaviour
User is redirected to /UI/Login and then to the XUI to login.
Current behaviour
User is redirected to /idpssoinit/UI/Login or /saml2/UI/Login if using the JSP directly.
Work around
Explicitly configure the AuthUrl in the IDP settings (under Assertion Processing) to the full login URL.
Code analysis
String uri = request.getRequestURI(); String deploymentURI = uri; int firstSlashIndex = uri.indexOf("/"); int secondSlashIndex = uri.indexOf("/", firstSlashIndex + 1); if (secondSlashIndex != -1) { deploymentURI = uri.substring(0, secondSlashIndex); }
This code assumes that there is a non-empty context path between the first two slashes in the URL. When deployed into the context root this is not true as the context path is empty.
- duplicates
-
OPENAM-14397 Integrated SAML2 fails when AM is deployed in the root context
-
- Closed
-
- is related to
-
OPENAM-14656 SAML redirect to login page on SP side fails if AM installed into the root context
-
- Resolved
-