Security utilities  Encrypting a password (encode_passwd)

Chapter 6: Security

Using the csi-tool.jar utility

The csi-tool.jar is a command line utility to manage CSI security. Use arguments to carry out various activities. For example, you can use the encmessage argument to encrypt a text string.

StepsUsing csi-tool.jar

  1. Navigate to the following directory:

    SYBASE\tomcat\webapps\onepage\WEB-INF\lib

    If csi-tool.jar is executed directly, you must be in this directory, because it must be in the same directory as commons-logging.jar.

  2. Run the tool using one of these methods:

    java -jar csi-tool.jar
    

    or

    java -classpath csi-tool.jar com.sybase.security.
    tools.CSITool
    

    Usage instructions for all task names display on the window. Alternatively, you can enter the following to get detailed argument descriptions for a specific task name:

    java -jar csi-tool.jar taskname help
    
  3. Issue your command, using the usage information. Table 6-4 shows required and optional arguments.

    Table 6-4: csi-tool.jar arguments

    Argument name

    Argument description

    Argument type

    Argument default value

    Required arguments

    keyStoreAlias

    Specify the alias name in the keystore

    string

    keyStoreAliasPassword

    Specify the alias password

    password

    keyStoreLocation

    Specify the path to a keystore

    readable file

    keyStorePassword

    Specify the password to access the keystore

    password

    text

    The text to be encrypted or decrypted

    string

    encmessage

    Encrypt a text string

    Optional arguments

    cipherMode

    Indicate encrypt or decrypt operation (encrypt/decrypt)

    choice

    encrypt

    cipherProvider

    Specify the name of cipher provider

    string

    cipherTransformation

    Specify the transformation to be used by cipher

    string

    AES

    cipherStoreProvider

    Specify the keystore provider

    string

    keyStoreType

    Specify the keystore type

    string

    useCertificate

    Specify whether the key or certificate associated with an alias in the keystore is to be used

    boolean

    false

StepsEncrypting a string using csi-tool.jar

Use the encmessage argument to encrypt a string of text using specified options. This is useful for encrypting and decrypting sensitive configuration parameters in the CSI configuration file.

  1. Set up the csi-tool.jar environment and run the tool using instructions in “Using csi-tool.jar”.

  2. Issue your command, using the usage information in Table 6-4. For example, to encrypt the following message string:

    encmessage text user_password
    

    An encrypted message string displays.

  3. You can cut and paste the encrypted message string into the destination file.





Copyright © 2005. Sybase Inc. All rights reserved. Encrypting a password (encode_passwd)

View this book as PDF