@Ignore("Bug 51079")
  @Test
  public void testQueryParamsInAuthCallback() throws Exception {
    final Host host = Host.getHost(0);
    final VM server1 = host.getVM(0);
    final VM client = host.getVM(1);
    // create servers and regions
    final int port = server1.invoke("Create Server1", () -> {
      CacheFactory cf = new CacheFactory().set(MCAST_PORT, "0")
          .set(SECURITY_CLIENT_ACCESSOR,
              "org.apache.geode.cache.query.dunit.QueryAuthorization.create")
          .set(SECURITY_CLIENT_AUTHENTICATOR, DummyAuthenticator.class.getName() + ".create");
      Cache cache = getCache(cf);
      cache.createRegionFactory(RegionShortcut.REPLICATE).create(regName);
      CacheServer server = cache.addCacheServer();
      int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
      server.setPort(serverPort);
      server.start();
      return serverPort;
    });

    // create client
    client.invoke("Create client", () -> {
      ClientCacheFactory ccf = new ClientCacheFactory()
          .addPoolServer(NetworkUtils.getServerHostName(server1.getHost()), port)
          .set(SECURITY_CLIENT_AUTH_INIT, UserPasswordAuthInit.class.getName() + ".create")
          .set(SECURITY_PREFIX + "username", "root").set(SECURITY_PREFIX + "password", "root");

      ClientCache cache = getClientCache(ccf);
      Region r1 =
          cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create(regName);

      for (int i = 0; i < 20; i++) {
        r1.put("key-" + i, new Portfolio(i));
      }

      QueryService qs = cache.getQueryService();
      Object[] params = new Object[] {"active", 0};
      SelectResults sr = (SelectResults) qs
          .newQuery("select * from " + r1.getFullPath() + " where status = $1 and ID > $2 ")
          .execute(params);
      assertTrue("Result size should be greater than 0 ", sr.size() > 0);
      return null;
    });
  }
Test for accessing query bind parameters from authorization callbacks
geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java