Interface Authorizer
- All Known Implementing Classes:
AllowAllAuthorizer
A single instance of each Authorizer implementation will be created per node. Security-sensitive endpoints will need to extract the identity string contained in the request's Druid-Auth-Token attribute, previously set by an Authenticator. Each endpoint will pass this identity String to the Authorizer's authorize() method along with any Resource/Action pairs created for the request being handled. The endpoint can use these checks to filter out resources or deny the request as needed. After a request is authorized, a new attribute, "Druid-Authorization-Checked", should be set in the request header with the result of the authorization decision.
-
Method Summary
Modifier and TypeMethodDescriptionauthorize(AuthenticationResult authenticationResult, Resource resource, Action action) Check if the entity represented byidentityis authorized to performactiononresource.
-
Method Details
-
authorize
Check if the entity represented byidentityis authorized to performactiononresource.If the action involves reading a table, the outcome could include
Policyrestrictions. However, if the action does not involve reading a table, there must be noPolicyrestrictions.- Parameters:
authenticationResult- The authentication result of the requestresource- The resource to be accessedaction- The action to perform on the resource- Returns:
- An
Accessobject representing the result of the authorization check. Must not be null.
-