You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kristopher Kane (JIRA)" <ji...@apache.org> on 2015/03/09 20:05:38 UTC

[jira] [Created] (KNOX-518) knoxcli documentation to handle special characters in passwords when passed with --value

Kristopher Kane created KNOX-518:
------------------------------------

             Summary: knoxcli documentation to handle special characters in passwords when passed with --value
                 Key: KNOX-518
                 URL: https://issues.apache.org/jira/browse/KNOX-518
             Project: Apache Knox
          Issue Type: Bug
          Components: KnoxCLI
    Affects Versions: 0.5.0
         Environment: RHEL 6, Oracle Java 1.7 
            Reporter: Kristopher Kane


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)