How to configure DB user authentication in JBPM 7.14

97 views
Skip to first unread message

Animesh Tiwari

unread,
May 14, 2020, 3:43:28 AM5/14/20
to jBPM Setup
Dear All,
How to configure DB user authentication in jBPM 7.14 with oracle DB. Are create users/roles tables? if yes Please share the structure of these tables with dummy data. 

Thanks
Animesh

Abhijit Humbe

unread,
May 14, 2020, 12:43:36 PM5/14/20
to Animesh Tiwari, jBPM Setup
Go through document for DB login module configuration.
Abhijit Humbe


--
You received this message because you are subscribed to the Google Groups "jBPM Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-setup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-setup/a4e9dc6b-daef-44cb-be8e-4d398afa4d16%40googlegroups.com.

Animesh Tiwari

unread,
May 20, 2020, 11:12:38 AM5/20/20
to jBPM Setup

Dear Abhijit,
able to log in the JBPM using the oracle database but getting error as "Process Instances could not be loaded. Check if the jBPM Capabilities are enabled and if the remote server is correctly set up." and server log for your reference.


2020-05-20 22:44:35,400 ERROR [org.kie.server.remote.rest.jbpm.QueryDataResource] (default task-9) Unexpected error during processing: Query jbpmProcessInstances not found: org.jbpm.services.api.query.QueryNotFoundException: Query jbpmProcessInstances not found
at org.jbpm.kie.services.impl.query.QueryServiceImpl.query(QueryServiceImpl.java:247)...............

2020-05-20 22:44:35,429 ERROR [org.dashbuilder.exception.ExceptionManager] (default task-3) Can't lookup on specified data set: jbpmProcessInstances: org.dashbuilder.dataset.exception.DataSetLookupException: Can't lookup on specified data set: jbpmProcessInstances
at org.dashbuilder.dataset.DataSetManagerImpl.lookupDataSet(DataSetManagerImpl.java:156)..........................
.  Also attaching my standalone.xml  for your reference.

On Friday, May 15, 2020 at 12:43:36 AM UTC+8, Abhijit Humbe wrote:
Go through document for DB login module configuration.
Abhijit Humbe


On Thu, May 14, 2020 at 1:13 PM Animesh Tiwari <animeshs...@gmail.com> wrote:
Dear All,
How to configure DB user authentication in jBPM 7.14 with oracle DB. Are create users/roles tables? if yes Please share the structure of these tables with dummy data. 

Thanks
Animesh

--
You received this message because you are subscribed to the Google Groups "jBPM Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-...@googlegroups.com.
standalone.xml

Animesh Tiwari

unread,
May 21, 2020, 5:02:31 AM5/21/20
to jBPM Setup

Hi Abhijit,
Found one more discrepancy might be it will help you to suggest what was I missing. Attached screenshots for your reference.
This is  response of lie Server with login DB using oracle 12c
<response type="SUCCESS" msg="Kie Server info">
<kie-server-info>
<capabilities>KieServer</capabilities>
<capabilities>BRM</capabilities>
<capabilities>BPM</capabilities>
<capabilities>CaseMgmt</capabilities>
<capabilities>BPM-UI</capabilities>
<capabilities>BRP</capabilities>
<capabilities>DMN</capabilities>
<capabilities>Swagger</capabilities>
<name>sample-server</name>
<id>sample-server</id>
<version>7.14.0.Final</version>
</kie-server-info>
</response>

-----
Kie Server response without login DB with oracle 12c.
<response type="SUCCESS" msg="Kie Server info">
<kie-server-info>
<capabilities>KieServer</capabilities>
<capabilities>BRM</capabilities>
<capabilities>BPM</capabilities>
<capabilities>CaseMgmt</capabilities>
<capabilities>BPM-UI</capabilities>
<capabilities>BRP</capabilities>
<capabilities>DMN</capabilities>
<capabilities>Swagger</capabilities>
<messages>
<content>
Server KieServerInfo{serverId='sample-server', version='7.14.0.Final', name='sample-server', location='http://localhost:8080/kie-server/services/rest/server', capabilities=[KieServer, BRM, BPM, CaseMgmt, BPM-UI, BRP, DMN, Swagger], messages=null}started successfully at Thu May 21 16:44:30 SGT 2020
</content>
<severity>INFO</severity>
<timestamp>2020-05-21T16:44:30.634+08:00</timestamp>
</messages>
<name>sample-server</name>
<id>sample-server</id>
<version>7.14.0.Final</version>
</kie-server-info>
</response>
you 
Untitled.png

Abhijit Humbe

unread,
May 21, 2020, 7:19:16 AM5/21/20
to Animesh Tiwari, jBPM Setup
Looks like communicate between kie-server and workbench is not proper. In provided stanadalone.xml I cant see any authentication options. Add below properties in system-properties tag:

        <property name="org.kie.server.user" value="bpmsAdmin"/>
        <property name="org.kie.server.pwd" value="admin1"/>
        <property name="org.kie.server.controller.user" value="bpmsAdmin"/>
        <property name="org.kie.server.controller.pwd" value="admin1"/>

Make sure user has kie-server and rest-all roles.

Abhijit Humbe


