Package org.apache.druid.server.security
Class Access
java.lang.Object
org.apache.druid.server.security.Access
Represents the outcome of verifying permissions to perform an
Action on a Resource, along with any
applicable policy restrictions. The restriction should only exist for Action.READ and
ResourceType.DATASOURCE, i.e, reading a table.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAccess(boolean allowed) Deprecated.Deprecated.useallow()ordeny(String)instead -
Method Summary
Modifier and TypeMethodDescriptionstatic Accessallow()ConstructsAccessinstance with access allowed, with no policy restriction.static AccessallowWithRestriction(Policy policy) ContructsAccessinstance with access allowed, but with policy restriction.static AccessContructsAccessinstance with access denied.booleanReturns an optionalPolicyrestriction if permission is granted.inthashCode()booleanReturns true if access allowed, ignoring any policy restrictions.toString()
-
Field Details
-
DEFAULT_ERROR_MESSAGE
- See Also:
-
DEFAULT_AUTHORIZED_MESSAGE
- See Also:
-
OK
-
DENIED
-
-
Constructor Details
-
Access
Deprecated.useallow()ordeny(String)instead -
Access
Deprecated.useallow()ordeny(String)instead
-
-
Method Details
-
allow
ConstructsAccessinstance with access allowed, with no policy restriction. -
deny
ContructsAccessinstance with access denied. -
allowWithRestriction
ContructsAccessinstance with access allowed, but with policy restriction. -
isAllowed
public boolean isAllowed()Returns true if access allowed, ignoring any policy restrictions. -
getPolicy
Returns an optionalPolicyrestriction if permission is granted. Only applies to read table access.An empty value indicates either no policy restrictions exist, or access is being requested for an action other than reading a table.
-
getMessage
-
toString
-
equals
-
hashCode
public int hashCode()
-
allow()ordeny(String)instead