private AmbariKerberosAuthenticationProperties createKerberosAuthenticationProperties() {
    AmbariKerberosAuthenticationProperties kerberosAuthProperties = new AmbariKerberosAuthenticationProperties();

    kerberosAuthProperties.setKerberosAuthenticationEnabled(Boolean.valueOf(getProperty(KERBEROS_AUTH_ENABLED)));

    // if Kerberos authentication is enabled, continue; else ignore the rest of related properties since
    // they will not be used.
    if (!kerberosAuthProperties.isKerberosAuthenticationEnabled()) {
      return kerberosAuthProperties;
    }

    // Get and process the SPNEGO principal name.  If it exists and contains the host replacement
    // indicator (_HOST), replace it with the hostname of the current host.
    String spnegoPrincipalName = getProperty(KERBEROS_AUTH_SPNEGO_PRINCIPAL);

    if ((spnegoPrincipalName != null) && (spnegoPrincipalName.contains("_HOST"))) {
      String hostName = StageUtils.getHostName();

      if (StringUtils.isEmpty(hostName)) {
        LOG.warn("Cannot replace _HOST in the configured SPNEGO principal name with the host name this host since it is not available");
      } else {
        LOG.info("Replacing _HOST in the configured SPNEGO principal name with the host name this host: {}", hostName);
        spnegoPrincipalName = spnegoPrincipalName.replaceAll("_HOST", hostName);
      }
    }

    kerberosAuthProperties.setSpnegoPrincipalName(spnegoPrincipalName);

    // Validate the SPNEGO principal name to ensure it was set.
    // Log any found issues.
    if (StringUtils.isEmpty(kerberosAuthProperties.getSpnegoPrincipalName())) {
      String message = String.format("The SPNEGO principal name specified in %s is empty. " +
              "This will cause issues authenticating users using Kerberos.",
          KERBEROS_AUTH_SPNEGO_PRINCIPAL.getKey());
      LOG.error(message);
      throw new IllegalArgumentException(message);
    }

    // Get the SPNEGO keytab file. There is nothing special to process for this value.
    kerberosAuthProperties.setSpnegoKeytabFilePath(getProperty(KERBEROS_AUTH_SPNEGO_KEYTAB_FILE));

    // Validate the SPNEGO keytab file to ensure it was set, it exists and it is readable by Ambari.
    // Log any found issues.
    if (StringUtils.isEmpty(kerberosAuthProperties.getSpnegoKeytabFilePath())) {
      String message = String.format("The SPNEGO keytab file path specified in %s is empty. " +
              "This will cause issues authenticating users using Kerberos.",
          KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey());
      LOG.error(message);
      throw new IllegalArgumentException(message);
    } else {
      File keytabFile = new File(kerberosAuthProperties.getSpnegoKeytabFilePath());
      if (!keytabFile.exists()) {
        String message = String.format("The SPNEGO keytab file path (%s) specified in %s does not exist. " +
                "This will cause issues authenticating users using Kerberos. . Make sure proper keytab file provided later.",
            keytabFile.getAbsolutePath(), KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey());
        LOG.error(message);
      } else if (!keytabFile.canRead()) {
        String message = String.format("The SPNEGO keytab file path (%s) specified in %s cannot be read. " +
                "This will cause issues authenticating users using Kerberos. . Make sure proper keytab file provided later.",
            keytabFile.getAbsolutePath(), KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey());
        LOG.error(message);
      }
    }

    // Get the auth-to-local rule set. There is nothing special to process for this value.
    kerberosAuthProperties.setAuthToLocalRules(getProperty(KERBEROS_AUTH_AUTH_TO_LOCAL_RULES));

    LOG.info("Kerberos authentication is enabled:\n " +
            "\t{}: {}\n" +
            "\t{}: {}\n" +
            "\t{}: {}\n" +
            "\t{}: {}\n",
        KERBEROS_AUTH_ENABLED.getKey(),
        kerberosAuthProperties.isKerberosAuthenticationEnabled(),
        KERBEROS_AUTH_SPNEGO_PRINCIPAL.getKey(),
        kerberosAuthProperties.getSpnegoPrincipalName(),
        KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey(),
        kerberosAuthProperties.getSpnegoKeytabFilePath(),
        KERBEROS_AUTH_AUTH_TO_LOCAL_RULES.getKey(),
        kerberosAuthProperties.getAuthToLocalRules());

    return kerberosAuthProperties;
  }
Creates an AmbariKerberosAuthenticationProperties instance containing the Kerberos authentication-specific
properties.

The relevant properties are processed to set any default values or translate the propery values
into usable data for the Kerberos authentication logic.

@return
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java