Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1164

Wildfly Elytron Tool, credential-store command doesn't support redirection (<, <<) when multiple options are missing which show prompts.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 1.1.0.Beta47
    • None
    • Credential Store
    • None

      Wildfly Elytron Tool, credential-store command doesn't support redirection (<, <<) when multiple options are missing which show prompts.

      User omit --password and --secret options and then get two (four: there is confirmation) prompts but user isn't able to redirect data to second one.

      Expected behaviour is that it must work.

      How to reproduce

      java -jar  wildfly-elytron-tool.jar credential-store --add secret_alias --create -l cs001.jceks  --summary << EOF
      pass123
      pass123
      secret_value
      secret_value
      EOF
      

      has this output:

      Exception encountered executing the command:
      java.lang.Exception: java.io.IOException: Stream closed
              at org.wildfly.security.tool.Command.prompt(Command.java:115)
              at org.wildfly.security.tool.CredentialStoreCommand.execute(CredentialStoreCommand.java:184)
              at org.wildfly.security.tool.ElytronTool.main(ElytronTool.java:75)
      Caused by: java.io.IOException: Stream closed
              at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
              at java.io.BufferedInputStream.read(BufferedInputStream.java:336)
              at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
              at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
              at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
              at java.io.InputStreamReader.read(InputStreamReader.java:184)
              at java.io.BufferedReader.fill(BufferedReader.java:161)
              at java.io.BufferedReader.readLine(BufferedReader.java:324)
              at java.io.BufferedReader.readLine(BufferedReader.java:389)
              at org.wildfly.security.tool.Command.prompt(Command.java:100)
              ... 2 more
      

            rhn-support-ivassile Ilia Vassilev
            hsvabek_jira Hynek Švábek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: