demo users with known passwords, the invoice example, and development settings in Run. This page lists what to change before you run a distribution in production. It applies to ASEE Flow 1.0.2.
Before you start
- Use JDK 17 or 21 — see Supported Environments. Newer JDKs are not supported on the 1.x line; on Java 25 its JavaScript engine fails.
- Plan for HTTPS. The setups below use HTTP Basic, which sends the password with every request. Terminate TLS at the server or at a reverse proxy in front of it.
- Use a production database instead of the embedded H2 — see Database Schema.
Remove the demo users
The invoice example creates the usersdemo, john, mary and peter, each with the user name as password, and makes demo an administrator. Run’s development configuration creates demo / demo as well.
- Remove the invoice example before the first start:
- Tomcat:
server/apache-tomcat-<version>/webapps/aseeflow-invoice/ - WildFly:
server/wildfly-<version>/standalone/deployments/aseeflow-example-invoice-jakarta-<version>.war - Run: start with
--production(below), which leaves the example out.
- Tomcat:
- Create your first administrator on the setup page at
/aseeflow/app/admin/default/setup/. The page works only while no administrator exists. With LDAP or Keycloak as identity provider, your administrators come from there instead. - If the example has already run, delete its users in Admin → Users.
ASEE Flow Run
Start Run with its production configuration:configuration/production.yml turns on authorization checks and the password policy, leaves out the invoice example and the WADL, creates no demo user, and serves HTTPS on port 8443.
Then change two things in production.yml:
-
Replace the bundled keystore.
server.sslpoints at the demokeystore.p12with the passwordcamunda. Configure your own certificate. -
Let WebAdmin protect the REST API. Run loads WebAdmin by default, and WebAdmin protects
/engine-restitself: the browser uses the WebAdmin login session, and programs send HTTP Basic credentials. Run’s own REST authentication accepts only HTTP Basic, so together with WebAdmin’s login page it makes every WebAdmin call fail. Turn it off while WebAdmin is loaded:If you start Run without WebAdmin, keepauth.enabled: true— then nothing else protects the REST API.
*. ASEE Flow Run describes the remaining options.
Tomcat and WildFly
On these distributions the engine belongs to the server, and the REST API is a separate application: the Engine REST WAR. WebAdmin’s login protects WebAdmin’s own pages, but the data they show comes from the Engine REST WAR. So you protect the Engine REST WAR, and WebAdmin’s login mode follows how you protected it:WebAdmin’s
form login does not work with a protected Engine REST WAR. The Engine REST WAR doesn’t know the WebAdmin session, so the browser asks for a second login in its own dialog — and that login stays active after you log out of WebAdmin, until the browser is closed. Keep form for trying ASEE Flow out with the default, unprotected setup.Protect the Engine REST WAR
The Engine REST WAR’sWEB-INF/web.xml contains a commented-out HTTP Basic filter. Remove the comment markers around it, so that it reads:
-
Tomcat —
server/apache-tomcat-<version>/webapps/engine-rest/WEB-INF/web.xml. Edit it in place and restart Tomcat. -
WildFly — inside the archive
server/wildfly-<version>/standalone/deployments/aseeflow-engine-rest-jakarta-<version>.war. With WildFly stopped, take the file out in a working directory, edit it, and put it back:
/engine-rest/engine, stays readable without a login. Check the result:
Switch WebAdmin to basic login through its proxy
Set three WebAdmin properties:-
Tomcat — add them to the
CATALINA_OPTSline inbin/setenv.sh(setenv.baton Windows). The distribution’ssetenvsetsCATALINA_OPTSitself, so a value you set before starting Tomcat is overwritten: -
WildFly — append them as
-Doptions toJAVA_OPTSinbin/standalone.conf(standalone.conf.baton Windows), or pass them tostandalone.sh.
/engine-rest. Basic login has no reliable logout — close the browser after logging out, especially on a shared computer.
Single sign-on instead of HTTP Basic
The Engine REST WAR can accept access tokens from an OpenID Connect provider, such as Keycloak, instead of HTTP Basic. WebAdmin then signs users in at that provider: they sign in once, on the provider’s page, and WebAdmin’s proxy sends their access token with every call to the REST API. At the provider, WebAdmin needs a confidential client with the authorization-code flow. Allow it to redirect tohttps://<your host>/webadmin/login/oauth2/code/keycloak after sign-in, and to https://<your host>/webadmin after logout.
1. Protect the Engine REST WAR with tokens. In the same WEB-INF/web.xml as above, the blocks marked “uncomment to enable” — two in WildFly’s file, three in Tomcat’s — set up token validation. Remove their comment markers, leaving the blocks where they are, so that they read:
camunda-auth.
2. Name the provider and the audience. The Engine REST WAR takes both from system properties. Add them as -D options where you put WebAdmin’s settings — the CATALINA_OPTS line in Tomcat’s bin/setenv, JAVA_OPTS in WildFly’s bin/standalone.conf:
audiences, a token must also name the REST API in its aud claim. Choose that name — here aseeflow-engine-rest — and have the provider add it to the access tokens of WebAdmin’s client and of every other application that may call the REST API. In Keycloak, that is an Audience mapper in the client’s dedicated client scope, with Included Custom Audience set to the name and Add to access token on. List several names separated by commas. Without audiences, the Engine REST WAR accepts any valid token of the realm, whichever application it was issued to.
The token’s preferred_username claim names the engine user (another claim: org.camunda.bpm.engine.rest.security.oauth2.user-name-attribute). That user’s groups and authorizations come from the engine’s own user management, not from the provider’s groups — create the engine users under the same names and give them their authorizations. Programs call the REST API with an access token of their own; the same rule applies to the user it names.
3. Switch WebAdmin to oauth2 through its proxy. Put WebAdmin’s settings in an application.yml, in a directory of your choice:
${OIDC_CLIENT_SECRET} keeps the client secret out of the file: set that environment variable for the server. Then point WebAdmin to the directory with one more -D option, next to the issuer:
/ marks a directory, and the file in it must be named application.yml. The option applies to every Spring Boot application on the server; on the distributions that is WebAdmin alone. OAuth2 / OIDC describes the properties.
Use oauth2 also when the provider is Keycloak. The keycloak mode needs the Keycloak identity plugin, which the WebAdmin WAR doesn’t include, so the WAR doesn’t start in that mode.
Start the provider first. The Engine REST WAR and WebAdmin read the provider’s configuration when they start. If the provider can’t be reached then, neither of them starts, and /engine-rest and /webadmin answer 404. Restart the server once the provider is reachable — on WildFly, redeploying the two applications is enough.
Check the result:
Harden the server
Tomcat — inserver/apache-tomcat-<version>/:
- Remove
webapps/manager,webapps/host-manager,webapps/examples,webapps/docsandwebapps/ROOT. They accept requests only from the same machine, but a reverse proxy on that machine counts as the same machine. - Hide server details on error pages: add
<Valve className="org.apache.catalina.valves.ErrorReportValve" showReport="false" showServerInfo="false"/>inside<Host>inconf/server.xml. - Turn off hot deployment: set
autoDeploy="false"on<Host>. - Disable the shutdown port:
<Server port="-1" ...>. Stop Tomcat through its process or service manager afterwards, becauseshutdown-aseeflow.batandshutdown.shuse that port.
server/wildfly-<version>/standalone/configuration/standalone.xml:
- Keep the management interface on
127.0.0.1, as the distribution configures it, and turn off its web console:console-enabled="false"on<http-interface>. - Turn off periodic deployment scanning:
scan-interval="0"on<deployment-scanner>. Deployments are still read at startup. - Replace the
httpslistener’s certificate, which WildFly generates forlocalhost, with your own — or remove the listener if TLS ends at a reverse proxy. - Remove the welcome page: the
<location name="/" handler="welcome-content"/>entry.
webapps/aseeflow-welcome on Tomcat, deployments/aseeflow-welcome.war on WildFly.
Docker images
The Docker images are built from these distributions and carry the same defaults. Apply the same changes through mounted configuration files or an image derived from ours. Two things differ:- The WildFly image binds the management interface to all network interfaces. Don’t publish port
9990, and restrict access to it inside your network, for example with a Kubernetes network policy. - Without database settings, the images fall back to an embedded H2 database. Always configure your database.
Your own applications
Protecting the Engine REST WAR doesn’t restrict how your own applications sign in their users:- A process application on the server’s engine uses the Java API, not REST.
- A back-end that calls the REST API sends a technical user’s credentials with HTTP Basic, and keeps its own login — form-based or any other.
- A browser front-end should call its own back-end rather than the REST API directly. Calling the Engine REST WAR from the browser leads to the same second login as WebAdmin’s
formmode.
Checklist
- JDK 17 or 21.
- A production database, not H2.
- HTTPS, at the server or a reverse proxy.
- Invoice example removed, demo users deleted, first administrator created.
- Run: started with
--production, own keystore, Run’s REST authentication off while WebAdmin is loaded. - Tomcat and WildFly: Engine REST WAR protected — an anonymous call returns
401. - Tomcat and WildFly: WebAdmin in
basicoroauth2mode, through its proxy. - Tomcat and WildFly with single sign-on: the Engine REST WAR’s
audiencesset, and that audience in the tokens of the applications that may call it. - Tomcat and WildFly: server hardening applied.
- Docker: WildFly’s port
9990not published.