org.apache.geode.security

## Class SecurityTestUtils

- java.lang.Object
- - org.apache.geode.security.SecurityTestUtils

- Deprecated.
  in favor of just writing a test without this class

      @Deprecated
      public class SecurityTestUtils
      extends java.lang.Object

  Contains utility methods for setting up servers/clients for authentication and authorization tests.
  Since:
    GemFire 5.5

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SecurityTestUtils.Employee` Deprecated.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `AUTHFAIL_EXCEPTION` Deprecated.
    `protected static int` | `AUTHREQ_EXCEPTION` Deprecated.
    `protected static int` | `CONNREFUSED_EXCEPTION` Deprecated.
    `protected static java.lang.String[]` | `KEYS` Deprecated.
    `protected static int` | `NO_AVAILABLE_SERVERS` Deprecated.
    `protected static int` | `NO_EXCEPTION` Deprecated.
    `protected static int` | `NOFORCE_AUTHREQ_EXCEPTION` Deprecated.
    `protected static int` | `NOTAUTHZ_EXCEPTION` Deprecated.
    `protected static java.lang.String[]` | `NVALUES` Deprecated.
    `protected static int` | `OTHER_EXCEPTION` Deprecated.
    `protected static java.lang.String` | `REGION_NAME` Deprecated.
    `protected static int` | `SECURITY_EXCEPTION` Deprecated.
    `protected static java.lang.String[]` | `VALUES` Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SecurityTestUtils()` Deprecated.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static void` | `clearStaticSSLContext()` Deprecated. This is a hack using reflection to clear the static objects in JSSE since otherwise changing the javax.* store related properties has no effect during the course of running dunit suite unless the VMs are restarted.
    `protected static void` | `closeCache()` Deprecated.
    `protected static void` | `closeCache(java.lang.Boolean keepAlive)` Deprecated.
    `protected static java.util.Properties` | `concatProperties(java.util.Properties[] propsList)` Deprecated.
    `protected static void` | `createCacheClient(java.lang.String authInitModule, java.util.Properties authProps, java.util.Properties javaProps, int[] ports, int numConnections, boolean setupDynamicRegionFactory, boolean multiUserMode, boolean subscriptionEnabled, int expectedResult)` Deprecated.
    `protected static void` | `createCacheClient(java.lang.String authInitModule, java.util.Properties authProps, java.util.Properties javaProps, int[] ports, int numConnections, boolean setupDynamicRegionFactory, boolean multiUserMode, int expectedResult)` Deprecated.
    `protected static void` | `createCacheClient(java.lang.String authInitModule, java.util.Properties authProps, java.util.Properties javaProps, int[] ports, int numConnections, boolean multiUserMode, int expectedResult)` Deprecated.
    `protected static void` | `createCacheClient(java.lang.String authInitModule, java.util.Properties authProps, java.util.Properties javaProps, int[] ports, int numConnections, int expectedResult)` Deprecated.
    `protected static void` | `createCacheClientForMultiUserMode(int numOfUsers, java.lang.String authInitModule, java.util.Properties[] authProps, java.util.Properties javaProps, int[] ports, int numConnections, boolean setupDynamicRegionFactory, int expectedResult)` Deprecated.
    `protected static void` | `createCacheClientForMultiUserMode(int numOfUsers, java.lang.String authInitModule, java.util.Properties[] authProps, java.util.Properties javaProps, int[] ports, int numConnections, boolean setupDynamicRegionFactory, java.lang.String durableClientId, int expectedResult)` Deprecated.
    `protected static void` | `createCacheClientWithDynamicRegion(java.lang.String authInitModule, java.util.Properties authProps, java.util.Properties javaProps, int[] ports, int numConnections, boolean setupDynamicRegionFactory, int expectedResult)` Deprecated.
    `protected static void` | `createCacheClientWithDynamicRegion(java.lang.String authInitModule, java.util.Properties authProps, java.util.Properties javaProps, int numConnections, boolean setupDynamicRegionFactory, int expectedResult)` Deprecated. create a client cache using the dunit locator to find servers
    `protected static int` | `createCacheServer(java.util.Properties authProps, java.util.Properties javaProps, int serverPort, boolean setupDynamicRegionFactory, int expectedResult)` Deprecated.
    `protected static int` | `createCacheServer(java.util.Properties authProps, java.util.Properties javaProps, int serverPort, int expectedResult)` Deprecated.
    `protected static int` | `createCacheServer(java.lang.String authenticatorFactoryMethodName)` Deprecated.
    `protected static void` | `createProxyCache(int[] userIndices, java.util.Properties[] props)` Deprecated.
    `DistributedSystem` | `createSystem(java.util.Properties sysProps, java.util.Properties javaProps)` Deprecated.
    `protected static void` | `doGets(int num)` Deprecated.
    `protected static void` | `doGets(int num, int expectedResult)` Deprecated.
    `protected static void` | `doLocalGets(int num)` Deprecated.
    `protected static void` | `doMultiUserContainsKeys(int num, int numOfUsers, int[] expectedResults, boolean[] results)` Deprecated.
    `protected static void` | `doMultiUserDestroys(int num, int numOfUsers, int[] expectedResults)` Deprecated.
    `protected static void` | `doMultiUserFE(int numOfUsers, Function function, int[] expectedResults, boolean isFailOverCase)` Deprecated.
    `protected static void` | `doMultiUserGetAll(int numOfUsers, int[] expectedResults)` Deprecated.
    `protected static void` | `doMultiUserGetAll(int numOfUsers, int[] expectedResults, boolean useTX)` Deprecated.
    `protected static void` | `doMultiUserGets(int num, int numOfUsers, int[] expectedResults)` Deprecated.
    `protected static void` | `doMultiUserInvalidates(int num, int numOfUsers, int[] expectedResults)` Deprecated.
    `protected static void` | `doMultiUserPuts(int num, int numOfUsers, int[] expectedResults)` Deprecated.
    `protected static void` | `doMultiUserQueries(int numOfUsers, int[] expectedResults, int valueSize)` Deprecated.
    `protected static void` | `doMultiUserQueryExecute(int numOfUsers, int[] expectedResults, int result)` Deprecated.
    `protected static void` | `doMultiUserRegionDestroys(int numOfUsers, int[] expectedResults)` Deprecated.
    `protected static void` | `doNGets(int num)` Deprecated.
    `protected static void` | `doNGets(int num, int expectedResult)` Deprecated.
    `protected static void` | `doNLocalGets(int num)` Deprecated.
    `protected static void` | `doNPuts(int num)` Deprecated.
    `protected static void` | `doNPuts(int num, int expectedResult)` Deprecated.
    `protected static void` | `doProxyCacheClose()` Deprecated.
    `protected static void` | `doPutAllP()` Deprecated.
    `protected static void` | `doPuts(int num)` Deprecated.
    `protected static void` | `doPuts(int num, int expectedResult)` Deprecated.
    `protected static void` | `doSimpleGet(java.lang.String expectedResult)` Deprecated.
    `protected static void` | `doSimplePut(java.lang.String expectedResult)` Deprecated.
    `protected static Cache` | `getCache()` Deprecated.
    `protected static java.lang.Object` | `getLocalValue(Region region, java.lang.Object key)` Deprecated.
    `protected static org.apache.geode.cache.client.internal.ProxyCache` | `getProxyCaches(int index)` Deprecated.
    `protected static void` | `initDynamicRegionFactory()` Deprecated.
    `protected static void` | `registerExpectedExceptions(java.lang.String[] expectedExceptions)` Deprecated.
    `protected static void` | `setJavaProps(java.util.Properties javaProps)` Deprecated.
    `protected static void` | `startLocator(java.lang.String name, int port, java.util.Properties extraProps, java.util.Properties javaProps, java.lang.String[] expectedExceptions)` Deprecated.
    `protected static void` | `stopLocator(int port, java.lang.String[] expectedExceptions)` Deprecated.
    `protected static void` | `verifyIsEmptyOnServer(boolean isEmpty)` Deprecated.
    `protected static void` | `verifySizeOnServer(int size)` Deprecated.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NO_EXCEPTION

          protected static final int NO_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### AUTHREQ_EXCEPTION

          protected static final int AUTHREQ_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### AUTHFAIL_EXCEPTION

          protected static final int AUTHFAIL_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### CONNREFUSED_EXCEPTION

          protected static final int CONNREFUSED_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### NOTAUTHZ_EXCEPTION

          protected static final int NOTAUTHZ_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### OTHER_EXCEPTION

          protected static final int OTHER_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### NO_AVAILABLE_SERVERS

          protected static final int NO_AVAILABLE_SERVERS

      Deprecated.
      See Also:
        Constant Field Values

    - #### SECURITY_EXCEPTION

          protected static final int SECURITY_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### NOFORCE_AUTHREQ_EXCEPTION

          protected static final int NOFORCE_AUTHREQ_EXCEPTION

      Deprecated.
      See Also:
        Constant Field Values

    - #### REGION_NAME

          protected static final java.lang.String REGION_NAME

      Deprecated.
      See Also:
        Constant Field Values

    - #### KEYS

          protected static final java.lang.String[] KEYS

      Deprecated.

    - #### VALUES

          protected static final java.lang.String[] VALUES

      Deprecated.

    - #### NVALUES

          protected static final java.lang.String[] NVALUES

      Deprecated.

  - ### Constructor Detail

    - #### SecurityTestUtils

          public SecurityTestUtils()

      Deprecated.

  - ### Method Detail

    - #### setJavaProps

          protected static void setJavaProps(java.util.Properties javaProps)

      Deprecated.

    - #### getProxyCaches

          protected static org.apache.geode.cache.client.internal.ProxyCache getProxyCaches(int index)

      Deprecated.

    - #### initDynamicRegionFactory

          protected static void initDynamicRegionFactory()

      Deprecated.

    - #### concatProperties

          protected static java.util.Properties concatProperties(java.util.Properties[] propsList)

      Deprecated.

    - #### registerExpectedExceptions

          protected static void registerExpectedExceptions(java.lang.String[] expectedExceptions)

      Deprecated.

    - #### createCacheServer

          protected static int createCacheServer(java.lang.String authenticatorFactoryMethodName)

      Deprecated.

    - #### createCacheServer

          protected static int createCacheServer(java.util.Properties authProps,
                                                 java.util.Properties javaProps,
                                                 int serverPort,
                                                 int expectedResult)

      Deprecated.

    - #### createCacheServer

          protected static int createCacheServer(java.util.Properties authProps,
                                                 java.util.Properties javaProps,
                                                 int serverPort,
                                                 boolean setupDynamicRegionFactory,
                                                 int expectedResult)

      Deprecated.

    - #### createCacheClient

          protected static void createCacheClient(java.lang.String authInitModule,
                                                  java.util.Properties authProps,
                                                  java.util.Properties javaProps,
                                                  int[] ports,
                                                  int numConnections,
                                                  int expectedResult)

      Deprecated.

    - #### createCacheClient

          protected static void createCacheClient(java.lang.String authInitModule,
                                                  java.util.Properties authProps,
                                                  java.util.Properties javaProps,
                                                  int[] ports,
                                                  int numConnections,
                                                  boolean multiUserMode,
                                                  int expectedResult)

      Deprecated.

    - #### createCacheClientWithDynamicRegion

          protected static void createCacheClientWithDynamicRegion(java.lang.String authInitModule,
                                                                   java.util.Properties authProps,
                                                                   java.util.Properties javaProps,
                                                                   int[] ports,
                                                                   int numConnections,
                                                                   boolean setupDynamicRegionFactory,
                                                                   int expectedResult)

      Deprecated.

    - #### createCacheClientWithDynamicRegion

          protected static void createCacheClientWithDynamicRegion(java.lang.String authInitModule,
                                                                   java.util.Properties authProps,
                                                                   java.util.Properties javaProps,
                                                                   int numConnections,
                                                                   boolean setupDynamicRegionFactory,
                                                                   int expectedResult)

      Deprecated.
      create a client cache using the dunit locator to find servers

    - #### createCacheClient

          protected static void createCacheClient(java.lang.String authInitModule,
                                                  java.util.Properties authProps,
                                                  java.util.Properties javaProps,
                                                  int[] ports,
                                                  int numConnections,
                                                  boolean setupDynamicRegionFactory,
                                                  boolean multiUserMode,
                                                  int expectedResult)

      Deprecated.

    - #### createCacheClient

          protected static void createCacheClient(java.lang.String authInitModule,
                                                  java.util.Properties authProps,
                                                  java.util.Properties javaProps,
                                                  int[] ports,
                                                  int numConnections,
                                                  boolean setupDynamicRegionFactory,
                                                  boolean multiUserMode,
                                                  boolean subscriptionEnabled,
                                                  int expectedResult)

      Deprecated.

    - #### createCacheClientForMultiUserMode

          protected static void createCacheClientForMultiUserMode(int numOfUsers,
                                                                  java.lang.String authInitModule,
                                                                  java.util.Properties[] authProps,
                                                                  java.util.Properties javaProps,
                                                                  int[] ports,
                                                                  int numConnections,
                                                                  boolean setupDynamicRegionFactory,
                                                                  int expectedResult)

      Deprecated.

    - #### createCacheClientForMultiUserMode

          protected static void createCacheClientForMultiUserMode(int numOfUsers,
                                                                  java.lang.String authInitModule,
                                                                  java.util.Properties[] authProps,
                                                                  java.util.Properties javaProps,
                                                                  int[] ports,
                                                                  int numConnections,
                                                                  boolean setupDynamicRegionFactory,
                                                                  java.lang.String durableClientId,
                                                                  int expectedResult)

      Deprecated.

    - #### createProxyCache

          protected static void createProxyCache(int[] userIndices,
                                                 java.util.Properties[] props)

      Deprecated.

    - #### startLocator

          protected static void startLocator(java.lang.String name,
                                             int port,
                                             java.util.Properties extraProps,
                                             java.util.Properties javaProps,
                                             java.lang.String[] expectedExceptions)

      Deprecated.

    - #### stopLocator

          protected static void stopLocator(int port,
                                            java.lang.String[] expectedExceptions)

      Deprecated.

    - #### getCache

          protected static Cache getCache()

      Deprecated.

    - #### getLocalValue

          protected static java.lang.Object getLocalValue(Region region,
                                                          java.lang.Object key)

      Deprecated.

    - #### doProxyCacheClose

          protected static void doProxyCacheClose()

      Deprecated.

    - #### doPutAllP

          protected static void doPutAllP()
                                   throws java.lang.Exception

      Deprecated.
      Throws:
        `java.lang.Exception`

    - #### doPuts

          protected static void doPuts(int num)

      Deprecated.

    - #### doPuts

          protected static void doPuts(int num,
                                       int expectedResult)

      Deprecated.

    - #### verifySizeOnServer

          protected static void verifySizeOnServer(int size)

      Deprecated.

    - #### verifyIsEmptyOnServer

          protected static void verifyIsEmptyOnServer(boolean isEmpty)

      Deprecated.

    - #### doMultiUserPuts

          protected static void doMultiUserPuts(int num,
                                                int numOfUsers,
                                                int[] expectedResults)

      Deprecated.

    - #### doGets

          protected static void doGets(int num)

      Deprecated.

    - #### doGets

          protected static void doGets(int num,
                                       int expectedResult)

      Deprecated.

    - #### doMultiUserGetAll

          protected static void doMultiUserGetAll(int numOfUsers,
                                                  int[] expectedResults)

      Deprecated.

    - #### doMultiUserGetAll

          protected static void doMultiUserGetAll(int numOfUsers,
                                                  int[] expectedResults,
                                                  boolean useTX)

      Deprecated.

    - #### doMultiUserGets

          protected static void doMultiUserGets(int num,
                                                int numOfUsers,
                                                int[] expectedResults)

      Deprecated.

    - #### doMultiUserRegionDestroys

          protected static void doMultiUserRegionDestroys(int numOfUsers,
                                                          int[] expectedResults)

      Deprecated.

    - #### doMultiUserDestroys

          protected static void doMultiUserDestroys(int num,
                                                    int numOfUsers,
                                                    int[] expectedResults)

      Deprecated.

    - #### doMultiUserInvalidates

          protected static void doMultiUserInvalidates(int num,
                                                       int numOfUsers,
                                                       int[] expectedResults)

      Deprecated.

    - #### doMultiUserContainsKeys

          protected static void doMultiUserContainsKeys(int num,
                                                        int numOfUsers,
                                                        int[] expectedResults,
                                                        boolean[] results)

      Deprecated.

    - #### doMultiUserQueries

          protected static void doMultiUserQueries(int numOfUsers,
                                                   int[] expectedResults,
                                                   int valueSize)

      Deprecated.

    - #### doMultiUserFE

          protected static void doMultiUserFE(int numOfUsers,
                                              Function function,
                                              int[] expectedResults,
                                              boolean isFailOverCase)

      Deprecated.

    - #### doMultiUserQueryExecute

          protected static void doMultiUserQueryExecute(int numOfUsers,
                                                        int[] expectedResults,
                                                        int result)

      Deprecated.

    - #### doLocalGets

          protected static void doLocalGets(int num)

      Deprecated.

    - #### doNPuts

          protected static void doNPuts(int num)

      Deprecated.

    - #### doNPuts

          protected static void doNPuts(int num,
                                        int expectedResult)

      Deprecated.

    - #### doNGets

          protected static void doNGets(int num)

      Deprecated.

    - #### doNGets

          protected static void doNGets(int num,
                                        int expectedResult)

      Deprecated.

    - #### doNLocalGets

          protected static void doNLocalGets(int num)

      Deprecated.

    - #### doSimpleGet

          protected static void doSimpleGet(java.lang.String expectedResult)

      Deprecated.

    - #### doSimplePut

          protected static void doSimplePut(java.lang.String expectedResult)

      Deprecated.

    - #### clearStaticSSLContext

          protected static void clearStaticSSLContext()

      Deprecated.
      This is a hack using reflection to clear the static objects in JSSE since otherwise changing the javax.* store related properties has no effect during the course of running dunit suite unless the VMs are restarted.

    - #### closeCache

          protected static void closeCache()

      Deprecated.

    - #### closeCache

          protected static void closeCache(java.lang.Boolean keepAlive)

      Deprecated.

    - #### createSystem

          public DistributedSystem createSystem(java.util.Properties sysProps,
                                                java.util.Properties javaProps)

      Deprecated.