Versions Compared

Key

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

...

To take advantage of these custom algorithms, we want to support java security provider parameter in security config. For instance, in streaming applications like Flink, Spark or Storm, one can configure 'spiffe.provider.SpiffeProvider' which helps in fetching the keys and certificates via a gRPC endpoint. This param can be used by kafka brokers or kafka clients(when connecting to the kafka brokers). The security providers can also be used for configuring security algorithms in SASL based communication.

Public Interfaces

...

SecurityProviderCreator interface will be added org.apache.kafka.common.security.auth


/**
* An interface for generating security providers.
*/
@InterfaceStability.Evolving
public interface SecurityProviderCreator extends Configurable {

/**
* Configure method is used to configure the generator to create the Security Provider
* @param config configuration parameters for initialising security provider
*/
default void configure(Map<String, ?> config) {

}

/**
* Generate the security provider configured
*/
Provider getProvider();
}

Code Block
themeFadeToGrey
security.provider.classes=com.security.ProviderClass,com.security.ProviderClass2

The following line will be added to the kafka server.properties and the configured provider classes will be registered at the time of kafka broker start up 

Proposed Changes

We add new config parameter in KafkaConfig named “security.provider.class.names”. The value of “security.provider.class.names” is expected to be a comma separated string representing the providers' full classname. This provider classes will be added to the JVM through Security.addProvider api. Security class can be used to programmatically add the provider classes to the JVM. The provider classes will be added at the starting position in the list of providers and in the order they are passed. So any algorithm implemented in the earlier classes will replace algorithm implementations with the same name in following providers. For SASL, we add the providers after the login modules are configured so that the algorithms in the providers passed can take precedence over the passed SASL login modules.

...