API to create/update users

Posted by daniel.baciu on 12-Jan-2015 04:51

Hi,


Is there an API or a way to create users in BPM programmatically? I have a set of 300 users and I would like to avoid creating  them manually.


Other solution I'm thinking of is to have the user list as a external resource (as DB or LDAP), but i think this is not supported.


Thank you,

Daniel.

Posted by Jawahar Surapaneni on 12-Jan-2015 05:01

Hi Daniel,
There is a UserManagement API, i think this can be used to create users.
 
To create a new user in OEBPM, use addUser() of JDBCRealm class (if using JDBC realm)  OR   LDAPRealm class (if using LDAP realm) of User Management API.
Below is the same script for your reference
 
import java.util.*;
import com.tdiinc.userManager.*;
 
public class testUserMgmtAPI
{
 
JDBCRealm jdr = new JDBCRealm();
 
public void createUser()
{
 System.out.println("Inside create user!!");
jdr.addUser("abc");
JDBCUser tes2=(JDBCUser)jdr.getUser("abc");
tes2.setAttribute("password", "abc");
System.out.println("User added successfully!!!");
 }
public static void main(String[] args)
{
new testUserMgmtAPI().createUser();
}
}
 
 
Regards,
Jawahar.
[collapse]
From: daniel.baciu [mailto:bounce-danielbaciu@community.progress.com]
Sent: 12 January 2015 16:22
To: TU.BPM@community.progress.com
Subject: [Technical Users - BPM] API to create/update users
 
Thread created by daniel.baciu

Hi,


Is there an API or a way to create users in BPM programmatically? I have a set of 300 users and I would like to avoid creating  them manually.


Other solution I'm thinking of is to have the user list as a external resource (as DB or LDAP), but i think this is not supported.


Thank you,

Daniel.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Jawahar Surapaneni on 12-Jan-2015 06:00

Hi Daniel,
If you want to use OpenEdge code, there is another approach to create users in oebpm. We have a feature called Single Point Authentication (aka SPA) which works along with Single Signon (SSO)
We do have a Custom Realm which ships along with the product, which resides at <DLC>\src\samples\security\OpenEdge\Security\Realm
 
Please refer to following link in order to make use of SSO, where we need to create domains
http://documentation.progress.com/output/OpenEdge115/openedge115/#page/bpm-custom/sso-support-for-business-process-server.html
 
The following are the steps that you need to follow in order to configure Single Point Authentication along with Single Sign On feature
 
  1. Open portal in browser before configuring SPA & SSO
  2. Stop servers
  3. Open DLC/oebpm/server/conf /umacl.conf file and change real.type and realm provider as follows
usermgr.realm.type=custom
usermgr.realm.provider=com.savvion.usermanager.OERealm
  1. Open DLC/oebpm/server/conf /bpmportal.conf  and Set bpmportal.customrealm.managegroup to true
  2. Copy paste spaservice.properties file from DLC/src/samples/security to wrk directory
  3. Open proenv and type following and press enter. Copy generated encoded password and paste in spaservice.properties file. Also will generate oespaclient.cp. in work directory
proenv>genspacp -password admin
  1. Copy  oespaclient.cp from wrk to DLC/oebpm/server/conf directory
  2. In DLC/oebpm/server/conf /umacl.conf file, change oeauth.server.clientprincipal from spadefault.cp to oespaclient.cp
  3. Start servers and check logging into portal with admin/admin. Observe that error comes
  4. Create empty db in pdsoe
  5. Create an appserver project and copy files from following location (by maintaining the folder structure as it is from Openedge in appserver project. Ex: OEAAppsrvr\AppServer\OpenEdge\Security\Realm, OEAAppsrvr\AppServer\OpenEdge\Security\Util)
DLC\src\samples\security\OpenEdge\Security\Realm
DLC\src\samples\security\OpenEdge\Security\Util
  1. Create database and sql connection and assign to project for the empty db
  2. Create a .p file with following content and run the p file
                              CREATE <dbname>._User.
