Enum Class TrafficNetworkIdValidationMode

java.lang.Object
java.lang.Enum<TrafficNetworkIdValidationMode>
io.confluent.kafka.server.plugins.auth.TrafficNetworkIdValidationMode
All Implemented Interfaces:
Serializable, Comparable<TrafficNetworkIdValidationMode>, Constable

public enum TrafficNetworkIdValidationMode extends Enum<TrafficNetworkIdValidationMode>
Enum class that represents different modes of NetworkId validation in the authenticator.

none: default mode on normal listeners: - no validation of the NetworkId is done

strict: to be configured on listener for CL traffic over Private link : - requires NetworkId in the allowed network IDs from this cluster.

This mode can be configured through the jaas config for #TopicBasedPlainSaslAuthenticator

  • Enum Constant Details

  • Field Details

    • TRAFFIC_NETWORK_ID_VALIDATION_MODE_KEY

      public static final String TRAFFIC_NETWORK_ID_VALIDATION_MODE_KEY
      See Also:
  • Method Details

    • values

      public static TrafficNetworkIdValidationMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TrafficNetworkIdValidationMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public static TrafficNetworkIdValidationMode fromString(String text)
    • fromConfigs

      public static TrafficNetworkIdValidationMode fromConfigs(org.apache.kafka.common.network.CCloudTrafficType trafficType, Supplier<String> jaasConfigEntryOption)
    • trafficAllowed

      public abstract boolean trafficAllowed(Optional<String> networkId, org.apache.kafka.server.traffic.TrafficNetworkIdRoutes networkIdRoutes)
      Validate if the supplied NetworkId is allowed to talk to this cluster's network.
      Parameters:
      networkId - The networkId attempting to send traffic.
      networkIdRoutes - The allowed routes.
      Returns:
      true if the traffic is allowed, false otherwise