【问题标题】:Camunda - Disable demo user getting created every startup?Camunda - 禁用每次启动都创建演示用户?
【发布时间】:2021-10-15 19:28:48
【问题描述】:

我在 Ubuntu 18.04 EC2 机器上部署了 Camunda 7.15.0(下载了 .zip,解压缩,然后运行 ​​.sh 文件)。对于 Camunda 仪表板的初始登录,我使用了“演示”用户及其凭据。由于“演示”用户具有管理员权限并且其凭据是公开可用的,因此我使用自己的凭据创建了另一个用户并删除了“演示”用户。请注意,我已将 Camunda.sh 添加为 Systemctl 服务,因此每当服务器重新启动时,Camunda 服务也会启动。

但是,当我重新启动 Camunda EC2 服务器(出于我自己的原因),而 Camunda 启动时没有任何问题,我可以看到 'demo' 用户已再次创建强>。有没有办法阻止这种情况发生(通过仪表板或通过修改 EC2 中的 Camunda 文件)?

【问题讨论】:

  • 如果这解决了问题,请接受答案

标签: ubuntu amazon-ec2 ubuntu-18.04 camunda systemctl


【解决方案1】:

A) 如果您使用的是 Tomcat 分发版,请检查您的分发版是否包含文件夹 \camunda-bpm-.....\server\apache-tomcat-9.....\webapps

中的示例 Web 应用程序 camunda-invoice

此示例项目包含 org.camunda.bpm.example.invoice.DemoDataGenerator,它在此处创建用户: https://github.com/camunda/camunda-bpm-platform/blob/7c5bf37307d3eeac3aee5724b6e4669a9992eaba/examples/invoice/src/main/java/org/camunda/bpm/example/invoice/DemoDataGenerator.java#L78

如果您不想要该示例,您可以完全删除文件夹 camunda-invoice。

如果您想使用预构建的发行版,那么我建议您也看看较新的 RUN 发行版: https://docs.camunda.org/manual/7.15/user-guide/camunda-bpm-run/ 可在 CAMUNDA 网站上作为标准下载: https://camunda.com/download/

B) 如果您使用的是 RUN 分发版,则删除 admin-user 部分:

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: "*"

来自配置文件 camunda-bpm-run-7.....\configuration\default.yml,第 5-8 行。

如果您正在为生产使用做准备,您可能还需要考虑使用 production.yml 配置文件。 请在此处查看涵盖各种配置选项的相关文档:https://docs.camunda.org/manual/latest/user-guide/camunda-bpm-run/

【讨论】:

  • 嗨,我搜索了这个目录,但找不到任何名为 camunda-bpm-ee-tomcat-7 的目录。
  • 路径名可能因您使用的发行版而异。如果您使用的是社区版,则路径中将没有 -ee。您解压缩的内容中肯定没有 camunda-invoice 子文件夹吗?您下载了哪个发行版?
  • 没有 camunda-invoice 子文件夹。我下载了这个文件并解压了它。 downloads.camunda.cloud/release/camunda-bpm/run/7.15/…
  • 您可能会完全删除 camunda.bpm:,但这也是 run: 及其下的所有内容的根源。我更新了示例以显示如何仅注释掉管理员用户的创建。
  • 参见docs.camunda.org/manual/7.15/user-guide/camunda-bpm-run : " production.yml 配置旨在根据安全说明提供推荐的属性。在生产环境中使用 Camunda Platform Run 时,请确保您的自定义配置基于这个并仔细阅读安全说明。默认情况下,Run 使用 default.yml 配置启动。要启用 production.yml 配置,请通过命令行界面使用 --production 属性执行启动脚本。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-04
  • 1970-01-01
  • 1970-01-01
  • 2011-03-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多