ASSIGN _User._Userid = "testuser"
_User._Password = " testuser "
_User._User_number = 1900
_User._Create_date = NOW
_User._Given_name = "Administrator"
_User._Telephone = "9848098480"
_User._Email = " admin@progress.com"
_User._Description = "SampleDescription"
 
 
 
  1. Add database to bpsbroker from run configuration and start server
  2. Add project to broker and publish
  3. Now login to portal with oebpm credentials and observe that now we are able to login
 
 
Step to configure SSO other than oebpm domain
 
  1. As we have domain other than bpm i.e., here oepbm. For sso we need to Create a file with name bpm_domain_registry.csv. and add domain names and their corresponding access codes in a Comma Separated Value(oebpm,oebpm)
  2. Just restart the BP servers
 
For the Custom Realm, we do have a document SPAInstructions.pdf (resides at <DLC> \src\samples\security)  which gives detailed instructions.
 
 
Regards,
Jawahar.
 
 
[collapse]
From: daniel.baciu [mailto:bounce-danielbaciu@community.progress.com]
Sent: 12 January 2015 16:50
To: TU.BPM@community.progress.com
Subject: RE: [Technical Users - BPM] API to create/update users
 
Reply by daniel.baciu

Hi Jawahar.

Than you for quick answer.

I would prefer an Openedge code.  Is there a documentation for this API? I'm interested in how to set other attributes and how assign the new users to certain groups.

Thank you.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

All Replies

Posted by Jawahar Surapaneni on 12-Jan-2015 05:01

Hi Daniel,
There is a UserManagement API, i think this can be used to create users.
 
To create a new user in OEBPM, use addUser() of JDBCRealm class (if using JDBC realm)  OR   LDAPRealm class (if using LDAP realm) of User Management API.
Below is the same script for your reference
 
import java.util.*;
import com.tdiinc.userManager.*;
 
public class testUserMgmtAPI
{
 
JDBCRealm jdr = new JDBCRealm();
 
public void createUser()
{
 System.out.println("Inside create user!!");
jdr.addUser("abc");
JDBCUser tes2=(JDBCUser)jdr.getUser("abc");
tes2.setAttribute("password", "abc");
System.out.println("User added successfully!!!");
 }
public static void main(String[] args)
{
new testUserMgmtAPI().createUser();
}
}
 
 
Regards,
Jawahar.
[collapse]
From: daniel.baciu [mailto:bounce-danielbaciu@community.progress.com]
Sent: 12 January 2015 16:22
To: TU.BPM@community.progress.com
Subject: [Technical Users - BPM] API to create/update users
 
Thread created by daniel.baciu

Hi,


Is there an API or a way to create users in BPM programmatically? I have a set of 300 users and I would like to avoid creating  them manually.


Other solution I'm thinking of is to have the user list as a external resource (as DB or LDAP), but i think this is not supported.


Thank you,

Daniel.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by daniel.baciu on 12-Jan-2015 05:19

Hi Jawahar.

Than you for quick answer.

I would prefer an Openedge code.  Is there a documentation for this API? I'm interested in how to set other attributes and how assign the new users to certain groups.

Thank you.

Posted by Jawahar Surapaneni on 12-Jan-2015 06:00

Hi Daniel,
If you want to use OpenEdge code, there is another approach to create users in oebpm. We have a feature called Single Point Authentication (aka SPA) which works along with Single Signon (SSO)
We do have a Custom Realm which ships along with the product, which resides at <DLC>\src\samples\security\OpenEdge\Security\Realm
 
Please refer to following link in order to make use of SSO, where we need to create domains
 
The following are the steps that you need to follow in order to configure Single Point Authentication along with Single Sign On feature
 
  1. Open portal in browser before configuring SPA & SSO
  2. Stop servers
  3. Open DLC/oebpm/server/conf /umacl.conf file and change real.type and realm provider as follows
usermgr.realm.type=custom
usermgr.realm.provider=com.savvion.usermanager.OERealm
  1. Open DLC/oebpm/server/conf /bpmportal.conf  and Set bpmportal.customrealm.managegroup to true
  2. Copy paste spaservice.properties file from DLC/src/samples/security to wrk directory
  3. Open proenv and type following and press enter. Copy generated encoded password and paste in spaservice.properties file. Also will generate oespaclient.cp. in work directory
