Repository navigation
Conversation
maximthomas
left a comment
There was a problem hiding this comment.
praise: The two new tests pin the encoded destination at the filter and validator boundaries, including an inner %2F, a literal plus sign, and an application fragment. Filter assertion · Validator assertion
issue (blocking): Duplicating a long goto in Location prevents the user from logging out.
Category bug, severity medium. XUIFilter.java L98–L104
The base sends the query once with #logout/. HEAD sends the same query and appends a second encoded goto inside the fragment. OpenAM's Docker distribution uses Tomcat 11 with the connector's default 8,192-byte response-header limit. If the two copies push Location over that limit, Tomcat sends HTTP 500 and the browser never reaches the XUI handler that ends the session. Base redirect · Docker image · Tomcat connector defaults
Temporary loopback check using the compiled filter from each pinned revision on Tomcat 11.0.20 with XUI enabled. Both runs used the same application search URL with an opaque state field and an explicit realm. A separate serializer check independently confirmed the response-header overflow.
request-header budget=8192 response-header budget=8192
base: encoded goto bytes=73 status=302 Location bytes=113
HEAD: encoded goto bytes=73 status=302 Location bytes=192
base: encoded goto bytes=4349 status=302 Location bytes=4389
HEAD: encoded goto bytes=4349 status=500 Location bytes=0
HEAD: org.apache.coyote.http11.HeadersTooLargeException
Keep a single copy of the destination in the redirect. The XUI handler could read the original query when the fragment supplies no goto, and preserve the direct fragment form. This blocker closes when an accepted long request produces a usable XUI redirect, preserves the realm and unrelated query parameters, and delivers the encoded destination once to the existing validator before logout.
issue (blocking): Adding goto to the fragment drops the requested locale on the logout fallback.
Category bug, severity medium. XUIFilter.java L98–L104
With locale=fr, a destination that the validator rejects, and an English server locale without a language cookie, the base redirect initializes XUI in French. HEAD appends &goto= in the fragment, and the Commons router then takes startup parameters exclusively from that fragment. The original query still contains locale=fr, but XUI initializes translations in English before logout and uses those translations on the logged-out view. Router parameter selection · XUI startup · Locale selection · Logged-out view
Independent component check with the Commons UI 3.2.2 router and locale manager. The check used the redirect forms from the two revisions and recorded the language passed to i18next.
Base: locale=fr, selected=fr
HEAD: locale=undefined, selected=en
HEAD after #loggedOut/: query locale visible again, initialized language=en
Preserve the query parameters used during XUI startup. This blocker closes when the rejected destination still leads to the French logged-out page and the accepted destination still reaches the validator with its URL escapes intact.
|
@maximthomas, both findings are addressed in 61a9675.
All 6 filter tests and all 192 XUI tests passed, including coverage for direct fragment links, form submissions, and URL escapes. |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The long-destination test pins the entire Location, including realm, locale, and the application's escaped path and fragment. XUIFilterTest.java
suggestion (non-blocking): Assert the translated heading in the rejected-destination test.
Category test, severity low. validateLogoutGotoUrlTest.js
The test checks expect(locale).to.equal("fr") and the route sent to sendEvent. Those assertions would also pass if startup selected English after the router correctly parsed locale=fr. Exercise locale initialization and the logged-out view with a French translation fixture. The independent component check below verifies the current behavior.
Pin With an English server default, an empty language cookie, and a rejected destination, assert that the rendered <h1> equals the French fixture text.
|
@maximthomas, I extended the rejected-destination test to initialize XUI with an English server default and no language cookie, then assert that the rendered All 192 XUI tests pass. Temporarily removing the startup locale input makes only this test fail because the heading renders in English. |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The rejected-destination test now renders the actual logout view and asserts the French <h1> with an English server default and no language-cookie override. Fixture and assertion
Starting with OpenAM 16.1.4, the default empty list of **Valid goto URL Resources** allows relative URLs. An absolute URL qualifies without a list entry only when it has a recognized OpenAM origin and its path is within the OpenAM deployment context. If OpenAM runs at `https://am.example.com/openam`, a user can sign in successfully and still miss the redirect to `https://am.example.com/reports` unless the authentication realm allows that destination. The Configuration Reference and Administration Guide explain this rule, including how the realm uses the service defaults. The Web Policy Agent troubleshooting guide shows where to add destinations for co-hosted applications and sibling subdomains, with examples for the application root, a protected path, and a query string. This answers the [login question in discussion #1006](#1006 (reply in thread)). The related logout change is tracked in [PR #1279](#1279). The Administration Guide also explains how the Validation Service handles an omitted port. A literal `http` or `https` scheme uses port `80` or `443`, respectively. The `http*` and `https*` scheme patterns match any port when the port is omitted. The guide lists the supported HTTP(S) scheme forms for absolute `goto` patterns and shows separate HTTP and HTTPS patterns for deployments that allow only the standard ports. Authorization Policies also shows how to use an explicit `:*` with a `*://` scheme and a fixed host. Antora rendered all four updated pages. I checked the cross-references and verified that the wildcard examples rendered as literal code. A focused check of the OpenAM 16.1.4 comparators confirmed that `http*` and `https*` patterns without a port match HTTPS on `8443`. For the same URL, a fixed-host `*://` pattern matched the nonrecursive policy comparison with an explicit `:*`. The two literal-scheme patterns restrict HTTP to `80` and HTTPS to `443`. All seven Antora page title tests and all eight documentation checker tests passed, with no errors in 145 How-To references across 56 pages.
Fixes #1278
When a Web Policy Agent sends a user to
/UI/Logout?goto=…, XUI can end the session and show Return to Login even though the agent supplied an allowed return URL.The servlet filter now redirects to
#logout/gotowhen the destination is in the query. XUI reads the destination from the original query and passes it to the existing validator before ending the session. The redirect carries one copy of the destination and keepsrealm,locale, and other query parameters available during startup. This preserves escapes in the application's own URL and the requested language on the logged-out page.Direct
#logout/&goto=…links and destinations submitted in a logout form are also supported. The ordinary XUI logout menu ignores any return URL left in the address bar by an earlier login. An omitted or rejected destination follows the existing logout fallback.All 6
XUIFilterTesttests and all 192 XUI tests passed. Tomcat 11.0.20 returned HTTP 302 with a 4,397-byteLocationfor a long destination. The XUI suite now asserts the rendered French heading in headless Chrome when validation rejects the destination withlocale=fr, an English server default, and no language cookie. Temporarily removing the startup locale input makes that test fail with the English heading.The reporter verified the direct XUI route on OpenAM 16.1.3 with Web Policy Agent 4.1.1. A live-agent round trip with this patch remains untested. Reporter’s confirmation