Search code examples
ubuntuamazon-ec2ubuntu-18.04camundasystemctl

Camunda - Disable demo user getting created every startup?


I have deployed Camunda 7.15.0 in a Ubuntu 18.04 EC2 machine (downloaded the .zip, extracted it, and then ran the .sh file). For the initial login to Camunda dashboard, I used the 'demo' user and its credentials. As 'demo' user has admin privileges and its credentials are publicly available, I created another user with my own credentials and deleted the 'demo' user. Note that I have added Camunda.sh as a Systemctl service, so that whenever the server reboots, the Camunda service gets started too.

However, when I restarted the Camunda EC2 server (for my own reasons), while Camunda started without any issue, I can see that 'demo' user has been created again. Is there a way to disable this from happening (via Dashboard or by modifying Camunda files in the EC2)?


Solution

  • A) If you are using the Tomcat distribution, check if your distribution contains the example web application camunda-invoice in the folder \camunda-bpm-.....\server\apache-tomcat-9.....\webapps

    This example project contains org.camunda.bpm.example.invoice.DemoDataGenerator, which creates the user here: https://github.com/camunda/camunda-bpm-platform/blob/7c5bf37307d3eeac3aee5724b6e4669a9992eaba/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/DemoDataGenerator.java#L78

    You can just delete the folder camunda-invoice completely if you dont want the example.

    If you want to consume a pre-built distribution, then I would recommend to also have a look at the newer RUN distribution: https://docs.camunda.org/manual/7.15/user-guide/camunda-bpm-run/ which is available as the standard download on the CAMUNDA website: https://camunda.com/download/

    B) If you are using the RUN distribution then remove the admin-user section:

    camunda.bpm:
      #admin-user:
      #id: demo
      #password: demo
      run:
    # https://docs.camunda.org/manual/latest/user-guide/camunda-bpm-run/#cross-origin-resource-sharing
        cors:
          enabled: true
          allowed-origins: "*"
    

    from the configuration file camunda-bpm-run-7.....\configuration\default.yml, lines 5-8.

    If you are preparing for production usage you may also want to consider using the production.yml config file instead. Please see related documentation covering various configuration options here: https://docs.camunda.org/manual/latest/user-guide/camunda-bpm-run/