Skip to main content
The ASEE Flow distributions — Run, Tomcat and WildFly — and the Docker images built from them ship with defaults for trying ASEE Flow out, inherited from Camunda 7: an engine REST API that anyone can use on Tomcat and WildFly, 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.
On Tomcat and WildFly the engine REST API (/engine-rest) ships without authentication. Anyone who can reach the server can deploy processes, start and delete instances, and create administrators. WebAdmin’s login does not cover it. Protect it before the server is reachable from anywhere but your own machine — see Tomcat and WildFly.
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 users demo, 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.
  1. 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.
  2. 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.
  3. 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:
  1. Replace the bundled keystore. server.ssl points at the demo keystore.p12 with the password camunda. Configure your own certificate.
  2. Let WebAdmin protect the REST API. Run loads WebAdmin by default, and WebAdmin protects /engine-rest itself: 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, keep auth.enabled: true — then nothing else protects the REST API.
The production configuration leaves CORS off. If a browser application on another origin must call the REST API, list its origin rather than *. 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:
The Engine REST WAR is the API for your own programs, and it acts on the same engine. WebAdmin’s login does not protect it: until you do, it is open to anyone who can reach the server. Protect it in one of two ways:
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’s WEB-INF/web.xml contains a commented-out HTTP Basic filter. Remove the comment markers around it, so that it reads:
Where you find the file:
  • 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:
The engine’s users then sign in with their own credentials, and their authorizations apply. Only the engine list, /engine-rest/engine, stays readable without a login. Check the result:

Choose WebAdmin’s login mode

WebAdmin ships in form 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_OPTS line in bin/setenv.sh (setenv.bat on Windows). The distribution’s setenv sets CATALINA_OPTS itself, so a value you set before starting Tomcat is overwritten:
  • WildFly — append it as a -D option to JAVA_OPTS in bin/standalone.conf (standalone.conf.bat on Windows), or pass it to standalone.sh.
In 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 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:
and further down:
Leave the HTTP Basic filter commented out: both filters are named 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:
The issuer, the signature and the expiry show only that the realm issued a token, not for which application. With 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 the oauth2 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:
The trailing / 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 — in server/apache-tomcat-<version>/:
  • Remove webapps/manager, webapps/host-manager, webapps/examples, webapps/docs and webapps/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> in conf/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, because shutdown-aseeflow.bat and shutdown.sh use that port.
WildFly — in 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 https listener’s certificate, which WildFly generates for localhost, 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.
On both servers you can also remove the ASEE Flow welcome page: 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-rest returns 401.
  • Tomcat and WildFly: WebAdmin in form, basic or oauth2 mode, with no removed property left in its settings.
  • Tomcat and WildFly with single sign-on: the Engine REST WAR’s audiences set, and that audience in the tokens of the applications that may call it.
  • Tomcat and WildFly: server hardening applied.
  • Docker: WildFly’s port 9990 not published.