Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-2418

CS tool, invalid options are accepted

    XMLWordPrintable

Details

    Description

      Curently if I provide invalid option (e.g. --option_does_not_exists) it is accepted(ignored) and command is performed

      [mchoma@localhost bin]$ java -jar wildfly-elytron-tool.jar credential-store --add myalias --secret supersecretpassword --location="/tmp/test.store" --uri "cr-store://test?modifiable=true;create=true;keyStoreType=JCEKS" --password mycspassword --salt 12345678 --iteration 230 --summary --option_does_not_exists
      Alias "myalias" has been successfully stored
      Credential store command summary:
      --------------------------------------
      /subsystem=elytron/credential-store=test:add(uri="cr-store://test?modifiable=true;create=true;keyStoreType=JCEKS",relative-to=jboss.server.data.dir,credential-reference={clear-text="MASK-uNWeyrmbByBEjgZM1FAPQW==;12345678;230"})
      

      It will be safer if command fail instead. It will guard users from unintentional command beeing performed.

      [mchoma@localhost bin]$ java -jar wildfly-elytron-tool.jar credential-store --add myalias --secret supersecretpassword --location="/tmp/test.store" --uri "cr-store://test?modifiable=true;create=true;keyStoreType=JCEKS" --password mycspassword --salt 12345678 --iteration 230 --summary --option_does_not_exists
      wildfly-elytron-tool: invalid option -- 'option_does_not_exists'
      

      Attachments

        Issue Links

          Activity

            People

              darran.lofthouse@redhat.com Darran Lofthouse
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: