static SecurityProtocol securityProtocol(Properties props) {
    String[] securityProtocolConfigs = new String[] { CommonClientConfigs.SECURITY_PROTOCOL_CONFIG,
        CONSUMER_CONFIGURATION_PREFIX + "." + CommonClientConfigs.SECURITY_PROTOCOL_CONFIG,
        PRODUCER_CONFIGURATION_PREFIX + "." + CommonClientConfigs.SECURITY_PROTOCOL_CONFIG };
    for (String c : securityProtocolConfigs) {
      String v = props.getProperty(c);
      if (v != null && !v.isEmpty()) {
        return SecurityProtocol.forName(v);
      }
    }
    return null;
  }
Returns the security protocol if one is defined in the properties and null otherwise.
<p>The following properties are examined to determine the protocol:</p>
<ol>
  <li>security.protocol</li>
  <li>kafka.consumer.security.protocol</li>
  <li>kafka.producer.security.protocol</li>
</ol>
<p>and the first non null/not empty is returned.</p>
<p>Defining multiple security protocols at the same time is invalid but this method is lenient and tries to pick
the most reasonable option.</p>
@param props the properties from which to obtain the protocol.
@return the security protocol if one is defined in the properties and null otherwise.
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaUtils.java