Class AbstractAuthInitialize

All Implemented Interfaces:
org.apache.geode.cache.CacheCallback, org.apache.geode.cache.Declarable, org.apache.geode.security.AuthInitialize, org.springframework.beans.factory.Aware, org.springframework.context.EnvironmentAware
Direct Known Subclasses:
AutoConfiguredAuthenticationInitializer

public abstract class AbstractAuthInitialize extends WiringDeclarableSupport implements org.apache.geode.security.AuthInitialize, org.springframework.context.EnvironmentAware
Abstract class and basic implementation of the AuthInitialize interface used to authenticate a client or peer with a secure Apache Geode cluster.
Since:
2.0.0
See Also:
  • Constructor Details

    • AbstractAuthInitialize

      public AbstractAuthInitialize()
  • Method Details

    • setEnvironment

      public void setEnvironment(@Nullable org.springframework.core.env.Environment environment)
      Sets a reference to the configured Spring Environment.
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
      Parameters:
      environment - reference to the configured Spring Environment.
      See Also:
      • Environment
    • getEnvironment

      protected Optional<org.springframework.core.env.Environment> getEnvironment()
      Get an Optional reference to the configured Spring Environment.
      Returns:
      an Optional reference to the configured Spring Environment.
      See Also:
    • init

      public final void init(org.apache.geode.LogWriter systemLogWriter, org.apache.geode.LogWriter securityLogWriter) throws org.apache.geode.security.AuthenticationFailedException
      Initializes this Apache Geode component by auto-wiring (configuring) any dependencies managed by the Spring container required during authentication.
      Specified by:
      init in interface org.apache.geode.security.AuthInitialize
      Parameters:
      systemLogWriter - LogWriter for system output.
      securityLogWriter - LogWriter for security output.
      Throws:
      org.apache.geode.security.AuthenticationFailedException - if this Apache Geode node could not be authenticated with the Apache Geode distributed system (cluster).
      See Also:
    • doInit

      protected void doInit()
    • getCredentials

      public final Properties getCredentials(Properties properties, org.apache.geode.distributed.DistributedMember distributedMember, boolean isPeer) throws org.apache.geode.security.AuthenticationFailedException
      Gets the security credentials used to authenticate this Apache Geode node with the Apache Geode distributed system (cluster).
      Specified by:
      getCredentials in interface org.apache.geode.security.AuthInitialize
      Parameters:
      properties - Apache Geode Properties to configure with authentication credentials used during the authentication request.
      distributedMember - DistributedMember representing this Apache Geode node.
      isPeer - boolean value indicating whether this Apache Geode node is joining the cluster as a peer or a client.
      Returns:
      the given Apache Geode Properties.
      Throws:
      org.apache.geode.security.AuthenticationFailedException - if this Apache Geode node could not be authenticated with the Apache Geode distributed system (cluster).
      See Also:
    • doGetCredentials

      protected abstract Properties doGetCredentials(Properties properties)