Enum Class DefaultDataPolicyValidationMode
java.lang.Object
java.lang.Enum<DefaultDataPolicyValidationMode>
io.confluent.kafka.server.plugins.auth.DefaultDataPolicyValidationMode
- All Implemented Interfaces:
Serializable,Comparable<DefaultDataPolicyValidationMode>,Constable
Enum class that represents different modes of Default Data Policy validation in the authenticator.
none: default mode for the listeners: - no validation of the default data policy is done
strict: to be configured for flat networking listener: - requires - isOrgDenied to be false AND - localLkcOrganizationId the same as organizationId AND - networkType to be PRIVATE.
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(Supplier<String> jaasConfigEntryOption) fromString(String text) abstract booleantrafficAllowed(boolean isOrgDenied, Optional<String> localLkcOrganizationId, DefaultDataPolicyContext policyContext, Collection<String> requestedSameOrgIds) Validate if the supplied environmentId and networkType are allowed to talk to this cluster.Returns the enum constant of this class with the specified name.static DefaultDataPolicyValidationMode[]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
-
REQUESTED_SAME_ORG
-
-
Field Details
-
DEFAULT_DATA_POLICY_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
-
trafficAllowed
public abstract boolean trafficAllowed(boolean isOrgDenied, Optional<String> localLkcOrganizationId, DefaultDataPolicyContext policyContext, Collection<String> requestedSameOrgIds) Validate if the supplied environmentId and networkType are allowed to talk to this cluster.- Parameters:
isOrgDenied- True if the local lkc organization is denied from participating default data policy.localLkcOrganizationId- Local lkc organization id.policyContext- The context that contains the client information like client's environment id.requestedSameOrgIds- The IDs of the organizations that require same-org check for cluster linking. This is only used by REQUESTED_SAME_ORG mode.- Returns:
- true if the traffic is allowed, false otherwise
-