Class Action


  • @Evolving
    public class Action
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Action​(AclOperation operation, ResourcePattern resourcePattern, int resourceReferenceCount, boolean logIfAllowed, boolean logIfDenied)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      boolean logIfAllowed()
      Indicates if audit logs tracking ALLOWED access should include this action if result is ALLOWED.
      boolean logIfDenied()
      Indicates if audit logs tracking DENIED access should include this action if result is DENIED.
      AclOperation operation()
      Operation being performed.
      ResourcePattern resourcePattern()
      Resource on which action is being performed.
      int resourceReferenceCount()
      Number of times the resource being authorized is referenced within the request.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Action

        public Action​(AclOperation operation,
                      ResourcePattern resourcePattern,
                      int resourceReferenceCount,
                      boolean logIfAllowed,
                      boolean logIfDenied)
    • Method Detail

      • resourcePattern

        public ResourcePattern resourcePattern()
        Resource on which action is being performed.
      • operation

        public AclOperation operation()
        Operation being performed.
      • logIfAllowed

        public boolean logIfAllowed()
        Indicates if audit logs tracking ALLOWED access should include this action if result is ALLOWED. The flag is true if access to a resource is granted while processing the request as a result of this authorization. The flag is false only for requests used to describe access where no operation on the resource is actually performed based on the authorization result.
      • logIfDenied

        public boolean logIfDenied()
        Indicates if audit logs tracking DENIED access should include this action if result is DENIED. The flag is true if access to a resource was explicitly requested and request is denied as a result of this authorization request. The flag is false if request was filtering out authorized resources (e.g. to subscribe to regex pattern). The flag is also false if this is an optional authorization where an alternative resource authorization is applied if this fails (e.g. Cluster:Create which is subsequently overridden by Topic:Create).
      • resourceReferenceCount

        public int resourceReferenceCount()
        Number of times the resource being authorized is referenced within the request. For example, a single request may reference `n` topic partitions of the same topic. Brokers will authorize the topic once with `resourceReferenceCount=n`. Authorizers may include the count in audit logs.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object