Module org.elasticsearch.xcore
Record Class AuthorizationEngine.PrivilegesToCheck
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.core.security.authz.AuthorizationEngine.PrivilegesToCheck
- Enclosing interface:
AuthorizationEngine
public static record AuthorizationEngine.PrivilegesToCheck(String[] cluster, RoleDescriptor.IndicesPrivileges[] index, RoleDescriptor.ApplicationResourcePrivileges[] application, boolean runDetailedCheck)
extends Record
This encapsulates the privileges that can be checked for access. It's intentional that the privileges to be checked are specified
in the same manner that they are granted in the
RoleDescriptor. The privilege check can be detailed or not, per the
runDetailedCheck parameter. The detailed response AuthorizationEngine.PrivilegesCheckResult of a check run, also shows which privileges
are NOT granted.-
Constructor Summary
ConstructorsConstructorDescriptionPrivilegesToCheck(String[] cluster, RoleDescriptor.IndicesPrivileges[] index, RoleDescriptor.ApplicationResourcePrivileges[] application, boolean runDetailedCheck) Creates an instance of aPrivilegesToCheckrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplicationrecord component.String[]cluster()Returns the value of theclusterrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.index()Returns the value of theindexrecord component.readFrom(StreamInput in) booleanReturns the value of therunDetailedCheckrecord component.toString()Returns a string representation of this record class.validate(ActionRequestValidationException validationException) voidwriteTo(StreamOutput out)
-
Constructor Details
-
PrivilegesToCheck
public PrivilegesToCheck(String[] cluster, RoleDescriptor.IndicesPrivileges[] index, RoleDescriptor.ApplicationResourcePrivileges[] application, boolean runDetailedCheck) Creates an instance of aPrivilegesToCheckrecord class.- Parameters:
cluster- the value for theclusterrecord componentindex- the value for theindexrecord componentapplication- the value for theapplicationrecord componentrunDetailedCheck- the value for therunDetailedCheckrecord component
-
-
Method Details
-
readFrom
- Throws:
IOException
-
writeTo
- Throws:
IOException
-
validate
public ActionRequestValidationException validate(ActionRequestValidationException validationException) -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
cluster
Returns the value of theclusterrecord component.- Returns:
- the value of the
clusterrecord component
-
index
Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
application
Returns the value of theapplicationrecord component.- Returns:
- the value of the
applicationrecord component
-
runDetailedCheck
public boolean runDetailedCheck()Returns the value of therunDetailedCheckrecord component.- Returns:
- the value of the
runDetailedCheckrecord component
-