• Entries (RSS)
  • Comments (RSS)

Retrieving Merchant Key value from WebSphere Commerce Server

Posted by | Posted in WebSphere Commerce | Posted on 23-08-2010

Tagged Under : , , ,

Retrieving Merchant Key value from WebSphere Commerce Server

Merchant Key

The merchant key is the encryption key used in WebSphere Commerce Server. Merchant key is a 16 digit hexadecimal number that has at least one numeric character, at least one alphabetic character (a-f) with no upper case letter. The merchant key cannot contain the same character more than four times and four consecutive occurrence of the same character is not allowed. The merchant key will be present in WebSphere commerce instance xml file in encrypted format. To get the plain text version of the merchant key, place the following text in any WCS view and run it on the server.

<%
	System.out.println("Merchant Key :"+com.ibm.commerce.server.ConfigProperties.singleton().getMerchantKey());
%>

Reset password in WCS

Posted by | Posted in WebSphere Commerce | Posted on 22-08-2010

Tagged Under : , , ,

Resetting user password in WCS

There will be situations where you may have forgotten the password of a user and you want to reset the password in WCS. In WebSphere Commerce all the passwords are one way encrypted with a salt and Merchant Key. The main purpose of a salt is to add more security to storing passwords. With the help of Salt during encrypting the password, WCS makes sure that two users that have the same password will not have the same encrypted string as their password.

Reset by updating DB
Resetting the password is easy if you already know the password of at least one user. For e.g.: if you already know the password of user with users_id 9000 and you want to reset the password of user with users_id = 9001, then execute the following query in the database.

UPDATE USERREG SET LOGONPASSWORD = (SELECT LOGONPASSWORD FROM USERREG WHERE USERS_ID = 9000), SALT = (SELECT SALT FROM USERREG WHERE USERS_ID = 9000), PASSWORDINVALID= (SELECT PASSWORDINVALID FROM USERREG WHERE USERS_ID = 9000), STATUS = (SELECT STATUS FROM USERREG WHERE USERS_ID = 9000) WHERE USERS_ID=9001;

Now user 9001 can login with user 9000′s password. In the above case we copied the details like salt, logonpassword etc of user 9000 to user 9001

Reset with the help of wcs_password utility.
Consider case where you do not know the password any of the users. Now to reset the password you need to generate the password by yourself. To generate the encrypted password for any string, WCS has a utility, ‘wcs_password’. wcs_password utility takes three parameter as the input. The syntax for wcs_password utility is given below

wcs_password <password> <salt> <key>

Where password is the new password, salt is the salt for the user and key is the Merchant Key

Once we provide all these details, the command will give the encrypted password in both ASCII and hex format. Take the ASCII formatted string and update the USERREG.LOGONPASSWORD column with that value. E.g.: The SQL to update the password for wcsadmin is given below

UPDATE userreg SET logonpassword='output of wcs_password utility' WHERE logonid = 'wcsadmin'

Now you can login with the new password.

The wcs_password.bat utility will be available in your bin directory.

Reset with chgwcspwd utility
The third way of resetting the password is with the help of chgwcspwd utility. This utility changes the password directly in the db. So we do not need to execute any SQL commands by our own. But this tool is available only in IBM iSeries. So I have not tried this yet. The syntax to use this utility is

chgwcspwd.sh -database <dbname> -dbHostname <db host name> -schema <schema name> -instance <instance name> -instancePwd <db password>-merKey <key> -wcsUser <wcs username> -wcsUserPwd <user's new password>

Find the version in WebSphere Commerce Developer

Posted by | Posted in WebSphere Commerce | Posted on 16-03-2010

Tagged Under : , , ,

Finding the version of WebSphere Commerce Developer.

Have you ever came across a situation like you want to know the version of WebSphere Commerce Product you are using and have no idea where to look for? I had. I know how to do this in WebSphere Commerce Developer 5.6.1 and the previous versions but not in WCS 6.

So to find the location of WebSphere Commerce Developer’s version, go to %WC_DEVELOPER_INSTALl_DIR%\properties\version\ and open file COMMERCE.product. In this file you can see a tag named version. This tag will have the version of WebSphere Commerce we are using.