proenv>genspacp -password admin
  1. Copy  oespaclient.cp from wrk to DLC/oebpm/server/conf directory
  2. In DLC/oebpm/server/conf /umacl.conf file, change oeauth.server.clientprincipal from spadefault.cp to oespaclient.cp
  3. Start servers and check logging into portal with admin/admin. Observe that error comes
  4. Create empty db in pdsoe
  5. Create an appserver project and copy files from following location (by maintaining the folder structure as it is from Openedge in appserver project. Ex: OEAAppsrvr\AppServer\OpenEdge\Security\Realm, OEAAppsrvr\AppServer\OpenEdge\Security\Util)
DLC\src\samples\security\OpenEdge\Security\Realm
DLC\src\samples\security\OpenEdge\Security\Util
  1. Create database and sql connection and assign to project for the empty db
  2. Create a .p file with following content and run the p file
                              CREATE <dbname>._User.
ASSIGN _User._Userid = "testuser"
_User._Password = " testuser "
_User._User_number = 1900
_User._Create_date = NOW
_User._Given_name = "Administrator"
_User._Telephone = "9848098480"
_User._Email = " admin@progress.com"
_User._Description = "SampleDescription"
 
 
 
  1. Add database to bpsbroker from run configuration and start server
  2. Add project to broker and publish
  3. Now login to portal with oebpm credentials and observe that now we are able to login
 
 
Step to configure SSO other than oebpm domain
 
  1. As we have domain other than bpm i.e., here oepbm. For sso we need to Create a file with name bpm_domain_registry.csv. and add domain names and their corresponding access codes in a Comma Separated Value(oebpm,oebpm)
  2. Just restart the BP servers
 
For the Custom Realm, we do have a document SPAInstructions.pdf (resides at <DLC> \src\samples\security)  which gives detailed instructions.
 
 
Regards,
Jawahar.
 
 
[collapse]
From: daniel.baciu [mailto:bounce-danielbaciu@community.progress.com]
Sent: 12 January 2015 16:50
To: TU.BPM@community.progress.com
Subject: RE: [Technical Users - BPM] API to create/update users
 
Reply by daniel.baciu

Hi Jawahar.

Than you for quick answer.

I would prefer an Openedge code.  Is there a documentation for this API? I'm interested in how to set other attributes and how assign the new users to certain groups.

Thank you.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Akioma on 19-Jan-2015 06:48

Hi,

we are already using the SSO version to use our own user management system from within OEBPM.

Unfortunately this only works for users, not for groups (OE 11.3). Is there a way to also make our groups available for OEBPM through SSO?   If not, what would be the easiest way to create those groups in OEBPM?

Thanks,

Mike

Posted by Jawahar Surapaneni on 19-Jan-2015 07:28

Hi Mike,
I think we do support only creation of Users from SPA-SSO and not Groups.
If you want to create Groups, the easiest way would be to run populateJDBCRealm.cmd . But this is for the JDBC realm.
 
Normally, you can fill out the groups list in the ums_groups files which resides at <DLC>\oebpm\server\conf\filerealm  path. Once done, from <DLC>\oebpm\server\bin path run  populateJDBCRealm.cmd PAKRealm command
 
Regards,
Jawahar.
 
 
[collapse]
From: Akioma [mailto:bounce-Akioma@community.progress.com]
Sent: 19 January 2015 18:19
To: TU.BPM@community.progress.com
Subject: RE: [Technical Users - BPM] API to create/update users
 
Reply by Akioma

Hi,

we are already using the SSO version to use our own user management system from within OEBPM.

Unfortunately this only works for users, not for groups (OE 11.3). Is there a way to also make our groups available for OEBPM through SSO?   If not, what would be the easiest way to create those groups in OEBPM?

Thanks,

Mike

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Tom Oosterwijk on 04-Aug-2017 08:07

I was wondering whether the api could be used to update user settings, but already found it can easily be done by doing

realm.getUser(userName).setAttribute(attribute, value);

This thread is closed