Tuesday, March 8, 2011

Password retrieval Websphere

Ref:
WebSphere Password Decoder

Most of the times we cannot recall the database passwords configured in Websphere AS.
If you ever need to decode a password use the following tip.

Passwords are stored in resource.xml or security.xml in encoded (not encrypted) form.
To decode, WAS provides a class which does that.
java -classpath /deploytool/itp/plugins/com.ibm.websphere.v61_6.1.200/ws_runtime.jar com.ibm.ws.security.util.PasswordDecoder "{password with {xor}}"

For WAS versions 7 and more,
java -Djava.ext.dirs=/deploytool/itp/plugins/com.ibm.websphere.v7_7.0.1.v20090422_1423/wasJars/ -cp securityimpl.jar com.ibm.ws.security.util.PasswordDecoder "{password with {xor}}"

Remember that you need double quotes around password and it works only for older than 7.0 versions.