public class RangerNiFiAuthorizer extends java.lang.Object implements Authorizer, AuthorizationAuditor
Constructor and Description |
---|
RangerNiFiAuthorizer() |
Modifier and Type | Method and Description |
---|---|
void |
auditAccessAttempt(AuthorizationRequest request,
AuthorizationResult result)
Audits an authorization request.
|
AuthorizationResult |
authorize(AuthorizationRequest request)
Determines if the specified user/entity is authorized to access the specified resource within the given context.
|
protected RangerBasePluginWithPolicies |
createRangerBasePlugin(java.lang.String serviceType,
java.lang.String appId) |
void |
initialize(AuthorizerInitializationContext initializationContext)
Called immediately after instance creation for implementers to perform additional setup
|
void |
onConfigured(AuthorizerConfigurationContext configurationContext)
Called to configure the Authorizer.
|
void |
preDestruction()
Called immediately before instance destruction for implementers to release resources.
|
void |
setNiFiProperties(NiFiProperties properties) |
public void initialize(AuthorizerInitializationContext initializationContext) throws AuthorizerCreationException
Authorizer
initialize
in interface Authorizer
initializationContext
- in which to initializeAuthorizerCreationException
public void onConfigured(AuthorizerConfigurationContext configurationContext) throws AuthorizerCreationException
Authorizer
onConfigured
in interface Authorizer
configurationContext
- at the time of configurationAuthorizerCreationException
- for any issues configuring the providerprotected RangerBasePluginWithPolicies createRangerBasePlugin(java.lang.String serviceType, java.lang.String appId)
public AuthorizationResult authorize(AuthorizationRequest request) throws AuthorizationAccessException
Authorizer
authorize
in interface Authorizer
request
- The authorization requestAuthorizationAccessException
- if unable to access the policiespublic void auditAccessAttempt(AuthorizationRequest request, AuthorizationResult result)
AuthorizationAuditor
auditAccessAttempt
in interface AuthorizationAuditor
request
- the request for authorizationresult
- the authorization resultpublic void preDestruction() throws AuthorizerDestructionException
Authorizer
preDestruction
in interface Authorizer
AuthorizerDestructionException
- If pre-destruction fails.@AuthorizerContext public void setNiFiProperties(NiFiProperties properties)