Class AuthorizerFactory

java.lang.Object
org.apache.nifi.authorization.AuthorizerFactory

public final class AuthorizerFactory extends Object
  • Constructor Details

    • AuthorizerFactory

      private AuthorizerFactory()
  • Method Details

    • policyExists

      private static boolean policyExists(AccessPolicyProvider accessPolicyProvider, AccessPolicy checkAccessPolicy)
      Checks if another policy exists with the same resource and action as the given policy.
      Parameters:
      checkAccessPolicy - an access policy being checked
      Returns:
      true if another access policy exists with the same resource and action, false otherwise
    • userExists

      private static boolean userExists(UserGroupProvider userGroupProvider, String identifier, String identity)
      Checks if another user exists with the same identity.
      Parameters:
      userGroupProvider - the userGroupProvider to use to lookup the user
      identifier - identity of the user
      identity - identity of the user
      Returns:
      true if another user exists with the same identity, false otherwise
    • groupExists

      private static boolean groupExists(UserGroupProvider userGroupProvider, String identifier, String identity)
      Checks if another group exists with the same identity.
      Parameters:
      userGroupProvider - the userGroupProvider to use to lookup the group
      identifier - identity of the group
      identity - identity of the group
      Returns:
      true if another group exists with the same identity, false otherwise
    • allGroupUsersExist

      private static boolean allGroupUsersExist(UserGroupProvider userGroupProvider, Group group)
      Check that all users in the group exist.
      Parameters:
      userGroupProvider - the userGroupProvider to use to lookup the users
      group - the group whose users will be checked for existence.
      Returns:
      true if another user exists with the same identity, false otherwise
    • audit

      private static void audit(Authorizer authorizer, AuthorizationRequest request, AuthorizationResult result)
    • installIntegrityChecks

      public static Authorizer installIntegrityChecks(Authorizer baseAuthorizer)
    • withNarLoader

      public static Authorizer withNarLoader(Authorizer baseAuthorizer, ClassLoader classLoader)
      Decorates the base authorizer to ensure the nar context classloader is used when invoking the underlying methods.
      Parameters:
      baseAuthorizer - base authorizer
      Returns:
      authorizer