com.metamatrix.common.util.crypto.keymanage
Class FilePasswordConverter

java.lang.Object
  extended by com.metamatrix.common.util.crypto.keymanage.FilePasswordConverter

public class FilePasswordConverter
extends java.lang.Object

Utility used to migrate encrypted passwords in a file from one key to another. This utility supports two types of files: XML (for connector bindings, VDBs, and config XMLs); and properties (for bootstrap properties, config preferences, and materialized view connection properties).


Field Summary
protected  java.util.List converted
           
protected  java.util.List failedDecrypt
           
protected  java.util.List failedEncrypt
           
static int FILE_TYPE_PROPERTIES
           
static int FILE_TYPE_VDB
           
static int FILE_TYPE_XML
           
 
Constructor Summary
FilePasswordConverter(java.lang.String inputFile, java.lang.String outputFile, int fileType, java.lang.String oldkeyFile, java.lang.String newkeyFile)
           
 
Method Summary
 void convert()
           
 void convertProperties()
          decrypt and recrypt any properties that end with "PASSWORD"
 void convertVDB()
          The .VDB file is in zip format, containing one *.DEF file in XML format.
 void convertXML()
          Decrypt and recrypt any the text of any "Property" Elements with attribute "name" that ends with "PASSWORD"
static void main(java.lang.String[] args)
          Main method for running the utility.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_TYPE_XML

public static final int FILE_TYPE_XML
See Also:
Constant Field Values

FILE_TYPE_PROPERTIES

public static final int FILE_TYPE_PROPERTIES
See Also:
Constant Field Values

FILE_TYPE_VDB

public static final int FILE_TYPE_VDB
See Also:
Constant Field Values

converted

protected java.util.List converted

failedDecrypt

protected java.util.List failedDecrypt

failedEncrypt

protected java.util.List failedEncrypt
Constructor Detail

FilePasswordConverter

public FilePasswordConverter(java.lang.String inputFile,
                             java.lang.String outputFile,
                             int fileType,
                             java.lang.String oldkeyFile,
                             java.lang.String newkeyFile)
Method Detail

convert

public void convert()
             throws java.lang.Exception
Throws:
java.lang.Exception

convertXML

public void convertXML()
                throws java.lang.Exception
Decrypt and recrypt any the text of any "Property" Elements with attribute "name" that ends with "PASSWORD"

Throws:
java.lang.Exception
Since:
4.3

convertVDB

public void convertVDB()
                throws java.lang.Exception
The .VDB file is in zip format, containing one *.DEF file in XML format. In the .DEF file, Decrypt and recrypt any the text of any "Property" Elements with attribute "name" that ends with "PASSWORD"

Throws:
java.lang.Exception
Since:
4.3

convertProperties

public void convertProperties()
                       throws java.lang.Exception
decrypt and recrypt any properties that end with "PASSWORD"

Throws:
java.lang.Exception
Since:
4.3

main

public static void main(java.lang.String[] args)
Main method for running the utility. See printUsage() for usage.

Parameters:
args -
Since:
4.3


Copyright © 2009. All Rights Reserved.