Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-20697

Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

    XMLWordPrintableJSON

Details

    Description

      if ranger_plugin_enabled:

      1. If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
      2. determine if the Ranger/Kafka plug-in enabled enabled or not
        if 'ranger-kafka-plugin-properties' in configurations and \
        'ranger-kafka-plugin-enabled' in configurations['ranger-kafka-plugin-properties']['properties']:
        ranger_plugin_enabled = configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower() == 'yes'
      3. If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not changed,
      4. determine if the Ranger/Kafka plug-in enabled enabled or not
        elif 'ranger-kafka-plugin-properties' in services['configurations'] and \
        'ranger-kafka-plugin-enabled' in services['configurations']['ranger-kafka-plugin-properties']['properties']:
        ranger_plugin_enabled = services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower() == 'yes'
      1. Determine the value for kafka-broker/authorizer.class.name
        if ranger_plugin_enabled:
      2. If the Ranger plugin for Kafka is enabled, set authorizer.class.name to
      3. "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" whether Kerberos is
      4. enabled or not.
        putKafkaBrokerProperty("authorizer.class.name", 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
        elif security_enabled:
        putKafkaBrokerProperty("authorizer.class.name", 'kafka.security.auth.SimpleAclAuthorizer')
        else:
        putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')

      In the above code after ranger_plugin_enabled is true and inside conditions don't match then also we set authorizer.class.name to RangerKafakAuthorizer. So, to avoid this after checking ranger_plugin_enabled set to false and then continue with code checking

      Attachments

        1. AMBARI-20697.PATCH
          1 kB
          Bharat Viswanadham

        Issue Links

          Activity

            People

              bharat Bharat Viswanadham
              bharat Bharat Viswanadham
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: