[jboss-jira] [JBoss JIRA] (WFLY-8191) CS tool, review usage documentation

Martin Choma (JIRA) issues at jboss.org
Wed Feb 22 04:29:00 EST 2017


Martin Choma created WFLY-8191:
----------------------------------

             Summary: CS tool, review usage documentation
                 Key: WFLY-8191
                 URL: https://issues.jboss.org/browse/WFLY-8191
             Project: WildFly
          Issue Type: Bug
          Components: Security
            Reporter: Martin Choma
            Assignee: Darran Lofthouse
            Priority: Critical


Current usage output
{code}
usage: java -jar wildfly-elytron-tool.jar credential-store <sub-command>
       <options> -a <arg> | -e <arg> | -h | -r <arg> | -v [-c]  [-f]  [-i
       <arg>] [-l <arg>] [-p <arg>]  [-s <arg>] [-t <arg>] [-u <arg>]  [-x
       <arg>]
 -a,--add <arg>         Add new alias to the credential store
 -c,--create            Create credential store [true/false]
 -e,--exists <arg>      Check if alias exists within the credential store
 -f,--summary           Print summary, especially command how to create
                        this credential store
 -h,--help              Get help with usage of this command
 -i,--iteration <arg>   Iteration count for for final masked password of
                        the credential store
 -l,--location <arg>    Location of credential store storage file
 -p,--password <arg>    Password for credential store
 -r,--remove <arg>      Remove alias from the credential store
 -s,--salt <arg>        Salt to apply for final masked password of the
                        credential store
 -t,--type <arg>        Credential store type
 -u,--uri <arg>         Configuration URI for credential store
 -v,--aliases           Display all aliases
 -x,--secret <arg>      Password credential value
{code}

IMO suffers with these issues:
- it introduce misleading <sub-command> placeholder. It is not used now. It is prepared for future needs. Remove it please.
- it is not obvious which options are required in conjuction with e.g. --add option
- use GNU usage syntax. e.g. [] instead of <>
- sometimes it will be more useful to replace <arg> with some meaningful name, e.g. --add alias


I suggest something like
{code}
java -jar wildfly-elytron-tool.jar credential-store required_option [options]
java -jar wildfly-elytron-tool.jar credential-store --add alias -u arg ... [-c] ...
java -jar wildfly-elytron-tool.jar credential-store --remove alias -u arg [-c] ...
...

One of these is required
  -a,--add alias         Add new alias to the credential store
  -e,--exists alias      Check if alias exists within the credential store
  -h,--help              Get help with usage of this command
  -r,--remove alias      Remove alias from the credential store
  -v,--aliases           Display all aliases

Options
  -c,--create            Create credential store [true/false]
  -f,--summary           Print summary, especially command how to create this credential store
  -i,--iteration count   Iteration count for for final masked password of the credential store
  -l,--location file    Location of credential store storage file
  -p,--password store_password    Password for credential store
  -s,--salt arg        Salt to apply for final masked password of the credential store
  -t,--type arg        Credential store type
  -u,--uri arg         Configuration URI for credential store
  -x,--secret value      Password credential value
{code}




--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list