Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14235

a correction of cli does not work in non-interactive mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.1.0.GA
    • CLI
    • None

    Description

      In interactive mode, the following command works:

      $ $JBOSS_HOME/bin/jboss-cli.sh -c
      [standalone@localhost:9999 /] /core-service=vault:add(vault-options=[("KEYSTORE_URL" => "$JBOSS_HOME/vault/vault.jceks"), ("KEYSTORE_PASSWORD" => "MASK-0FAv5VyF2xzpgo.HNquAFr"), ("KEYSTORE_ALIAS" => "vault"), ("SALT" => "12345678"),("ITERATION_COUNT" => "33"), ("ENC_FILE_DIR" => "$JBOSS_HOME/vault/")])
      {"outcome" => "success"}
      [standalone@localhost:9999 /] 
      

      But, in one-liner non-interactive mode, it does not work:

      $ $JBOSS_HOME/bin/jboss-cli.sh -c "/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "$JBOSS_HOME/vault/vault.jceks"), ("KEYSTORE_PASSWORD" => "MASK-0FAv5VyF2xzpgo.HNquAFr"), ("KEYSTORE_ALIAS" => "vault"), ("SALT" => "12345678"),("ITERATION_COUNT" => "33"), ("ENC_FILE_DIR" => "$JBOSS_HOME/vault/")])"
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0158: Operation handler failed: org.jboss.as.server.services.security.VaultReaderException: WFLYSRV0076: Error initializing vault --  org.jboss.security.vault.SecurityVaultException: PBOX00121: Option KEYSTORE_URL is null or empty",
          "rolled-back" => true
      }
      

      Removing '(' and ')', it works:

      $ $JBOSS_HOME/bin/jboss-cli.sh -c "/core-service=vault:add(vault-options=["KEYSTORE_URL" => "$JBOSS_HOME/vault/vault.jceks", "KEYSTORE_PASSWORD" => "MASK-0FAv5VyF2xzpgo.HNquAFr", "KEYSTORE_ALIAS" => "vault", "SALT" => "12345678","ITERATION_COUNT" => "33", "ENC_FILE_DIR" => "$JBOSS_HOME/vault/"])"
      {"outcome" => "success"}
      $
      

      Looks like a correction works in interactive mode. It should work as well in non-interactive mode.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-iweiss Ingo Weiss
              rhn-support-hokuda Hisanobu Okuda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: