Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-600

CLI unable to parse op where a list contains a list.

XMLWordPrintable

      The CLI is incorrectly parsing commands where the parameter contains a list that contains a list.

      Take the following command: -

      ./subsystem=elytron/provider-loader=pkcs#11:add(register=false, providers=[{ class-names=[sun.security.pkcs11.SunPKCS11], module=sun.jdk, property-list=[{key=a,value=b},{key=b,value=c}] }])
      

      The following operation is created: -

      {
          "address" => [
              ("subsystem" => "elytron"),
              ("provider-loader" => "pkcs#11")
          ],
          "operation" => "add",
          "register" => false,
          "providers" => [{
              "class-names" => ["sun.security.pkcs11.SunPKCS11"],
              "module" => "sun.jdk",
              "property-list" => [
                  {
                      "key" => "a",
                      "value" => "b"
                  },
                  {
                      "key" => "b",
                      "value" => "c"
                  },
                  "}"
              ]
          }]
      }
      

      Note the additional "}" inside property-list.

      Change the order of parameters to now be: -

      ./subsystem=elytron/provider-loader=pkcs#11:add(register=false, providers=[{ class-names=[sun.security.pkcs11.SunPKCS11],  property-list=[{key=a,value=b},{key=b,value=c}], module=sun.jdk }])
      

      And the resulting operation is: -

      {
          "address" => [
              ("subsystem" => "elytron"),
              ("provider-loader" => "pkcs#11")
          ],
          "operation" => "add",
          "register" => false,
          "providers" => [
              {
                  "key" => "a",
                  "value" => "b"
              },
              {
                  "key" => "b",
                  "value" => "c"
              },
              ("module" => "sun.jdk }")
          ]
      }
      

      Here the content of providers is completely wrong, also the value for 'module' is wrong and contains an additional '}'.

              olubyans@redhat.com Alexey Loubyansky
              darran.lofthouse@redhat.com Darran Lofthouse
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: