From 2f0d620856caa888773372717d5757932d28b4ec Mon Sep 17 00:00:00 2001 From: erdosam Date: Mon, 15 Jan 2024 11:16:52 +0700 Subject: [PATCH] Adding user creation using add-user.sh script --- kie-server/base/README.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/kie-server/base/README.md b/kie-server/base/README.md index 29fb443..119fe5f 100644 --- a/kie-server/base/README.md +++ b/kie-server/base/README.md @@ -102,21 +102,39 @@ In order to extend this image, your Dockerfile must inherit from: These are the steps to create your custom users and roles by using realm files in Widlfly: -1.- Create a realm properties file for users and deploy it in `/opt/jboss/wildfly/standalone/configuration`: +1.- Preparing user and its password + +Run for the first time the kie-server container. + + docker run --rm -ti jboss/kie-server /bin/bash + +Then, run the bash script `./add-user.sh` located at `/opt/jboss/wildfly/bin/` to create a user and follow the instruction. + +After the user creation is done, you can see the user and its password in `/opt/jboss/wildfly/standalone/configuration/application-users.properties`. +Go to the last line to see the generated user and password. For example, we use `kieserver` as user and `kieserver1!` as the password. + + application-users.properties + --------------------- + ... + kieserver=16c6511893651c9b4b57e0c027a96075 + +Copy the information above and stop the running kie-server container. + +2.- Create a realm properties file for users and deploy it in `/opt/jboss/wildfly/standalone/configuration`: kie-server-users.properties --------------------- - kieserver=kieserver1! + kieserver=16c6511893651c9b4b57e0c027a96075 # copy the password from previous step -2.- Create a realm properties file for roles and deploy it in `/opt/jboss/wildfly/standalone/configuration`: +3.- Create a realm properties file for roles and deploy it in `/opt/jboss/wildfly/standalone/configuration`: kie-server-roles.properties --------------------- kieserver=kie-server -3.- Modify your `standalone-full.xml` in order to: +4.- Modify your `standalone-full.xml` in order to: -3.1 - In the `management` section, modify default the security-realm for the `ApplicationRealm` as: +4.1 - In the `management` section, modify default the security-realm for the `ApplicationRealm` as: @@ -128,7 +146,7 @@ These are the steps to create your custom users and roles by using realm files i -3.2 - In the `security` subsystem, modify default the `other` security-domain for as: +4.2 - In the `security` subsystem, modify default the `other` security-domain for as: