Add new user into Wso2 CEP into H2 database

142 views Asked by At

I need to add new user in Wso2 CEP (3.1.0) and I know that is possible by "clicking" few steps in console (example from documentation). I wonder if it possible to add new user without login into console, but connect to H2 database and insert user there?

I know that new user is save into "UM_USER" table. Maybe someone knows what class write user into H2, how passowrd is enrcypted and what is "UM_SALT_VALUE" and why I need it?

1

There are 1 answers

2
Rajeev Sampath On BEST ANSWER

If all you want is to manage users programmatically, a better way rather than trying to modify H2 DB is to do it through the relevant admin service. This way you don't have to bother about the underlying user-store or the salt values used for hashing passwords etc.

In Carbon-based products, most of the configurations done through the web console can be done programmatically by calling the relevant admin web service, such as user management, adding/managing deployment artifacts etc.

So for you use case, you can use the User Management admin service at: https://localhost:9443/services/UserAdmin?wsdl

Note that in order to access this wsdl, you should make these admin service wsdl's visible by editing <CEP>/repository/conf/carbon.xml and restart the server.

<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>