PasswordPolicyImportPlugin.java revision 1638
5826N/A * The contents of this file are subject to the terms of the 5826N/A * Common Development and Distribution License, Version 1.0 only 5826N/A * (the "License"). You may not use this file except in compliance 5826N/A * You can obtain a copy of the license at 6982N/A * See the License for the specific language governing permissions 5826N/A * and limitations under the License. 5826N/A * When distributing Covered Code, include this CDDL HEADER in each 5826N/A * file and include the License file at 6982N/A * add the following below this CDDL HEADER, with the fields enclosed 6982N/A * by brackets "[]" replaced with your own identifying information: 6982N/A * Portions Copyright [yyyy] [name of copyright owner] 5826N/A * Portions Copyright 2006-2007 Sun Microsystems, Inc. 5826N/A * This class implements a Directory Server plugin that performs various 5826N/A * password policy processing during an LDIF import. In particular, it ensures 5826N/A * that all of the password values are properly encoded before they are stored. 5826N/A * The tracer object for the debug logger. 5826N/A // The attribute type used to specify the password policy for an entry. 5826N/A // The set of attribute types defined in the schema with the auth password 5826N/A // The set of attribute types defined in the schema with the user password 5826N/A // The set of password storage schemes to use for the various password 5826N/A // policies defined in the server. 5826N/A // The default password storage schemes for auth password attributes. 5826N/A // The default password storage schemes for user password attributes. 5826N/A * Creates a new instance of this Directory Server plugin. Every plugin must 5826N/A * implement a default constructor (it is the only one that will be used to 5826N/A * create plugins defined in the configuration), and every plugin constructor 5826N/A * must call {@code super()} as its first element. 5826N/A // Make sure that the plugin has been enabled for the appropriate types. 5826N/A // This is the only acceptable type. 5826N/A // Get the set of default password storage schemes for auth password 5826N/A // Get the set of default password storage schemes for user password 5826N/A // Find the set of attribute types with the auth password and user password 5826N/A // syntax defined in the schema. 5826N/A // Get the set of password policies defined in the server and get the 5826N/A // attribute types associated with them. 5826N/A // No implementation is required. 5826N/A // Create a list that we will use to hold new encoded values. 5826N/A // See if the entry explicitly states the password policy that it should 5826N/A // use. If so, then only use it to perform the encoding. 5826N/A // Iterate through the list of auth password attributes. If any of them 5826N/A // are present and their values are not encoded, then encode them with all 5826N/A // Iterate through the list of user password attributes. If any of them 5826N/A // are present and their values are not encoded, then encode them with all 5826N/A // Ensure that the set of plugin types contains only LDIF import. 5826N/A // This is the only acceptable type. 5826N/A // Get the set of default password storage schemes for auth password 5826N/A // Get the set of default password storage schemes for user password 5826N/A // Get the set of default password storage schemes for auth password 5826N/A // Get the set of default password storage schemes for user password