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

list operations doesn't work for principal-query attribute of jdbc-realm

    XMLWordPrintable

Details

    Description

      Previously it was possible to use the list-add, list-remove operations to add and remove items from a principal-query (type LIST), but doesn't work at the recent version:

      The list operation is important for web console, as it should manipulate the list items individually, instead to use write-attribute as this is going to handle all items in the list.

      Add a jdbc-realm

      /profile=full/subsystem=elytron/jdbc-realm=jdbc3:add(principal-query=[{data-source=ExampleDS,sql="select test from table"}])
      

      Display its content

      /profile=full/subsystem=elytron/jdbc-realm=jdbc3:list-get(name=principal-query,index=0)
      {
          "outcome" => "success",
          "result" => {
              "data-source" => "ExampleDS",
              "sql" => "select test from table"
          }
      }
      

      However to add more principal-query items doesn't work

      /profile=full/subsystem=elytron/jdbc-realm=jdbc3:list-add(name=principal-query,value={sql="select other from table2",data-source="ExampleDS"})
      {
          "outcome" => "failed",
          "failure-description" => {"domain-failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException"},
          "rolled-back" => true
      }
      

      The remove operation doesn't work

      /profile=full/subsystem=elytron/jdbc-realm=jdbc3:list-remove(name=principal-query,index=0)
      {
          "outcome" => "failed",
          "failure-description" => {"domain-failure-description" => "WFLYCTL0115: [0] is an invalid size for parameter principal-query. A minimum length of [1] is required"},
          "rolled-back" => true
      }
      
      /profile=full/subsystem=elytron/jdbc-realm=jdbc3:list-remove(name=principal-query,value={data-source="ExampleDS",sql="select test from table"})
      {
          "outcome" => "failed",
          "failure-description" => {"domain-failure-description" => "WFLYCTL0115: [0] is an invalid size for parameter principal-query. A minimum length of [1] is required"},
          "rolled-back" => true
      }
      

      Attachments

        Issue Links

          Activity

            People

              mpetrov@redhat.com Michal Petrov
              cmiranda@redhat.com Claudio Miranda
              Ondrej Kotek Ondrej Kotek
              Ondrej Kotek Ondrej Kotek
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 30 minutes
                  30m
                  Remaining:
                  Time Spent - 20 minutes Remaining Estimate - 10 minutes
                  10m
                  Logged:
                  Time Spent - 20 minutes Remaining Estimate - 10 minutes
                  20m