The WSO2 SOA Enablement Server UserStoreTool is used to manage the contents of the WSO2 SOA Enablement Server user store. You can add, edit or remove any user or his properties. User store management can be done locally or remotely as a Web service via SOAP. The UserStoreTool is stored in the bin subdirectory of WSO2 SOA Enablement Server distribution.
The general usage is:
UserStoreTool { -t TARGET_SERVER | --file USERSTORE_FILE } [--option...]
Target Specification
-t target_server - WSO2 SOA Enablement Server to be configured.
--file userstore_file - User store file to be directly updated.
Options
-a user_name - Add new property to user; creates the user when it does not exist.
-p property_name - Name of property to be added (for example, "password","X509Certificate","X509CertificateChain").
-v property_value - Textual value of property (for example, password).
-f property_file - File to be used as property source (for example, certificate files).
--rem user_name - Removes user from user store.
-r user_name - Removes property from user.
--list - List all users in user store.
--ulist user_name - List properties of specified user.
--username user - Username used during authentication process. Not required when working with local file or unsecured WSO2 SOA Enablement Server. User is prompted if required and not set.
--password pass - Password to be used during authentication process. Not required when working with local file or unsecured WSO2 SOA Enablement Server. User is prompted if required and not set.
--secprovider provider - Security provider to be used during authentication process. Not required when working with local file or unsecured WSO2 SOA Enablement Server Server. Server is contacted to obtain required provider if not set by user.
--gui - Graphical version of this tool.
--help - Prints help screen.
--version - Prints version.
To add a new user to the user store, enter the user's name and a list of properties at the command line. The parameters to be passed are summarized below.
[-a user_name [-p property_name [-v property_value|-f property_source_file]+]*]*
For example, if you want to remotely add a user named John to the user store, together with his password, MaryLou, use UserStoreTool as shown below:
UserStoreTool -t http://myserv:6060 -a John -p password -v MaryLou
Adding new properties to an existing user is done the same way as adding a new user (see Adding a New User to the User Store). If a property of the given type already exists in the user store for this user, it is replaced by the newer one.
The UserStoreTool can also remove a specified user property. The code below shows the options that are used to remove properties. UserStoreTool removes all of the specified properties which actually exist for the given user.
[-r user_name [-p property_name]*]*
The code below shows how to use the UserStoreTool to remove the X509Certificate and password from the user John:
UserStoreTool -t http://myserv:6060 -r John -p password -p X509Certificate
To remove a user from the user store, simply use the --rem option followed by the username.
The code below shows how to remove John from the remote user store:
UserStoreTool -t http://localhost:6060 --rem John
The UserStoreTool can also retrieve status of the whole user store or list the properties of a specified user.
The code below shows the command used to retrieve a list of all users and their properties from the local file serverconf.xml:
UserStoreTool --file c:\wasp40\conf\serverconf.xml --list
This command returns the following:
User store info user ID: John properties set: password user ID: filemon properties set: X509Certificate
This output shows that there are two users in the user store. You can trace the properties that are currently defined for each user.
To get a list of all properties defined for the user John on a remote server, use the following command:
UserStoreTool -t http://localhost:6060 --ulist John
To run the GUI version of this tool, use --gui as a parameter to the UserStoreTool command. Use is described in The PStore Tool - GUI Version.