2 Replies Latest reply on Jul 12, 2018 4:44 PM by venkat c

    Error while using cli to add vault options

    venkat c Newbie

      </extensions>

      <vault>

        <vault-option name="KEYSTORE_URL" value="keystore"/>

        <vault-option name="KEYSTORE_PASSWORD" value="MASK-34rTerOwqPfSD"/>

        <vault-option name="KEYSTORE_ALIAS" value="vault"/>

        <vault-option name="SALT" value="abcd1234"/>

        <vault-option name="ITERATION_COUNT" value="120"/>

        <vault-option name="ENC_FILE_DIR" value="pathtodir"/>

      </vault><management>

       

      I am using the below command to add using cli

      /host=master/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "keystore"),("KEYSTORE_PASSWORD" => "MASK-34rTerOwqPfSD"),("KEYSTORE_ALIAS" => "vault"),("SALT" => "abcd1234"),("ITERATION_COUNT" => "50"),("ENC_FILE_DIR" => "pathtodir")])  

       

      While adding using cli I am facing this error

      -bash: syntax error near unexpected token `vault-options=['

       

      Can anyone help me with this. Thanks in advance.

        • 1. Re: Error while using cli to add vault options
          Martin Choma Master

          How exactly your command look like? This is bash error so you have wrongly formatted the command. CLI command you mentioned should work in ./jboss-cli.sh -c.

           

          Btw. vault is deprecated. Consider migrating to Elytron Credential Store.

          • 2. Re: Error while using cli to add vault options
            venkat c Newbie

            This is the latest one

             

            [domain@host:9000 /] echo-dmr ./core-service=vault:add(vault-option=[("KEYSTORE_URL" => "vault.keystore"),("KEYSTORE_PASSWORD" => "MASK-34rTerOwqPfSD"),("KEYSTORE_ALIAS" => "vault"),("SALT" => "abcd1234"),("ITERATION_COUNT" => "50"),("ENC_FILE_DIR" => "pathtodir")])

            {

                "address" => [("core-service" => "vault")],

                "operation" => "add",

                "vault-option" => [

                    ("KEYSTORE_URL" => "vault.keystore"),

                    ("KEYSTORE_PASSWORD" => "MASK-34rTerOwqPfSD"),

                    ("KEYSTORE_ALIAS" => "vault"),

                    ("SALT" => "abcd1234"),

                    ("ITERATION_COUNT" => "50"),

                    ("ENC_FILE_DIR" => "pathtodir")

                ]

             

            Do you have any idea about this?