Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-773

tomcat-vault prints it's banner when passed the help argument

XMLWordPrintable

    • Hide

      1) Install tomcat-vault
      2) Run the script with -h/--help:

      $ bin/vault.sh -h
      =========================================================================
      
        Tomcat Vault
      
        VAULT_HOME: /tomcat-vault
      
        JAVA: java
      
      =========================================================================
      
      usage: vault.sh <empty> |  [-a <arg>] [-b <arg>] -c | -h | -x <arg> [-e
             <arg>]  [-i <arg>] [-k <arg>] [-p <arg>] [-s <arg>]
       -a,--attribute <arg>           Attribute name
       -b,--vault-block <arg>         Vault block
       -c,--check-sec-attr            Check whether the secured attribute
                                      already exists in the vault
       -e,--enc-dir <arg>             Directory containing encrypted files
       -h,--help                      Help
       -i,--iteration <arg>           Iteration count
       -k,--keystore <arg>            Keystore URL
       -p,--keystore-password <arg>   Keystore password
       -s,--salt <arg>                8 character salt
       -x,--sec-attr <arg>            Secured attribute value (such as password)
                                      to store
      
      Show
      1) Install tomcat-vault 2) Run the script with -h/--help: $ bin/vault.sh -h ========================================================================= Tomcat Vault VAULT_HOME: /tomcat-vault JAVA: java ========================================================================= usage: vault.sh <empty> | [-a <arg>] [-b <arg>] -c | -h | -x <arg> [-e <arg>] [-i <arg>] [-k <arg>] [-p <arg>] [-s <arg>] -a,--attribute <arg> Attribute name -b,--vault-block <arg> Vault block -c,--check-sec-attr Check whether the secured attribute already exists in the vault -e,--enc-dir <arg> Directory containing encrypted files -h,--help Help -i,--iteration <arg> Iteration count -k,--keystore <arg> Keystore URL -p,--keystore-password <arg> Keystore password -s,--salt <arg> 8 character salt -x,--sec-attr <arg> Secured attribute value (such as password) to store

      When you run the tomcat-vault script with -h (or --help) it prints the scripts whole banner before printing usage. This does not work the same as other CLI tools.

      While we're talking about it, is there a good reason for the script to even print the banner? Most times the JAVA variable is just 'java' and VAULT_HOME doesn't matter to the user because they ran the script from it. It's also noteworthy that tomcat-vault prints the scripts banner and then prints another banner in the VaultTool class:

      $ bin/vault.sh 
      =========================================================================
      
        Tomcat Vault
      
        VAULT_HOME: /tomcat-vault
      
        JAVA: java
      
      =========================================================================
      
      **********************************
      ****  Tomcat Vault  **************
      **********************************
      Please enter a Digit::   0: Start Interactive Session  1: Remove Interactive Session  2: Exit
      

      One of them should be removed.

              rhn-support-csutherl Coty Sutherland
              rhn-support-csutherl Coty Sutherland
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: