def is_security_enabled(args):
  get_service_config(args)

  if args.service == "zookeeper":
    return len(args.zookeeper_config.configuration.generated_files["jaas-server.conf"]) != 0
  elif args.service == "hdfs":
    core_site_dict = args.hdfs_config.configuration.generated_files["core-site.xml"]
    return (core_site_dict["hadoop.security.authentication"] == "kerberos") and (
             core_site_dict["hadoop.security.authorization"] == "true")
  elif args.service == "yarn":
    core_site_dict = args.yarn_config.configuration.generated_files["core-site.xml"]
    return (core_site_dict["hadoop.security.authentication"] == "kerberos") and (
             core_site_dict["hadoop.security.authorization"] == "true")
  elif args.service == "hbase":
    hbase_site_dict = args.hbase_config.configuration.generated_files["hbase-site.xml"]
    return (hbase_site_dict["hbase.security.authentication"] == "kerberos") and (
             hbase_site_dict["hbase.security.authorization"] == "true")
  elif args.service == "impala":
    core_site_dict = args.impala_config.configuration.generated_files["core-site.xml"]
    return (core_site_dict["hadoop.security.authentication"] == "kerberos") and (
             core_site_dict["hadoop.security.authorization"] == "true")
  elif args.service == "fds":
    core_site_dict = args.fds_config.configuration.generated_files["core-site.xml"]
    return (core_site_dict["hadoop.security.authentication"] == "kerberos") and (
             core_site_dict["hadoop.security.authorization"] == "true")
  elif args.service == "chronos":
    chronos_dict = args.chronos_config.configuration.generated_files["chronos.cfg"]
    return (chronos_dict["zkSecure"] == "true")
  else:
    return False
Determine if security is enabled or not.
dataset/ETHPy150Open XiaoMi/minos/client/deploy_utils.py/is_security_enabled