public enum TrafficNetworkIdValidationMode extends Enum<TrafficNetworkIdValidationMode>
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
Modifier and Type | Field and Description |
---|---|
static String |
TRAFFIC_NETWORK_ID_VALIDATION_MODE_KEY |
Modifier and Type | Method and Description |
---|---|
static TrafficNetworkIdValidationMode |
fromConfigs(org.apache.kafka.common.network.CCloudTrafficType trafficType,
Supplier<String> jaasConfigEntryOption) |
static TrafficNetworkIdValidationMode |
fromString(String text) |
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.
|
static TrafficNetworkIdValidationMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TrafficNetworkIdValidationMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TrafficNetworkIdValidationMode NONE
public static final TrafficNetworkIdValidationMode STRICT
public static final String TRAFFIC_NETWORK_ID_VALIDATION_MODE_KEY
public static TrafficNetworkIdValidationMode[] values()
for (TrafficNetworkIdValidationMode c : TrafficNetworkIdValidationMode.values()) System.out.println(c);
public static TrafficNetworkIdValidationMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static TrafficNetworkIdValidationMode fromString(String text)
public static TrafficNetworkIdValidationMode fromConfigs(org.apache.kafka.common.network.CCloudTrafficType trafficType, Supplier<String> jaasConfigEntryOption)
public abstract boolean trafficAllowed(Optional<String> networkId, org.apache.kafka.server.traffic.TrafficNetworkIdRoutes networkIdRoutes)
networkId
- The networkId attempting to send traffic.networkIdRoutes
- The allowed routes.