To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-setup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-setup/abeb6a20-1c0f-497e-b617-2770e3b17a4b%40googlegroups.com.

Animesh Tiwari

unread,
May 21, 2020, 8:31:48 AM5/21/20
to jBPM Setup
I have one question about the below details - how is JBPM  working fine without the below details and all transactions storing in Oracle 12c db without any error. I am using a standalone jbpm-server-7.14.0.Final-dist. It is working fine with LDAP without suggested these system properties.

New requirements, login module will work with the database too. We are doing the following steps to connect JBPM with oracle and it is working fine.

1.   Modify domain.xml located at jbpm-server-7.14.0.Final-dist\domain\configuration. You need to modify database configuration as shown below:


  <subsystem xmlns="urn:jboss:domain:datasources:5.0">

                <datasources>

                    <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                        <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>

                        <driver>oracle</driver>

                        <security>

                            <user-name>Int_bpm</user-name>

                            <password>Int_bpm</password>

                        </security>

                    </datasource>

                    <drivers>

                        <driver name="oracle" module="oracle.jdbc">

                            <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                        </driver>

                    </drivers>

                </datasources>

            </subsystem>

2.   Modify standalone.xml located at jbpm-server-7.14.0.Final-dist\standalone\configuration

 

·       Add following one system properties:

 

<property name="org.kie.server.persistence.dialect" value="org.hibernate.dialect.SQLServer2012Dialect"/>

 

For Oracle, dialect should be org.hibernate.dialect.Oracle10gDialect.

 

·       Change datasources as shown below:

  <subsystem xmlns="urn:jboss:domain:datasources:5.0">

            <datasources>

                <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                    <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>

                    <driver>oracle</driver>

                    <security>

                        <user-name>Int_bpm</user-name>

                        <password>Int_bpm</password>

                    </security>

                </datasource>

                <drivers>

                    <driver name="oracle" module="oracle.jdbc">

                        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                    </driver>

                </drivers>

            </datasources>

        </subsystem>

       


 

c.  Make sure you are using the same JNDI name in <system-properties> tag as define in datasource.

  <property name="org.kie.server.persistence.ds" value="java:jboss/datasources/ExampleDS"/>

        <property name="org.kie.server.persistence.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

 

3.   Modules setup.

Go to : \jbpm-server-7.14.0.Final-dist\modules\system\layers\base location and create following folder structure: : \jbpm-server-7.14.0.Final-dist\modules\system\layers\base \oracle\jdbc\main

         Now Place the following files there:

            

Animesh Tiwari

unread,
May 23, 2020, 9:34:21 AM5/23/20
to jBPM Setup
Hi Abhijit,
Now it is working fine with DB and getting the expected result! it would be very helpful if you will share the jbpm.user.info.properties details.
thanks a lot!
Animesh


On Thursday, May 21, 2020 at 7:19:16 PM UTC+8, Abhijit Humbe wrote:

Animesh Tiwari

unread,
May 27, 2020, 12:41:36 AM5/27/20
to jBPM Setup
Hi Abhijit,
Do you have any idea how can utilize existing user maintenance functionality of workbench for creating and storing new users?
 How can we use existing user creation functionality through workbench and store user details in the DB tables( userroles and users)  which use for login? 
is there any way to use workbench and store user details in DB tables( userroles and users ) in place of roles.properties and user.properties?

Please suggest if we can achieve above this.

Neha joshi

unread,
May 27, 2020, 1:23:51 AM5/27/20
to jBPM Setup
Hello Animesh,

Did you try below configuration in stanadlone/Configuration/Standalone.xml file 

i) Remove <properties> tag that contain kie.keystore

ii)Add following properties  ,


<property name="org.kie.server.user" value="adminusername"/>

<property name="org.kie.server.pwd" value="adminpassword"/>

<property name="org.kie.server.controller.user" value="adminusername"/>

<property name="org.kie.server.controller.pwd" value="adminpassword"/>


Here value is the user who has admin role.
ii)Update the <security-domain name="other'> tag with following changes .

<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 passwd from Users where username=?"/>

 <module-option name="rolesQuery" value="select role, 'Roles' from UserRoles where username=?"/>

</login-module>

This changes works for me , and i am able to login as db user.


Animesh Tiwari

unread,
May 27, 2020, 2:10:28 AM5/27/20
to jBPM Setup
Thanks Neha prompt reply- I am able to interact with DB and login with DB. Now I am looking at how can reutilize the user creation functionality which is available in the workbench. Current functionality if user create then details store in user.propereties and roles.properties files. 
if I create user using existing functionality in the JBPM workbench then what are changes required to store the user details in the users and userroles tables which are using to validate during login.

Abhijit Humbe

unread,
May 27, 2020, 6:11:25 AM5/27/20
to Animesh Tiwari, jBPM Setup
Its not possible. Users created via workbench can only be stored into properties files.

Abhijit Humbe


To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-setup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-setup/1f6e29b9-8242-410a-9bd1-778f93502ad2%40googlegroups.com.

Animesh Tiwari

unread,
May 27, 2020, 9:37:16 AM5/27/20
to jBPM Setup
thanks, Abhijit for information. Is there any other way to use both users(DB user and properties files user) to login the jbpm?
Reply all
Reply to author
Forward
0 new messages