[
https://issues.apache.org/jira/browse/KNOX-3505?focusedWorklogId=1045845&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1045845
]
ASF GitHub Bot logged work on KNOX-3505:
----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Oct/26 01:53
Start Date: 06/Oct/26 01:53
Worklog Time Spent: 10m
Work Description: arsrivastava-cloudera opened a new pull request, #1442:
URL: https://github.com/apache/knox/pull/1442
[KNOX-3505](https://issues.apache.org/jira/browse/KNOX-3505) - Extend auth
page themes to logout session page
## What changes were proposed in this pull request?
KNOX-3283 ([PR #1180](https://github.com/apache/knox/pull/1180)) added
branding and themes for the Knox SSO **login** page. The **logout / session
termination** page (`logout.jsp`) still used the classic styling only, so users
saw inconsistent branding after sign-out.
This change extends the same theming mechanism to `logout.jsp`:
- **`js/knox-theme.js`** — Shared theme loader (extracted from
`login.html`): honors `theme-config.js` (`KNOX_DEFAULT_THEME`,
`KNOX_THEME_LOCKED`), optional `?theme=` query parameter, and `localStorage`
key `knox-auth-theme`, with the same theme-name validation as login.
- **`login.html`** — Loads `knox-theme.js` instead of an inline loader
(behavior unchanged).
- **`logout.jsp`** — Loads `theme-config.js` and `knox-theme.js`, adds
vertical centering for `#signout-container`, and replaces inline styles with
CSS classes for theme-friendly markup (session termination, Return to
Application, Global Logout, invalid-redirect error).
- **`styles/knox.css`** — Default-theme styles for sign-out content and
actions.
- **`styles/themes/modern/theme.css`** — Modern theme styling for
`#signout-container` (aligned with login container).
- **Docs** — `theme-config.js`, `styles/themes/README.md`, and
`styles/themes/DEPLOYMENT.md` updated to document login and logout pages.
Theme chosen at login persists to logout via `knox-auth-theme` without
requiring `?theme=` on the logout URL.
## How was this patch tested?
Manual testing (no automated tests for static knoxauth HTML/JSP/CSS):
1. Deploy or run a Knox gateway with the knoxauth application from this
build.
2. **Default theme on logout** — Open
`.../knoxauth/logout.jsp?originalUrl=<whitelisted-url>` and confirm classic
layout (Session Termination, links/actions readable).
3. **Modern theme via URL** — Open `login.html?theme=modern`, confirm modern
login UI; clear SSO session / navigate to `logout.jsp` with a valid
`originalUrl` and confirm the same modern theme (logo, white card, typography).
4. **Persistence** — With `?theme=modern` on login once, visit `logout.jsp`
without `theme=` and confirm modern theme still applies.
5. **`theme-config.js`** — Set `KNOX_DEFAULT_THEME = 'modern'` and restart;
confirm login and logout use modern. Set `KNOX_THEME_LOCKED = true` and confirm
URL/localStorage overrides are ignored on both pages.
6. **Invalid redirect** — Use a non-whitelisted `originalUrl` and confirm
the error branch renders (default and modern).
7. **Global Logout** (if configured) — Confirm form and button styling with
global logout URL enabled.
Browser: Chrome (or equivalent) on macOS.
## Integration Tests
No new or updated integration tests under
[`.github/workflows/tests`](.github/workflows/tests).
This change is limited to static assets and JSP markup in the knoxauth
application (HTML/CSS/JS). Existing CI does not include visual or browser
regression tests for login/logout pages, and the behavior is client-side theme
loading only (no new gateway APIs or topology parameters). Manual steps above
cover the user-visible behavior.
### Opt-in test suites (PR labels)
Some integration suites are expensive and are **not** run on every PR. Add
the corresponding label to this PR to run them:
| Label | Runs |
|-------|------|
| `test-federation` | KnoxIDF federation E2E (`test_knoxidf_federation.py`).
Stands up a real Keycloak as an external OpenID Provider and drives the full
broker flow. Adds a few minutes (image pull + realm import). |
| `skip-tests` | Skips the entire Docker Compose test job. |
**When to add the label:** these labels only take effect on runs triggered
by opening the PR, pushing a commit, or reopening the PR — the workflow does
not run on a label change. Add the label **before opening the PR** (or before
your next push). Adding it after the checks have already finished will **not**
start a new run; push a commit or close/reopen the PR to trigger one with the
label applied.
## UI changes
**Before:** Logout/session page always used classic Knox styling even when
login used the modern theme.
**After:** Logout page respects the same theme as login (default and modern).
Screenshots to attach when opening the PR (same topology as KNOX-3283 manual
testing):
- `logout.jsp` with **default** theme (valid redirect flow)
- `logout.jsp` with **modern** theme after `login.html?theme=modern` (or
`logout.jsp?theme=modern`)
Please review [Knox Contributing
Process](https://cwiki.apache.org/confluence/display/KNOX/Contribution+Process#ContributionProcess-GithubWorkflow)
before opening a pull request.
Issue Time Tracking
-------------------
Worklog Id: (was: 1045845)
Remaining Estimate: 0h
Time Spent: 10m
> Support themes for logout.jsp
> ------------------------------
>
> Key: KNOX-3505
> URL: https://issues.apache.org/jira/browse/KNOX-3505
> Project: Apache Knox
> Issue Type: Improvement
> Components: Server
> Affects Versions: 3.0.0
> Reporter: Philip Zampino
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> logout.jsp should honor theme configuration similar to the login page (see
> [KNOX-3283|https://issues.apache.org/jira/browse/KNOX-3283]).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)