Enum Class TrafficNetworkIdValidationMode
java.lang.Object
java.lang.Enum<TrafficNetworkIdValidationMode>
io.confluent.kafka.server.plugins.auth.TrafficNetworkIdValidationMode
- All Implemented Interfaces:
Serializable,Comparable<TrafficNetworkIdValidationMode>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfromConfigs(org.apache.kafka.common.network.CCloudTrafficType trafficType, Supplier<String> jaasConfigEntryOption) fromString(String text) abstract booleantrafficAllowed(Optional<String> networkId, org.apache.kafka.server.traffic.TrafficNetworkIdRoutes networkIdRoutes) Validate if the supplied NetworkId is allowed to talk to this cluster's network.Returns the enum constant of this class with the specified name.static TrafficNetworkIdValidationMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
NONE
-
STRICT
-
-
Field Details
-
TRAFFIC_NETWORK_ID_VALIDATION_MODE_KEY
- See Also:
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromString
-
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
-