Dear Team,
I am using docker compose image to connect PostgreSQL database to jbpm. I am using this command to up docker image :
docker-compose -f docker-compose-examples/jbpm-full-postgres.yml up
Now , the business central workbench will up , I can open the workbench at
http://localhost:8080/business-central/kie-wb.jsp
What I am trying here is, by default jbpm loads default users from file, e.g. wbadmin.
But I want to load users from PostgreSQL database. So I created a PostgreSQL database with below details :
db : jbpm
user: jbpm
password : jbpm
driver : postgres
So I made one change in the standalone/configuration/stanalone.xml
file.
Here is the change I made :
<security-domain name="other" cache-type="default">
<authentication>
<login-module code="Remoting" flag="optional">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/jBPMDS"/>
<module-option name="principalsQuery" value="select password from userlogin where username=?"/>
<module-option name="rolesQuery" value="select role,'Roles' from userlogin where username=?"/>
</login-module>
<login-module code="org.kie.security.jaas.KieLoginModule" flag="optional" module="deployment.business-central.war"/>
<login-module name="org.kie.security.jaas.KieLoginModule-2" code="org.kie.security.jaas.KieLoginModule" flag="optional" module="deployment.jbpm-casemgmt.war"/>
</authentication>
</security-domain>
So, using this it stopped loading users from file, now wbadmin user not able to login but user I created is also not able to login here. It shows error as Login Failed : Not Authorised , login as another user .
Let me tell you here that, I created a userlogin table in PostgreSQL with below structure:
+---------+---------+-------------------------------------------+
|username |password |role |
|---------+---------+-------------------------------------------|
|xyz |xyz |admin,analyst,user,process-admin,kie-server|
+---------+---------+-------------------------------------------+
Hope this information is enough to describe the issue.
So Which another change I required please do let me know.
Looking forward for you response. Thanks in advance