org.apache.storm.security.auth.authorizer

## Class DRPCAuthorizerBase

- java.lang.Object
- - org.apache.storm.security.auth.authorizer.DRPCAuthorizerBase

- All Implemented Interfaces:
    IAuthorizer
  Direct Known Subclasses:
    DRPCSimpleACLAuthorizer

      public abstract class DRPCAuthorizerBase
      extends Object
      implements IAuthorizer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FUNCTION_NAME` A key name for the function requested to be executed by a user.
    `static org.slf4j.Logger` | `LOG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DRPCAuthorizerBase()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `permit(ReqContext context, String operation, Map<String,Object> params)` Authorizes request from to the DRPC server.
    `protected abstract boolean` | `permitClientRequest(ReqContext context, String operation, Map<String,Object> params)`
    `protected abstract boolean` | `permitInvocationRequest(ReqContext context, String operation, Map<String,Object> params)`
    `abstract void` | `prepare(Map<String,Object> conf)` Invoked once immediately after construction.

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

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

- - ### Field Detail

    - #### LOG

          public static final org.slf4j.Logger LOG

    - #### FUNCTION_NAME

          public static final String FUNCTION_NAME

      A key name for the function requested to be executed by a user.

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DRPCAuthorizerBase

          public DRPCAuthorizerBase()

  - ### Method Detail

    - #### prepare

          public abstract void prepare(Map<String,Object> conf)

      Description copied from interface: `IAuthorizer`

      Invoked once immediately after construction.

      Specified by:
        `prepare` in interface `IAuthorizer`
      Parameters:
        `conf` - Storm cluster configuration

    - #### permitClientRequest

          protected abstract boolean permitClientRequest(ReqContext context,
                                                         String operation,
                                                         Map<String,Object> params)

    - #### permitInvocationRequest

          protected abstract boolean permitInvocationRequest(ReqContext context,
                                                             String operation,
                                                             Map<String,Object> params)

    - #### permit

          public boolean permit(ReqContext context,
                                String operation,
                                Map<String,Object> params)

      Authorizes request from to the DRPC server.

      Specified by:
        `permit` in interface `IAuthorizer`
      Parameters:
        `context` - the client request context
        `operation` - the operation requested by the DRPC server
        `params` - a Map with any key-value entries of use to the authorization implementation
      Returns:
        true if the request is authorized, false if reject

Copyright © 2019 The Apache Software Foundation. All rights reserved.