org.jboss.soa.esb.services.security
Class PasswordUtil

java.lang.Object
  extended by org.jboss.soa.esb.services.security.PasswordUtil

public final class PasswordUtil
extends java.lang.Object

Util class that can read a password from a specified file.

This class simply delegated to FilePassword which performs the real work.

Creating a password file

Go to the conf directory of your jboss server instance (eg: default/conf) java -cp ../lib/jbosssx.jar org.jboss.security.plugins.FilePassword welcometojboss 13 testpass passwordFile
  • welcometojboss Is the salt value.
  • testpass Is the clear text password you want to protect.
  • passwordFile Is the name of the file which will contain the encrypted password.
  • Note that this is security by obscurity in that the password is not store in plaintext, but it can be recovered by simply using the code from this class.

    Since:
    4.7
    Author:
    Daniel Bevenius

    Constructor Summary
    PasswordUtil(java.lang.String passwordFile)
               
     
    Method Summary
     char[] getPassword()
               
     java.lang.String getPasswordAsString()
               
    static boolean isPasswordFile(java.lang.String passwordFile)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    PasswordUtil

    public PasswordUtil(java.lang.String passwordFile)
    Method Detail

    getPassword

    public char[] getPassword()
                       throws java.io.IOException
    Throws:
    java.io.IOException

    getPasswordAsString

    public java.lang.String getPasswordAsString()
                                         throws java.io.IOException
    Throws:
    java.io.IOException

    isPasswordFile

    public static boolean isPasswordFile(java.lang.String passwordFile)