Repository navigation
feat(webapps-neo): Ship the neo webapp with the Tomcat distribution - #3884
Merged
Merged
Conversation
- adds operaton-webapp-neo-tomcat, a WAR overlay of operaton-webapp-neo with a servlet-container web.xml, RESTEasy for /api/admin and /api/engine, and a static config.json (same-origin backend, basic auth) - deploys it as webapps/ROOT, like Operaton Run serves neo at /; the Tomcat default ROOT app is no longer shipped - disabled by default, legacy webapps stay the standard: NeoEnabledFilter reads operaton.bpm.webapp.neo.enabled (system property) or OPERATON_BPM_WEBAPP_NEO_ENABLED; when off, / redirects to /operaton/ and every other path returns 404 - SpaFallbackFilter forwards deep links to index.html, the servlet counterpart of the starter's SpaResourceResolver - UserAuthenticationResource declares @produces(application/json): the SPA's fetch sends Accept */*, which Jersey answers with JSON but RESTEasy with application/octet-stream, failing login with a 500 - documents the switch in README.txt and setenv.{sh,bat} WildFly follows separately. related to #3870 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Related to #3870 (Tomcat part; WildFly follows in a separate PR).
What
The Tomcat distribution now contains the new web apps, disabled by default. The legacy web apps stay the standard.
//operaton//operaton//api/admin,/api/engineEnable it with either
operaton.bpm.webapp.neo.enabled=true(commented example inbin/setenv.{sh,bat}), orOPERATON_BPM_WEBAPP_NEO_ENABLED=true.The property name matches the Spring Boot starter (
operaton.bpm.webapp.neo.enabled).How
distro/tomcat/webapp-neo→operaton-webapp-neo-tomcat.war, a WAR overlay ofoperaton-webapp-neowith:web.xmlthat mirrors the filter chain ofOperatonBpmWebappNeoInitializer(header security, session cookie, authentication, security, CSRF, empty body, cache control), plus RESTEasy servlets for/api/admin/*and/api/engine/*config.json(same-origin backend, basic auth), which replaces the Docker placeholder file. The SPA restores the session through/api/admin/auth/user/{engine}, so no dynamicuserfield is needed.webapps/ROOT, like Operaton Run serves neo at/. The SPA bundle onmainuses root-absolute asset and route paths, so a sub-path deployment would depend on fix(webapps-neo): Serve the SPA from a configurable sub-path #3678. The Tomcat default ROOT app is no longer shipped.NeoEnabledFilter(inwebapps-neo/assembly, so WildFly can reuse it) implements the on/off switch.SpaFallbackFilterforwards deep links (GET/HEAD, no file extension, outside/api/, no existing resource) toindex.html. It is the servlet counterpart of the starter'sSpaResourceResolver.UserAuthenticationResource: it now declares@Produces(application/json). The SPA'sfetchsendsAccept: */*. Jersey (Spring Boot) answers that with JSON, but RESTEasy picksapplication/octet-stream, so login failed with a 500 (NoMessageBodyWriterFoundFailure). This does not change behavior on Spring Boot.Verification
webapps-neo/assembly: 411 tests pass, including the newNeoEnabledFilterTest,SpaFallbackFilterTestand a regression test for the@Producesannotation.operaton-bpm-tomcattar.gz on Tomcat 11.0.27:/→ 302/operaton/;/tasks,/config.json,/api/admin/...→ 404; legacy/operaton/app/welcome/default/→ 200setenv.shline):/,/tasks,/processes/invoice→ SPA shell;/config.json→ JSON; bundle assets → 200;/assets/missing.js→ 404; CSP header presentAccept: */*: XSRF cookie issued, POST without token → 403, logindemo/demo→ 200 JSON, whoami → 200,/api/engine/engine/default/process-definition/count→ 200, anonymous → 401, logout → 200, whoami afterwards → 404Notes for review
webapps/ROOTof the distro no longer contains the Tomcat welcome page. With neo disabled,/now redirects to the legacy webapps.bin/setenv.shsetsCATALINA_OPTSunconditionally (existing behavior), so an exportedCATALINA_OPTSdoes not reach Tomcat. Use the uncommented line insetenv.sh,JAVA_OPTS, or the env var.sbom.cdx.json; CI updates it.🤖 Generated with Claude Code