mPower Configuration and Deployment
LeasePak Documentation Suite NETSOL website
Web Services API (mPower) Server

Web Services API symbol Web Services API (mPower) Server

mPower Configuration and Deployment

To configure and deploy mPower, users will need to set parameters in web.xml and leasepak.xml. For security reasons, LeasePak now includes support of dynamic user authentication modes. For details, see LeasePak.xml, web.xml and Dynamic User Authentication Modes sections of this document.

mPower Deployment

  • Deployment requires a minimum of 50 MB disk space.

  • Deploy mPower as you would any other WAR file.

leasepak.xml

Edit the following parameters in leasepak.xml, located in the mpower/WEB-INF/envs directory:

    <HOST>leasepak_server</HOST>
    <PORT>mPowerd_port</PORT>
    <VERS>leasepak_version</VERS>
    <ENVR>leasepak_environment</ENVR>


where leasepak_server is the IP address or name of your LeasePak server, leasepak_environment is the name of the LeasePak environment, and mPowerd_port is the TCP port number for the mPowerd daemon (not the leasepak daemon).


web.xml

Edit the environment variable in the web.xml file, located in the mpower/WEB-INF directory.

<!-- ************************************** -->
<!-- ENVIRONMENT VARIABLE ENTRIES  -->
<!-- ************************************** -->

<env-entry>
    <env-entry-name>authmode</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>PLAIN</env-entry-value>
  </env-entry>

<!-- note these two may need site customization -->
<!-- this is the API username -->
<!-- use API username and password for plain mode. -->

<env-entry>
<env-entry-name>apiuid</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>api_username_value</env-entry-value>
</env-entry>

<!-- this is the API password -->
<env-entry>
<env-entry-name>apipwd</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>api_password_value</env-entry-value>
</env-entry>

<!-- this is for encrypted mode -->
  <env-entry>
    <env-entry-name>EncryptedFilename</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>mpcipher.dat</env-entry-value>
  </env-entry>

<!-- this is for ADFS mode -->
  <env-entry>
    <env-entry-name>authmode</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>ADFS</env-entry-value>
  </env-entry>

where the API user name is the account you have designated for use with the mPower server and the API password is the LeasePak client string password created for the account.

Dynamic User Authentication Modes

There are four authentication modes supported for security reasons to access web service. The leasepak.xml settings would be same for each of the authentication mode. For examples, see leasepak.xml and web.xml section of this document. Following are four authentication modes:
  1. PLAIN: By default available authentication mode and requires user credentials same as LeasePak client user id and password. Users will need to set the credentials in web.xml and set the leasepak environment name in leasepak.xml file. See web.xml and leasepak.xml for examples.
  2. ENCRYPTED: This mode allows users to use static user credentials. The encrypted file can be created by util 101. Place the created file mcipher.dat in WEB-INF/envs directory. Users will need to set the credentials in web.xml and set the leasepak environment name in leasepak.xml file. See web.xml and leasepak.xml for examples.
  3. HEADER: Use this mode to add the dynamic user credentials in SOAP header request call. The SOAP header request call will have the following parameters:
    <soapenv:Header>
    <auth>
    	<login>
    	    <user>api_username_value</user>
    	    <pass>api_password_value</pass>
    	</login>
    </auth>
    </soapenv:Header>
    
    For header authentication mode, no need to set parameters in web.xml.
  4. ENVIRONMENT: Use this mode for dynamic user credentials with environment information in SOAP Header request call instead of setting the parameters in leasepak.xml. For example:
    <soapenv:Header>
    <auth>
    	<login>
    	  <user>api_username_value</user>
    	  <pass>api_password_value</pass>
    	</login>
    <server>
    	<host>server_name</host>
    	<port>mpower_port</port>
    	<envr>environment_name</envr>
    	<vers>version_number</vers>
    
    </server>
    </auth>
    </soapenv:Header>
    
  5. ADFS: Use this mode for dynamic user credentials with username and verified token number in SOAP Header request call instead of setting the parameters in leasepak.xml. For example:
    <soapenv:Header>
    <auth>
    	<login>
    	  <user>api_username_value</user>
    	  <token>adfs_token_value</token>
    	</login>
    </auth>
    </soapenv:Header>
    
    For environment authentication mode, no need to set parameters in web.xml and leasepak.xml.