Make PrivilegesEvaluator extensible through config (Contribute to the repository)

Hi all,

I want to make the PrivilegesEvaluator flexible so that any user can use his/her own implementation of PrivilegesEvaluator
This is the idea

  1. Introduce a new property as to which evaluator is to be initialized

  2. Create an abstract class Evaluator. // Parent class of any evaluator
    PrivilegesEvaluator implements the abstract class (only override the evaluate() api)

  3. Similarly,
    create abstract class EvaluatorResponse // Parent class of any evaluatorResponse

  4. Create a EvaluatorFactory which returns the specified evaluator to be used when invoked.

Here are the links for PrivilegesEvaluator and PrivilegesEvaluatorResponse classes :

  1. security/ at main · opendistro-for-elasticsearch/security · GitHub

  2. security/ at main · opendistro-for-elasticsearch/security · GitHub

Is this design viable to be contributed or if not, please suggest changes?

anyone? Please help.