Enum Class DefaultDataPolicyValidationMode

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

public enum DefaultDataPolicyValidationMode extends Enum<DefaultDataPolicyValidationMode>
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

  • Enum Constant Details

  • Field Details

    • DEFAULT_DATA_POLICY_VALIDATION_MODE_KEY

      public static final String DEFAULT_DATA_POLICY_VALIDATION_MODE_KEY
      See Also:
  • Method Details

    • values

      public static DefaultDataPolicyValidationMode[] 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 DefaultDataPolicyValidationMode 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 DefaultDataPolicyValidationMode fromString(String text)
    • fromConfigs

      public static DefaultDataPolicyValidationMode fromConfigs(Supplier<String> jaasConfigEntryOption)
    • 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