Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4925

Admin in Monitor role can execute test-connection-in-pool op

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 10.0.0.Alpha6
    • 10.0.0.Alpha5
    • JCA
    • None

    Description

      This should not work, as the Monitor role is not allowed to do anything that modifies any state:

      [standalone@localhost:9990 data-source=ExampleDS] :test-connection-in-pool{roles=Monitor}
      {
          "outcome" => "success",
          "result" => [true]
      }
      

      I believe the problem is PoolOperations L75:

      final ServiceController<?> managementRepoService = context.getServiceRegistry(false).getService(
              ConnectorServices.MANAGEMENT_REPOSITORY_SERVICE);
      

      The parameter to context.getServiceRegistry(...) must be 'true' if the operation is going to use the returned service registry to perform any form of state modification. So I believe all the PoolOperation subclasses should provide a param to PoolOperation's constructor that can be used to set this value. I believe in all subclasses except DumpQueuedThreadInPool this param should be 'true'.

      Attachments

        Activity

          People

            jpederse@redhat.com Jesper Pedersen
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: