Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Admin client config

...

This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.

Status

Current stateDraftUnder discussion

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

...

  • auto.offset.reset

  • client.id

  • enable.auto.commit

  • fetch.min.bytes

  • fetch.max.wait.ms

  • group.id

  • isolation.level

  • max.poll.interval.ms

  • max.poll.records

  • request.timeout.ms
  • session.timeout.ms

Most of these values are numeric or one of a fixed set of enums, which greatly limits potential security exposure.

Default Configuration for Apache Kafka Java Admin Client

By default, the Admin client sends values for the following configuration keys:

  • client.id

  • request.timeout.ms

  • retries

Except for client.id these values are numeric, which greatly limits potential security exposure.

Default Configuration for Apache Kafka Java Share Consumer

By default, the Share Consumer sends values for the following configuration keys:

...

Code Block
package org.apache.kafka.server.policy.clientconfig;

/**
 * An interface for intercepting configuration andsent by enforcingthe client configuration.
 *
 * <p/>
 *
 * If <code>client.config.policy.class.name</code> is defined, Kafka will
 * create an instance of the specified class using the default constructor and
 * will then pass the broker configs to its <code>configure()</code> method.
 * During broker shutdown, the <code>close()</code> method will be invoked
 * so that resources can be released (if necessary).
 */
@InterfaceStability.Evolving
public interface ClientConfigPolicy extends Reconfigurable, AutoCloseable {
  
  /**
   * Receive the {@link ClientPushConfigData} data for observability.
   * <p/>
   * <em>Note 1</em>: the implementation of this method must not block.
   * <p/>
   * <em>Note 2</em>: this method will <em>not</em> be invoked if the {@code Config} array
   * of the {@link ClientPushConfigData} was larger than {@code client.config.max.bytes}.
   */
  void process(AuthorizableRequestContext context, ClientConfigData pushConfigData);
}

...

As explained in the concepts section, the ClientConfigPolicy implementation may also provide logic to ensure that clients do not send sensitive configuration. Clients across the Apache Kafka ecosystem do not have a consistent naming convention. As a result, brokers cannot determine sensitivity based on the configuration key name and rely on the incoming ConfigType field. When the ClientConfigPolicy detects sensitive configuration, it includes a description of the violation in the RPC response.

Metrics

The following new broker metrics are added:

Name

Type

Group

Tags

Notes

instance-count

Gauge

client-config


The current number of unique client instance IDs.

NOTE: this is from KIP-714 but will likely be refactored KIP-1313.

plugin-config-count

plugin-config-rate

Meter

client-config

client_instance_id

The total number/rate of PushConfig requests being pushed to the ClientConfigPolicy plugin, regardless of success/failure.

plugin-error-count

plugin-error-rate

Meter

client-config

client_instance_id

The total number/rate of errors raised during preparation for and/or invoking the plugin’s process() method.

plugin-process-time-avg

plugin-process-time-max

Avg and Maxclient-configclient_instance_idThe length of time (in milliseconds) the broker spent invoking the plugin’s process() method.

Client Behavior

Handshake

A client that supports this configuration interface will identify a node that supports the API using ApiVersions. The client performs a handshake by collecting the values for its configuration issuing a PushConfig RPC to submit the configuration to the broker node. The client sends the RPC after authentication (if any) and before the client starts to use the connection for requests. Similar to the ApiVersions handshake, the PushConfig RPC specifies a fixed timeout of default.timeout.ms. If the RPC exhausts its retries, the client logs the error, but continues execution.

...