LATEST VERSION: 8.2.7 - CHANGELOG
Pivotal GemFire® v8.2

Managing a Cache in a Secure System

Managing a Cache in a Secure System

When you create your cache in a secure system, you provide credentials to the connection process for authentication by already-running, secure members. Clients connect to secure servers. Peers are authenticated by secure locators or peer members.

Follow these steps in addition to the steps for implementing security implementation for your peer, server, and client members. See Managing a Peer or Server Cache and Managing a Client Cache.
  1. To create your cache:
    1. Add any necessary security properties to the gemfire.properties or gfsecurity.properties file, to configure Pivotal GemFire for your particular security implementation. Examples:
      security-client-auth-init=mySecurity.UserPasswordAuthInit.create
      security-peer-auth-init=myAuthPkg.myAuthInitImpl.create
    2. When you create your cache, pass any properties required by your security implementation to the cache factory create call by using one of these methods:
      • ClientCacheFactory or CacheFactory set methods. Example:
        ClientCache clientCache = new ClientCacheFactory()
        	.set("security-username", username)
        	.set("security-password", password)
        	.create();
      • Properties object passed to the ClientCacheFactory or CacheFactory create method. These are usually properties of a sensitive nature that you do not want to put inside the gfsecurity.properties file. Example:
        Properties properties = new Properties();
        properties.setProperty("security-username", username);
        properties.setProperty("security-password", password);
        Cache cache = new CacheFactory(properties).create();
        Note: Properties passed to a cache creation method override any settings in either the gemfire.properties file or gfsecuirty.properties.
  2. Close your cache when you are done using the close method of your Cache or ClientCache instance. Example:
    cache.close();