Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Rejected Alternatives

Alternative 1 :

  • Kafka-acls.sh will allow to specify a custom PrincipalBuilder using a new command line parameter "-- principalBuilder" and PrincipalBuilder configs using a new command line parameter "--principalBuilder-properties". Users can use these to build their custom Principal (that implements Java Principal). Add a new API to PrincipalBuilder Interface :

    Code Block
    languagejava
    themeMidnight
    public interface PrincipalBuilder extends Configurable {
    ...
     /**
     * Build a Principal using name.
     *
     * @param name Principal name
     * @return Principal
     */
     Principal buildPrincipal(String name);
     
    ...
    }
  • This PrincipalBuilder API will then be used to generate a Principal using the names specified in --allow-principal and --deny-principal parameters. This Principal can be included in KafkaPrincipal using the new constructor specified above.
  • This alternative was rejected due to following reasons :
    1. Since the Principal is built using the "--principalBuilder-properties", users can only specify a particular type of Principal(s) (using --allow-principal / --deny-principal) at a time.

    2. If users want to specify multiple types of Principals, they will have to run the kafka-acls.sh multiple times with different "--principalBuilder-properties", even if the Principals might have the same name. For example, we can have a service Principal with name "XYZ" and a user Principal with name "XYZ".

  • Due to above reasons, it is quite clear that it is less user friendly and not intuitive.

...