org.apache.geode.security

## Interface SecurityManager

- All Known Implementing Classes:
    ExampleSecurityManager

      public interface SecurityManager

  User implementation of a authentication/authorization logic for Integrated Security. The implementation will guard client/server, JMX, Pulse, GFSH commands
  Since:
    Geode 1.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `authenticate(java.util.Properties credentials)` Verify the credentials provided in the properties
    `default boolean` | `authorize(java.lang.Object principal, ResourcePermission permission)` Authorize the ResourcePermission for a given Principal
    `default void` | `close()` Close any resources used by the SecurityManager, called when a cache is closed.
    `default void` | `init(java.util.Properties securityProps)` Initialize the SecurityManager.

- - ### Method Detail

    - #### init

          default void init(java.util.Properties securityProps)

      Initialize the SecurityManager. This is invoked when a cache is created
      Parameters:
        `securityProps` - the security properties obtained using a call to `DistributedSystem.getSecurityProperties()`
      Throws:
        `AuthenticationFailedException` - if some exception occurs during the initialization

    - #### authenticate

          java.lang.Object authenticate(java.util.Properties credentials)
                                 throws AuthenticationFailedException

      Verify the credentials provided in the properties
      Parameters:
        `credentials` - it contains the security-username and security-password as keys of the properties
      Returns:
        a serializable principal object
      Throws:
        `AuthenticationFailedException`

    - #### authorize

          default boolean authorize(java.lang.Object principal,
                                    ResourcePermission permission)

      Authorize the ResourcePermission for a given Principal
      Parameters:
        `principal` - The principal that's requesting the permission
        `permission` - The permission requested
      Returns:
        true if authorized, false if not

    - #### close

          default void close()

      Close any resources used by the SecurityManager, called when a cache is closed.