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

[GSS](7.0.z) default bin/jboss-cli.xml has wrong version number

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.6.CR1, 7.0.6.GA
    • 7.0.1.GA
    • CLI
    • None
    • Hide

      1. Start with default install of EAP 7.0 with a custom vault defined in /modules.
      2. In jboss-cli.xml, configure for SSL, using vault entry for password, example:

      <ssl>
      <vault code="com.tom.customvault.CustomVault" module="com.tom.customvault">
      <vault-option name="KEYSTORE_URL" value="/Users/tmanor/jboss/jboss-eap-7.0/vault/genericvault.jks"/>
      <vault-option name="KEYSTORE_PASSWORD" value="MASK-3YwnYRVCWdbw.3PTju8mhY"/>
      <vault-option name="KEYSTORE_ALIAS" value="genericvault"/>
      <vault-option name="SALT" value="12438567"/>
      <vault-option name="ITERATION_COUNT" value="50"/>
      <vault-option name="ENC_FILE_DIR" value="/Users/tmanor/jboss/jboss-eap-7.0/vault/"/>
      </vault>
      <trust-store>/Users/tmanor/jboss/jboss-eap-7.0/vault/admin.jks</trust-store>
      <trust-store-password>VAULT::jbossAdmin::password::1</trust-store-password>
      </ssl>

      3. run ./jboss-cli.sh --connect to establish connection to server, and receive the following error/exception:

      tmanor-OSX:bin tmanor$ ./jboss-cli.sh --connect
      Failed to parse /Users/tmanor/jboss/jboss-eap-7.0/bin/jboss-cli.xml: Unexpected element

      {urn:jboss:cli:2.0}

      vault-option at Line number = 44
      Column number = 113
      System Id = null
      Public Id = null
      Location Uri= null
      CharacterOffset = 1551

      4. Change namespace schema reference to use wildfliy-cli_3_0.xsd schema version (<jboss-cli xmlns="urn:jboss:cli:3.0">).

      5. Rerun ./jboss-cli.sh --connect, and receive the following:

      tmanor-OSX:bin tmanor$ ./jboss-cli.sh --connect
      CustomVault: init called...
      key=SALT, value=12438567
      key=ENC_FILE_DIR, value=/Users/tmanor/jboss/jboss-eap-7.0/vault/
      key=ITERATION_COUNT, value=50
      key=KEYSTORE_PASSWORD, value=MASK-3YwnYRVCWdbw.3PTju8mhY
      key=KEYSTORE_URL, value=/Users/tmanor/jboss/jboss-eap-7.0/vault/genericvault.jks
      key=KEYSTORE_ALIAS, value=genericvault
      CustomVault: retrieve called...
      arg0=jbossAdmin
      arg1=password
      arg2=1
      [standalone@localhost:9990 /]

      6. Verfy that jboss-cli.xml file reference 3.0 namespace schema xmlns="urn:jboss:cli:3.0"

      Show
      1. Start with default install of EAP 7.0 with a custom vault defined in /modules. 2. In jboss-cli.xml, configure for SSL, using vault entry for password, example: <ssl> <vault code="com.tom.customvault.CustomVault" module="com.tom.customvault"> <vault-option name="KEYSTORE_URL" value="/Users/tmanor/jboss/jboss-eap-7.0/vault/genericvault.jks"/> <vault-option name="KEYSTORE_PASSWORD" value="MASK-3YwnYRVCWdbw.3PTju8mhY"/> <vault-option name="KEYSTORE_ALIAS" value="genericvault"/> <vault-option name="SALT" value="12438567"/> <vault-option name="ITERATION_COUNT" value="50"/> <vault-option name="ENC_FILE_DIR" value="/Users/tmanor/jboss/jboss-eap-7.0/vault/"/> </vault> <trust-store>/Users/tmanor/jboss/jboss-eap-7.0/vault/admin.jks</trust-store> <trust-store-password>VAULT::jbossAdmin::password::1</trust-store-password> </ssl> 3. run ./jboss-cli.sh --connect to establish connection to server, and receive the following error/exception: tmanor-OSX:bin tmanor$ ./jboss-cli.sh --connect Failed to parse /Users/tmanor/jboss/jboss-eap-7.0/bin/jboss-cli.xml: Unexpected element {urn:jboss:cli:2.0} vault-option at Line number = 44 Column number = 113 System Id = null Public Id = null Location Uri= null CharacterOffset = 1551 4. Change namespace schema reference to use wildfliy-cli_3_0.xsd schema version (<jboss-cli xmlns="urn:jboss:cli:3.0">). 5. Rerun ./jboss-cli.sh --connect, and receive the following: tmanor-OSX:bin tmanor$ ./jboss-cli.sh --connect CustomVault: init called... key=SALT, value=12438567 key=ENC_FILE_DIR, value=/Users/tmanor/jboss/jboss-eap-7.0/vault/ key=ITERATION_COUNT, value=50 key=KEYSTORE_PASSWORD, value=MASK-3YwnYRVCWdbw.3PTju8mhY key=KEYSTORE_URL, value=/Users/tmanor/jboss/jboss-eap-7.0/vault/genericvault.jks key=KEYSTORE_ALIAS, value=genericvault CustomVault: retrieve called... arg0=jbossAdmin arg1=password arg2=1 [standalone@localhost:9990 /] 6. Verfy that jboss-cli.xml file reference 3.0 namespace schema xmlns="urn:jboss:cli:3.0"
    • EAP 7.0.6

      The config file for cli, bin/jboss-cli.xml, has <jboss-cli xmlns="urn:jboss:cli:2.0"> but 3.0 exists also. (i.e. jboss-as-cli_2_0.xsd vs wildfly-cli_3_0.xsd).

      3.0 has new features including code/module attributes for vault allowing custom vaults. The 2.0 XSD schema does not allow for proper configuration of CLI to use SSL to communicate with the running EAP server.

        1. customvault.jar
          3 kB
        2. CustomVault.java
          3 kB
        3. genericvault.jks
          0.5 kB
        4. jboss-cli.xml
          2 kB
        5. module.xml
          0.4 kB
        6. standalone.xml
          21 kB

              chaowan@redhat.com Chao Wang
              rhn-support-cdolphy Chris Dolphy
              Peter Mackay Peter Mackay
              Peter Mackay Peter Mackay
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: