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 2.0.
The settings below use Camunda names: the
camunda.bpm.* properties, the org.camunda.bpm.* classes, the camunda-auth filter, and camunda as the demo keystore’s password. These are the names ASEE Flow ships and reads. They are kept from Camunda Platform 7.24 so that ASEE Flow stays source-compatible with it, so use them exactly as shown.Before you start
- Use JDK 17, 21, or 25 — see Supported Environments.
- 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 two applications serve its REST API:
WebAdmin’s UI calls only WebAdmin’s own REST API, so one WebAdmin login covers the pages and the data they show, and the signed-in user’s authorizations apply. You have nothing to configure for that. In the default
form mode, an anonymous call is refused:
WebAdmin doesn’t depend on how you protect the Engine REST WAR. Choose its login mode on its own:
form (the default), basic or oauth2 — see Choose WebAdmin’s login mode.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:
Choose WebAdmin’s login mode
WebAdmin ships inform mode: users sign in on WebAdmin’s login page, and the session covers the UI and its REST calls. To use another mode, set aseeflow.webadmin.authentication, for example:
-
Tomcat — add it 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 it as a
-Doption toJAVA_OPTSinbin/standalone.conf(standalone.conf.baton Windows), or pass it tostandalone.sh.
basic mode the browser asks once for the user name and password, in its own dialog. WebAdmin and the REST calls behind it use the same credentials, and the user’s own authorizations apply. Basic login has no reliable logout — close the browser after logging out, especially on a shared computer.
For oauth2, see WebAdmin with single sign-on below. The keycloak mode is not available on Tomcat and WildFly.
If your settings still carry aseeflow.webadmin.disable-rest-security, engine-rest-proxy-enabled, engine-rest-client-url or engine-rest-server-url, remove them. These properties were removed in 2.1.0: WebAdmin ignores them and logs a warning for each at startup.
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. Your programs then call the REST API with an access token of their own. This setup protects the API for your programs only: WebAdmin doesn’t need it, in any login mode. 1. Protect the Engine REST WAR with tokens. In the sameWEB-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 on 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 every 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.
Start the provider first. The Engine REST WAR reads the provider’s configuration when it starts. If the provider can’t be reached then, it doesn’t start, and /engine-rest answers 404. Restart the server once the provider is reachable — on WildFly, redeploying the application is enough.
Check the result:
WebAdmin with single sign-on
WebAdmin can sign its users in at the same provider, with theoauth2 login mode. This is independent of the Engine REST WAR: WebAdmin’s UI calls WebAdmin’s own REST API with the login session, whether or not you set the Engine REST WAR up for tokens.
At the provider, WebAdmin needs a confidential client with the authorization-code flow. Allow it to redirect to https://<your host>/webadmin/login/oauth2/code/keycloak after sign-in, and to https://<your host>/webadmin after logout.
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 a -D option — on the CATALINA_OPTS line in Tomcat’s bin/setenv, in JAVA_OPTS in WildFly’s bin/standalone.conf:
/ 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 adds the Keycloak identity provider plugin to the engine that WebAdmin’s own Spring Boot application starts. On Tomcat and WildFly the engine belongs to the server, so the WAR has no engine to add it to.
WebAdmin reads the provider’s configuration when it starts, as the Engine REST WAR does: start the provider first. If it can’t be reached, WebAdmin doesn’t start and /webadmin answers 404.
Then open WebAdmin: the browser goes to the provider’s sign-in page once, and WebAdmin’s data loads with the login session. Logging out of WebAdmin also ends the session at the provider. A WebAdmin session lasts until its own timeout: if the provider ends the user’s session in the meantime, WebAdmin’s session stays valid until then.
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. The Engine REST WAR doesn’t know your application’s session, so a call from the browser makes the browser ask for a login in its own dialog.
Checklist
- JDK 17, 21, or 25.
- 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 to
/engine-restreturns401. - Tomcat and WildFly: WebAdmin in
form,basicoroauth2mode, with no removed property left in its settings. - 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.