[jboss-jira] [JBoss JIRA] (ELY-1164) Wildfly Elytron Tool, credential-store command doesn't support redirection (<, <<) when multiple options are missing which show prompts.

Hynek Švábek (JIRA) issues at jboss.org
Wed May 17 08:55:00 EDT 2017


Hynek Švábek created ELY-1164:
---------------------------------

             Summary: Wildfly Elytron Tool, credential-store command doesn't support redirection (<, <<)  when multiple options are missing which show prompts.
                 Key: ELY-1164
                 URL: https://issues.jboss.org/browse/ELY-1164
             Project: WildFly Elytron
          Issue Type: Bug
            Reporter: Hynek Švábek
            Assignee: Darran Lofthouse
            Priority: Blocker


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*
{code}
java -jar  wildfly-elytron-tool.jar credential-store --add secret_alias --create -l cs001.jceks  --summary << EOF
pass123
pass123
secret_value
secret_value
EOF
{code}

*has this output:*
{code}
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
{code}




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



More information about the jboss-jira mailing list