private String persistKerberosDescriptor(String descriptor) {
    LOGGER.debug("Generating new kerberos descriptor reference ...");
    String kdReference = generateKerberosDescriptorReference();

    KerberosDescriptor kerberosDescriptor = kerberosDescriptorFactory.createKerberosDescriptor(kdReference, descriptor);

    LOGGER.debug("Persisting kerberos descriptor ...");
    kerberosDescriptorDAO.create(kerberosDescriptor.toEntity());
    return kdReference;
  }
Creates and also validates SecurityConfiguration based on properties parsed from request Json.

@param properties Security properties from Json parsed into a Map
@param persistEmbeddedDescriptor whether to save embedded descriptor or not
ambari-server/src/main/java/org/apache/ambari/server/topology/SecurityConfigurationFactory.java