private static Set<String> processAuthToLocalProperties(Set<String> previousStackAuthToLocalProperties,
                                                          Set<String> newStackAuthToLocalProperties,
                                                          Set<String> userAuthToLocalProperties) {
    if (userAuthToLocalProperties == null) {
      return null;
    }

    TreeSet<String> updatedAuthToLocalProperties = new TreeSet<>(userAuthToLocalProperties);

    // Remove old configuration specifications, leaving the user-specified ones.
    if (previousStackAuthToLocalProperties != null) {
      updatedAuthToLocalProperties.removeAll(previousStackAuthToLocalProperties);
    }

    // Add the new configuration specifications
    if (newStackAuthToLocalProperties != null) {
      updatedAuthToLocalProperties.addAll(newStackAuthToLocalProperties);
    }

    return updatedAuthToLocalProperties;
  }
Processes a the list of configuration specification (<code>&lt;configuration type&gt;/&lt;property name&gt;</code>)
identifying the properties that should be automatically updated with generated auth-to-local rules.
<p>
If no user-specified properties are set, <code>null</code> is returned.
<p>
Else the configuration specifications from the previous stack are removed from the user-specified
data and the configuration specifications from the new stack are added to the user-specified,
leaving the new list of configuration specifications  as well as any user-specified changes.

@param previousStackAuthToLocalProperties the auth-to-local properties from the previous stack version's Kerberos descriptor
@param newStackAuthToLocalProperties      the auth-to-local properties from the new stack version's Kerberos descriptor
@param userAuthToLocalProperties          the auth-to-local properties from the user-specified Kerberos descriptor
@return an updated {@link Set} of configuration specifications
ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorUpdateHelper.java