code: public boolean isAuthorized(List<String> authHeader, String resource, Principal principal,
                                  AuthHandler.Permissions permission)
              throws AuthException {
          if (isAuthEnabled()) {
              return pravegaAuthManager.authorize(resource,
                      principal,
                      parseCredentials(authHeader),
                      permission);
          } else {
              // Since auth is disabled, every request is deemed to have been authorized.
              return true;
          }
      }
docs: Determines whether the given {@code principal} has specified {@code permission} on the given {@code resource}.
  
  @param authHeader contents of an HTTP Authorization header
  @param resource   representation of the resource being accessed
  @param principal  the identity of the subject accessing the resource
  @param permission the permission
  @return {@code true} if either auth is disabled or authorization is granted, and  {@code false}
  if auth is enabled and authorization is not granted
  @throws AuthException if either authentication or authorization fails