Interface ExecutorTaskAllowlist

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ExecutorTaskAllowlist
Security boundary for executor task payloads.

Executor submissions carry serialized Callable instances that will execute inside the server process. A task class must therefore be explicitly allowlisted before the handler will accept it.

  • Method Summary

    Modifier and Type
    Method
    Description
    Allow task classes only when deployment code explicitly registered the exact class with the shared Kryo serializer.
    boolean
    permits(Class<?> taskClass)
    Decide whether the exact task class may execute.
  • Method Details

    • permits

      boolean permits(Class<?> taskClass)
      Decide whether the exact task class may execute.
      Parameters:
      taskClass - the deserialized Callable runtime class
      Returns:
      true when the class is allowed
    • fromKryoRegistrations

      static ExecutorTaskAllowlist fromKryoRegistrations(KryoSerializer kryoSerializer)
      Allow task classes only when deployment code explicitly registered the exact class with the shared Kryo serializer.
      Parameters:
      kryoSerializer - serializer carrying application registrations
      Returns:
      an allowlist backed by Kryo application registrations