Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.5.0, 0.6.0
-
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.