Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-518

knoxcli documentation to handle special characters in passwords when passed with --value

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5.0, 0.6.0
    • 0.6.0
    • KnoxCLI
    • RHEL 6, Oracle Java 1.7

    Description

      Documentation update to help explain the following

      When using '--value' to specify a password for create-alias, characters outside of [a-z][A-Z][0-9] need to be single quoted or escaped. Double quotes are used for weak escaping where meta-characters like '$' will be expanded as variables.

      Here are some results. I've added an echo statement to the knoxcli.sh to print what it receives from the arguments.

      Double quotes results in meta-character expansion
      [knox@host bin]$ ./knoxcli.sh create-alias gateway-identity-passphrase-test-3 --value "asdf$jkl;"
      create-alias gateway-identity-passphrase-test-3 --value asdf;
      gateway-identity-passphrase-test-3 has been successfully created.

      Single quote results in a correct password:
      [knox@host bin]$ ./knoxcli.sh create-alias gateway-identity-passphrase-test-3 --value 'asdf$jkl;'
      -echo statement from knoxcli - create-alias gateway-identity-passphrase-test-3 --value asdf$jkl;
      gateway-identity-passphrase-test-3 has been successfully created.

      Per character escaping results in correct password
      [knox@host bin]$ ./knoxcli.sh create-alias gateway-identity-passphrase-test-3 --value asdf\$jkl\;
      -echo statement from knoxcli - create-alias gateway-identity-passphrase-test-3 --value asdf$jkl;
      gateway-identity-passphrase-test-3 has been successfully created.

      Attachments

        1. KNOX-518.patch
          5 kB
          Kristopher Kane

        Activity

          People

            kristopherkane Kristopher Kane
            kristopherkane Kristopher Kane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: