Class SimpleWhitelistAuthorizer
- java.lang.Object
-
- org.apache.storm.security.auth.authorizer.SimpleWhitelistAuthorizer
-
- All Implemented Interfaces:
IAuthorizer
public class SimpleWhitelistAuthorizer extends Object implements IAuthorizer
An authorization implementation that simply checks a whitelist of users that are allowed to use the cluster.
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
users
static String
WHITELIST_USERS_CONF
-
Constructor Summary
Constructors Constructor Description SimpleWhitelistAuthorizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
permit(ReqContext context, String operation, Map<String,Object> topoConf)
`permit()` method is invoked for each incoming Thrift request.void
prepare(Map<String,Object> conf)
Invoked once immediately after construction.
-
-
-
Field Detail
-
WHITELIST_USERS_CONF
public static final String WHITELIST_USERS_CONF
- See Also:
- Constant Field Values
-
-
Method Detail
-
prepare
public void prepare(Map<String,Object> conf)
Invoked once immediately after construction.- Specified by:
prepare
in interfaceIAuthorizer
- Parameters:
conf
- Storm configuration
-
permit
public boolean permit(ReqContext context, String operation, Map<String,Object> topoConf)
`permit()` method is invoked for each incoming Thrift request.- Specified by:
permit
in interfaceIAuthorizer
- Parameters:
context
- request context includes info aboutoperation
- operation nametopoConf
- configuration of targeted topology- Returns:
- true if the request is authorized, false if reject
-
-