WebSphere Commerce feature pack installation

Posted by | Posted in WebSphere Commerce | Posted on 14-03-2010

Tagged Under : , , ,

WebSphere Commerce Feature pack installation

WebSphere Commerce Feature pack installation is a straight forward job. Follow the below steps for installation of Feature packs in your machine. In order to install feature packs our WCS installation needs to be in some desired fix level. So the first thing is to apply the required fix levels in our WC installation.

We need WebSphere Commerce Update installer for installing WCS fix packs. So follow the below steps to install WebSphere Commerce update installer.

1. Download WebSphere Commerce Update installer from location

http://www.ibm.com/support/docview.wss?uid=swg24013502

2. Extract the contents and double click on install.exe and follow onscreen instructions. Please make sure that there is no space in your directory structure.

Too simple? Yeah we are done with the installation of WCS update installer. Now let us apply the fix packs to make our WCS installation to the required level.

3. Download the latest WCS fix pack from http://www-01.ibm.com/support/docview.wss?rs=3046&uid=swg21246009. I have downloaded fix pack 9 (6.0.0-WS-WCDeveloper-FP009.pak) from here.

4. Save the fix pack to %WCS_UPDATE_INSTALL_DIRECTORY%/maintenance directory.

5. Open WebSphere Commerce update installer.(Just double click on the update.bat from %WCS_UPDATE_INSTALL_DIRECTORY% )

6. Specify the WebSphere Commerce Developer installation directory, and click next.

7. Select Install Maintenance Package. Click Next.

8. Select the %WCS_UPDATE_INSTALL_DIRECTORY%/maintenance directory and click next.

9. Select the 6.0.0-WS-WCDeveloper-FP009.pak file and click next.

10. You are prompted to update the database. Select Yes to update your database automatically.

11. On the summary page, review the information and click Next.

12. Fix pack installation begin and the final screen will be displayed with a success message on the screen. If it failed please check the log files for trouble shooting. Click on Finish from this screen

13. Download the WebSphere Commerce feature pack package and extract to a temporary location

14. Double click on install.bat. The installation wizard opens. Click on Next

15. Accept the license agreement. Click on Next

16. Production selection page opens. Select the location where you have installed WebSphere Commerce Developer on this page. Click On Next

17. Installation summary page will be displayed. Click on Next

18. Click on Finish in installation result page

We have successfully installed the WCS feature pack in our machine.

WebSphere Commerce URLs

Posted by | Posted in WebSphere Commerce | Posted on 11-03-2010

Tagged Under : , ,

WebSphere Commerce URLs

This post is more to me. I usually find it difficult to remember different WebSphere Commerce URLs like commerce accelerator, org admin console etc. So I just want to keep all these URLs together in one place so that any time I can access it anytime I want :-)

Administration Console Logon
https://localhost:8002/webapp/wcs/admin/servlet/ToolsLogon?XMLFile=adminconsole.AdminConsoleLogon

WebSphere Commerce Accelerator Logon
https://localhost:8000/webapp/wcs/tools/servlet/ToolsLogon?XMLFile=common.mcLogon

Organization Administration Console Logon
https://localhost:8004/webapp/wcs/orgadmin/servlet/ToolsLogon?XMLFile=buyerconsole.BuyAdminConsoleLogon&storeId=0

DB Access
http://localhost/webapp/wcs/admin/servlet/db.jsp

Advanced B2B Direct starter store
https://localhost/webapp/wcs/stores/servlet/AdvancedB2BDirect/index.jsp

Consumer Direct starter store
https://localhost/webapp/wcs/stores/servlet/ConsumerDirect/index.jsp

Commerce Plaza starter store
http://localhost/webapp/wcs/stores/servlet/CommercePlaza/index.jsp

Supply chain starter store
http://localhost/webapp/wcs/stores/servlet/CommercePlaza/index.jsp

Madisons Web2 store
http://localhost/webapp/wcs/stores/servlet/Madisons2/index.jsp