001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.opends.server.admin.std.meta;
017
018
019
020import java.util.Collection;
021import java.util.SortedSet;
022import java.util.TreeSet;
023import org.forgerock.opendj.ldap.DN;
024import org.forgerock.opendj.ldap.schema.AttributeType;
025import org.opends.server.admin.AdministratorAction;
026import org.opends.server.admin.AggregationPropertyDefinition;
027import org.opends.server.admin.AttributeTypePropertyDefinition;
028import org.opends.server.admin.BooleanPropertyDefinition;
029import org.opends.server.admin.ClassPropertyDefinition;
030import org.opends.server.admin.client.AuthorizationException;
031import org.opends.server.admin.client.CommunicationException;
032import org.opends.server.admin.client.ConcurrentModificationException;
033import org.opends.server.admin.client.ManagedObject;
034import org.opends.server.admin.client.MissingMandatoryPropertiesException;
035import org.opends.server.admin.client.OperationRejectedException;
036import org.opends.server.admin.condition.Conditions;
037import org.opends.server.admin.DefaultBehaviorProvider;
038import org.opends.server.admin.DefinedDefaultBehaviorProvider;
039import org.opends.server.admin.DurationPropertyDefinition;
040import org.opends.server.admin.EnumPropertyDefinition;
041import org.opends.server.admin.IntegerPropertyDefinition;
042import org.opends.server.admin.ManagedObjectAlreadyExistsException;
043import org.opends.server.admin.ManagedObjectDefinition;
044import org.opends.server.admin.PropertyOption;
045import org.opends.server.admin.PropertyProvider;
046import org.opends.server.admin.server.ConfigurationChangeListener;
047import org.opends.server.admin.server.ServerManagedObject;
048import org.opends.server.admin.std.client.AccountStatusNotificationHandlerCfgClient;
049import org.opends.server.admin.std.client.PasswordGeneratorCfgClient;
050import org.opends.server.admin.std.client.PasswordPolicyCfgClient;
051import org.opends.server.admin.std.client.PasswordStorageSchemeCfgClient;
052import org.opends.server.admin.std.client.PasswordValidatorCfgClient;
053import org.opends.server.admin.std.server.AccountStatusNotificationHandlerCfg;
054import org.opends.server.admin.std.server.AuthenticationPolicyCfg;
055import org.opends.server.admin.std.server.PasswordGeneratorCfg;
056import org.opends.server.admin.std.server.PasswordPolicyCfg;
057import org.opends.server.admin.std.server.PasswordStorageSchemeCfg;
058import org.opends.server.admin.std.server.PasswordValidatorCfg;
059import org.opends.server.admin.StringPropertyDefinition;
060import org.opends.server.admin.Tag;
061import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
062
063
064
065/**
066 * An interface for querying the Password Policy managed object
067 * definition meta information.
068 * <p>
069 * Password Policies define a number of password management rules, as
070 * well as requirements for authentication processing.
071 */
072public final class PasswordPolicyCfgDefn extends ManagedObjectDefinition<PasswordPolicyCfgClient, PasswordPolicyCfg> {
073
074  // The singleton configuration definition instance.
075  private static final PasswordPolicyCfgDefn INSTANCE = new PasswordPolicyCfgDefn();
076
077
078
079  /**
080   * Defines the set of permissable values for the "state-update-failure-policy" property.
081   * <p>
082   * Specifies how the server deals with the inability to update
083   * password policy state information during an authentication
084   * attempt.
085   * <p>
086   * In particular, this property can be used to control whether an
087   * otherwise successful bind operation fails if a failure occurs
088   * while attempting to update password policy state information (for
089   * example, to clear a record of previous authentication failures or
090   * to update the last login time). It can also be used to control
091   * whether to reject a bind request if it is known ahead of time that
092   * it will not be possible to update the authentication failure times
093   * in the event of an unsuccessful bind attempt (for example, if the
094   * backend writability mode is disabled).
095   */
096  public static enum StateUpdateFailurePolicy {
097
098    /**
099     * If a bind attempt would otherwise be successful, then do not
100     * reject it if a problem occurs while attempting to update the
101     * password policy state information for the user.
102     */
103    IGNORE("ignore"),
104
105
106
107    /**
108     * Proactively reject any bind attempt if it is known ahead of
109     * time that it would not be possible to update the user's password
110     * policy state information.
111     */
112    PROACTIVE("proactive"),
113
114
115
116    /**
117     * Even if a bind attempt would otherwise be successful, reject it
118     * if a problem occurs while attempting to update the password
119     * policy state information for the user.
120     */
121    REACTIVE("reactive");
122
123
124
125    // String representation of the value.
126    private final String name;
127
128
129
130    // Private constructor.
131    private StateUpdateFailurePolicy(String name) { this.name = name; }
132
133
134
135    /**
136     * {@inheritDoc}
137     */
138    public String toString() { return name; }
139
140  }
141
142
143
144  // The "account-status-notification-handler" property definition.
145  private static final AggregationPropertyDefinition<AccountStatusNotificationHandlerCfgClient, AccountStatusNotificationHandlerCfg> PD_ACCOUNT_STATUS_NOTIFICATION_HANDLER;
146
147
148
149  // The "allow-expired-password-changes" property definition.
150  private static final BooleanPropertyDefinition PD_ALLOW_EXPIRED_PASSWORD_CHANGES;
151
152
153
154  // The "allow-multiple-password-values" property definition.
155  private static final BooleanPropertyDefinition PD_ALLOW_MULTIPLE_PASSWORD_VALUES;
156
157
158
159  // The "allow-pre-encoded-passwords" property definition.
160  private static final BooleanPropertyDefinition PD_ALLOW_PRE_ENCODED_PASSWORDS;
161
162
163
164  // The "allow-user-password-changes" property definition.
165  private static final BooleanPropertyDefinition PD_ALLOW_USER_PASSWORD_CHANGES;
166
167
168
169  // The "default-password-storage-scheme" property definition.
170  private static final AggregationPropertyDefinition<PasswordStorageSchemeCfgClient, PasswordStorageSchemeCfg> PD_DEFAULT_PASSWORD_STORAGE_SCHEME;
171
172
173
174  // The "deprecated-password-storage-scheme" property definition.
175  private static final AggregationPropertyDefinition<PasswordStorageSchemeCfgClient, PasswordStorageSchemeCfg> PD_DEPRECATED_PASSWORD_STORAGE_SCHEME;
176
177
178
179  // The "expire-passwords-without-warning" property definition.
180  private static final BooleanPropertyDefinition PD_EXPIRE_PASSWORDS_WITHOUT_WARNING;
181
182
183
184  // The "force-change-on-add" property definition.
185  private static final BooleanPropertyDefinition PD_FORCE_CHANGE_ON_ADD;
186
187
188
189  // The "force-change-on-reset" property definition.
190  private static final BooleanPropertyDefinition PD_FORCE_CHANGE_ON_RESET;
191
192
193
194  // The "grace-login-count" property definition.
195  private static final IntegerPropertyDefinition PD_GRACE_LOGIN_COUNT;
196
197
198
199  // The "idle-lockout-interval" property definition.
200  private static final DurationPropertyDefinition PD_IDLE_LOCKOUT_INTERVAL;
201
202
203
204  // The "java-class" property definition.
205  private static final ClassPropertyDefinition PD_JAVA_CLASS;
206
207
208
209  // The "last-login-time-attribute" property definition.
210  private static final AttributeTypePropertyDefinition PD_LAST_LOGIN_TIME_ATTRIBUTE;
211
212
213
214  // The "last-login-time-format" property definition.
215  private static final StringPropertyDefinition PD_LAST_LOGIN_TIME_FORMAT;
216
217
218
219  // The "lockout-duration" property definition.
220  private static final DurationPropertyDefinition PD_LOCKOUT_DURATION;
221
222
223
224  // The "lockout-failure-count" property definition.
225  private static final IntegerPropertyDefinition PD_LOCKOUT_FAILURE_COUNT;
226
227
228
229  // The "lockout-failure-expiration-interval" property definition.
230  private static final DurationPropertyDefinition PD_LOCKOUT_FAILURE_EXPIRATION_INTERVAL;
231
232
233
234  // The "max-password-age" property definition.
235  private static final DurationPropertyDefinition PD_MAX_PASSWORD_AGE;
236
237
238
239  // The "max-password-reset-age" property definition.
240  private static final DurationPropertyDefinition PD_MAX_PASSWORD_RESET_AGE;
241
242
243
244  // The "min-password-age" property definition.
245  private static final DurationPropertyDefinition PD_MIN_PASSWORD_AGE;
246
247
248
249  // The "password-attribute" property definition.
250  private static final AttributeTypePropertyDefinition PD_PASSWORD_ATTRIBUTE;
251
252
253
254  // The "password-change-requires-current-password" property definition.
255  private static final BooleanPropertyDefinition PD_PASSWORD_CHANGE_REQUIRES_CURRENT_PASSWORD;
256
257
258
259  // The "password-expiration-warning-interval" property definition.
260  private static final DurationPropertyDefinition PD_PASSWORD_EXPIRATION_WARNING_INTERVAL;
261
262
263
264  // The "password-generator" property definition.
265  private static final AggregationPropertyDefinition<PasswordGeneratorCfgClient, PasswordGeneratorCfg> PD_PASSWORD_GENERATOR;
266
267
268
269  // The "password-history-count" property definition.
270  private static final IntegerPropertyDefinition PD_PASSWORD_HISTORY_COUNT;
271
272
273
274  // The "password-history-duration" property definition.
275  private static final DurationPropertyDefinition PD_PASSWORD_HISTORY_DURATION;
276
277
278
279  // The "password-validator" property definition.
280  private static final AggregationPropertyDefinition<PasswordValidatorCfgClient, PasswordValidatorCfg> PD_PASSWORD_VALIDATOR;
281
282
283
284  // The "previous-last-login-time-format" property definition.
285  private static final StringPropertyDefinition PD_PREVIOUS_LAST_LOGIN_TIME_FORMAT;
286
287
288
289  // The "require-change-by-time" property definition.
290  private static final StringPropertyDefinition PD_REQUIRE_CHANGE_BY_TIME;
291
292
293
294  // The "require-secure-authentication" property definition.
295  private static final BooleanPropertyDefinition PD_REQUIRE_SECURE_AUTHENTICATION;
296
297
298
299  // The "require-secure-password-changes" property definition.
300  private static final BooleanPropertyDefinition PD_REQUIRE_SECURE_PASSWORD_CHANGES;
301
302
303
304  // The "skip-validation-for-administrators" property definition.
305  private static final BooleanPropertyDefinition PD_SKIP_VALIDATION_FOR_ADMINISTRATORS;
306
307
308
309  // The "state-update-failure-policy" property definition.
310  private static final EnumPropertyDefinition<StateUpdateFailurePolicy> PD_STATE_UPDATE_FAILURE_POLICY;
311
312
313
314  // Build the "account-status-notification-handler" property definition.
315  static {
316      AggregationPropertyDefinition.Builder<AccountStatusNotificationHandlerCfgClient, AccountStatusNotificationHandlerCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "account-status-notification-handler");
317      builder.setOption(PropertyOption.MULTI_VALUED);
318      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "account-status-notification-handler"));
319      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
320      builder.setParentPath("/");
321      builder.setRelationDefinition("account-status-notification-handler");
322      builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
323      PD_ACCOUNT_STATUS_NOTIFICATION_HANDLER = builder.getInstance();
324      INSTANCE.registerPropertyDefinition(PD_ACCOUNT_STATUS_NOTIFICATION_HANDLER);
325      INSTANCE.registerConstraint(PD_ACCOUNT_STATUS_NOTIFICATION_HANDLER.getSourceConstraint());
326  }
327
328
329
330  // Build the "allow-expired-password-changes" property definition.
331  static {
332      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "allow-expired-password-changes");
333      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "allow-expired-password-changes"));
334      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
335      builder.setDefaultBehaviorProvider(provider);
336      PD_ALLOW_EXPIRED_PASSWORD_CHANGES = builder.getInstance();
337      INSTANCE.registerPropertyDefinition(PD_ALLOW_EXPIRED_PASSWORD_CHANGES);
338  }
339
340
341
342  // Build the "allow-multiple-password-values" property definition.
343  static {
344      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "allow-multiple-password-values");
345      builder.setOption(PropertyOption.ADVANCED);
346      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "allow-multiple-password-values"));
347      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
348      builder.setDefaultBehaviorProvider(provider);
349      PD_ALLOW_MULTIPLE_PASSWORD_VALUES = builder.getInstance();
350      INSTANCE.registerPropertyDefinition(PD_ALLOW_MULTIPLE_PASSWORD_VALUES);
351  }
352
353
354
355  // Build the "allow-pre-encoded-passwords" property definition.
356  static {
357      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "allow-pre-encoded-passwords");
358      builder.setOption(PropertyOption.ADVANCED);
359      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "allow-pre-encoded-passwords"));
360      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
361      builder.setDefaultBehaviorProvider(provider);
362      PD_ALLOW_PRE_ENCODED_PASSWORDS = builder.getInstance();
363      INSTANCE.registerPropertyDefinition(PD_ALLOW_PRE_ENCODED_PASSWORDS);
364  }
365
366
367
368  // Build the "allow-user-password-changes" property definition.
369  static {
370      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "allow-user-password-changes");
371      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "allow-user-password-changes"));
372      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
373      builder.setDefaultBehaviorProvider(provider);
374      PD_ALLOW_USER_PASSWORD_CHANGES = builder.getInstance();
375      INSTANCE.registerPropertyDefinition(PD_ALLOW_USER_PASSWORD_CHANGES);
376  }
377
378
379
380  // Build the "default-password-storage-scheme" property definition.
381  static {
382      AggregationPropertyDefinition.Builder<PasswordStorageSchemeCfgClient, PasswordStorageSchemeCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "default-password-storage-scheme");
383      builder.setOption(PropertyOption.MULTI_VALUED);
384      builder.setOption(PropertyOption.MANDATORY);
385      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "default-password-storage-scheme"));
386      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
387      builder.setParentPath("/");
388      builder.setRelationDefinition("password-storage-scheme");
389      builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
390      PD_DEFAULT_PASSWORD_STORAGE_SCHEME = builder.getInstance();
391      INSTANCE.registerPropertyDefinition(PD_DEFAULT_PASSWORD_STORAGE_SCHEME);
392      INSTANCE.registerConstraint(PD_DEFAULT_PASSWORD_STORAGE_SCHEME.getSourceConstraint());
393  }
394
395
396
397  // Build the "deprecated-password-storage-scheme" property definition.
398  static {
399      AggregationPropertyDefinition.Builder<PasswordStorageSchemeCfgClient, PasswordStorageSchemeCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "deprecated-password-storage-scheme");
400      builder.setOption(PropertyOption.MULTI_VALUED);
401      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "deprecated-password-storage-scheme"));
402      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
403      builder.setParentPath("/");
404      builder.setRelationDefinition("password-storage-scheme");
405      builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
406      PD_DEPRECATED_PASSWORD_STORAGE_SCHEME = builder.getInstance();
407      INSTANCE.registerPropertyDefinition(PD_DEPRECATED_PASSWORD_STORAGE_SCHEME);
408      INSTANCE.registerConstraint(PD_DEPRECATED_PASSWORD_STORAGE_SCHEME.getSourceConstraint());
409  }
410
411
412
413  // Build the "expire-passwords-without-warning" property definition.
414  static {
415      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "expire-passwords-without-warning");
416      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "expire-passwords-without-warning"));
417      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
418      builder.setDefaultBehaviorProvider(provider);
419      PD_EXPIRE_PASSWORDS_WITHOUT_WARNING = builder.getInstance();
420      INSTANCE.registerPropertyDefinition(PD_EXPIRE_PASSWORDS_WITHOUT_WARNING);
421  }
422
423
424
425  // Build the "force-change-on-add" property definition.
426  static {
427      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "force-change-on-add");
428      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "force-change-on-add"));
429      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
430      builder.setDefaultBehaviorProvider(provider);
431      PD_FORCE_CHANGE_ON_ADD = builder.getInstance();
432      INSTANCE.registerPropertyDefinition(PD_FORCE_CHANGE_ON_ADD);
433  }
434
435
436
437  // Build the "force-change-on-reset" property definition.
438  static {
439      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "force-change-on-reset");
440      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "force-change-on-reset"));
441      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
442      builder.setDefaultBehaviorProvider(provider);
443      PD_FORCE_CHANGE_ON_RESET = builder.getInstance();
444      INSTANCE.registerPropertyDefinition(PD_FORCE_CHANGE_ON_RESET);
445  }
446
447
448
449  // Build the "grace-login-count" property definition.
450  static {
451      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "grace-login-count");
452      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "grace-login-count"));
453      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("0");
454      builder.setDefaultBehaviorProvider(provider);
455      builder.setUpperLimit(2147483647);
456      builder.setLowerLimit(0);
457      PD_GRACE_LOGIN_COUNT = builder.getInstance();
458      INSTANCE.registerPropertyDefinition(PD_GRACE_LOGIN_COUNT);
459  }
460
461
462
463  // Build the "idle-lockout-interval" property definition.
464  static {
465      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "idle-lockout-interval");
466      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "idle-lockout-interval"));
467      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 seconds");
468      builder.setDefaultBehaviorProvider(provider);
469      builder.setUpperLimit("2147483647");
470      builder.setLowerLimit("0");
471      PD_IDLE_LOCKOUT_INTERVAL = builder.getInstance();
472      INSTANCE.registerPropertyDefinition(PD_IDLE_LOCKOUT_INTERVAL);
473  }
474
475
476
477  // Build the "java-class" property definition.
478  static {
479      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
480      builder.setOption(PropertyOption.MANDATORY);
481      builder.setOption(PropertyOption.ADVANCED);
482      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class"));
483      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.core.PasswordPolicyFactory");
484      builder.setDefaultBehaviorProvider(provider);
485      builder.addInstanceOf("org.opends.server.api.AuthenticationPolicyFactory");
486      PD_JAVA_CLASS = builder.getInstance();
487      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
488  }
489
490
491
492  // Build the "last-login-time-attribute" property definition.
493  static {
494      AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "last-login-time-attribute");
495      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "last-login-time-attribute"));
496      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<AttributeType>());
497      PD_LAST_LOGIN_TIME_ATTRIBUTE = builder.getInstance();
498      INSTANCE.registerPropertyDefinition(PD_LAST_LOGIN_TIME_ATTRIBUTE);
499  }
500
501
502
503  // Build the "last-login-time-format" property definition.
504  static {
505      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "last-login-time-format");
506      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "last-login-time-format"));
507      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
508      builder.setPattern(".*", "STRING");
509      PD_LAST_LOGIN_TIME_FORMAT = builder.getInstance();
510      INSTANCE.registerPropertyDefinition(PD_LAST_LOGIN_TIME_FORMAT);
511  }
512
513
514
515  // Build the "lockout-duration" property definition.
516  static {
517      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "lockout-duration");
518      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "lockout-duration"));
519      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 seconds");
520      builder.setDefaultBehaviorProvider(provider);
521      builder.setBaseUnit("s");
522      builder.setUpperLimit("2147483647");
523      builder.setLowerLimit("0");
524      PD_LOCKOUT_DURATION = builder.getInstance();
525      INSTANCE.registerPropertyDefinition(PD_LOCKOUT_DURATION);
526  }
527
528
529
530  // Build the "lockout-failure-count" property definition.
531  static {
532      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "lockout-failure-count");
533      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "lockout-failure-count"));
534      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("0");
535      builder.setDefaultBehaviorProvider(provider);
536      builder.setUpperLimit(2147483647);
537      builder.setLowerLimit(0);
538      PD_LOCKOUT_FAILURE_COUNT = builder.getInstance();
539      INSTANCE.registerPropertyDefinition(PD_LOCKOUT_FAILURE_COUNT);
540  }
541
542
543
544  // Build the "lockout-failure-expiration-interval" property definition.
545  static {
546      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "lockout-failure-expiration-interval");
547      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "lockout-failure-expiration-interval"));
548      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 seconds");
549      builder.setDefaultBehaviorProvider(provider);
550      builder.setBaseUnit("s");
551      builder.setUpperLimit("2147483647");
552      builder.setLowerLimit("0");
553      PD_LOCKOUT_FAILURE_EXPIRATION_INTERVAL = builder.getInstance();
554      INSTANCE.registerPropertyDefinition(PD_LOCKOUT_FAILURE_EXPIRATION_INTERVAL);
555  }
556
557
558
559  // Build the "max-password-age" property definition.
560  static {
561      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "max-password-age");
562      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "max-password-age"));
563      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 seconds");
564      builder.setDefaultBehaviorProvider(provider);
565      builder.setBaseUnit("s");
566      builder.setUpperLimit("2147483647");
567      builder.setLowerLimit("0");
568      PD_MAX_PASSWORD_AGE = builder.getInstance();
569      INSTANCE.registerPropertyDefinition(PD_MAX_PASSWORD_AGE);
570  }
571
572
573
574  // Build the "max-password-reset-age" property definition.
575  static {
576      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "max-password-reset-age");
577      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "max-password-reset-age"));
578      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 seconds");
579      builder.setDefaultBehaviorProvider(provider);
580      builder.setBaseUnit("s");
581      builder.setUpperLimit("2147483647");
582      builder.setLowerLimit("0");
583      PD_MAX_PASSWORD_RESET_AGE = builder.getInstance();
584      INSTANCE.registerPropertyDefinition(PD_MAX_PASSWORD_RESET_AGE);
585  }
586
587
588
589  // Build the "min-password-age" property definition.
590  static {
591      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "min-password-age");
592      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "min-password-age"));
593      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 seconds");
594      builder.setDefaultBehaviorProvider(provider);
595      builder.setBaseUnit("s");
596      builder.setUpperLimit("2147483647");
597      builder.setLowerLimit("0");
598      PD_MIN_PASSWORD_AGE = builder.getInstance();
599      INSTANCE.registerPropertyDefinition(PD_MIN_PASSWORD_AGE);
600  }
601
602
603
604  // Build the "password-attribute" property definition.
605  static {
606      AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "password-attribute");
607      builder.setOption(PropertyOption.MANDATORY);
608      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "password-attribute"));
609      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<AttributeType>());
610      PD_PASSWORD_ATTRIBUTE = builder.getInstance();
611      INSTANCE.registerPropertyDefinition(PD_PASSWORD_ATTRIBUTE);
612  }
613
614
615
616  // Build the "password-change-requires-current-password" property definition.
617  static {
618      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "password-change-requires-current-password");
619      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "password-change-requires-current-password"));
620      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
621      builder.setDefaultBehaviorProvider(provider);
622      PD_PASSWORD_CHANGE_REQUIRES_CURRENT_PASSWORD = builder.getInstance();
623      INSTANCE.registerPropertyDefinition(PD_PASSWORD_CHANGE_REQUIRES_CURRENT_PASSWORD);
624  }
625
626
627
628  // Build the "password-expiration-warning-interval" property definition.
629  static {
630      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "password-expiration-warning-interval");
631      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "password-expiration-warning-interval"));
632      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("5 days");
633      builder.setDefaultBehaviorProvider(provider);
634      PD_PASSWORD_EXPIRATION_WARNING_INTERVAL = builder.getInstance();
635      INSTANCE.registerPropertyDefinition(PD_PASSWORD_EXPIRATION_WARNING_INTERVAL);
636  }
637
638
639
640  // Build the "password-generator" property definition.
641  static {
642      AggregationPropertyDefinition.Builder<PasswordGeneratorCfgClient, PasswordGeneratorCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "password-generator");
643      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "password-generator"));
644      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
645      builder.setParentPath("/");
646      builder.setRelationDefinition("password-generator");
647      builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
648      PD_PASSWORD_GENERATOR = builder.getInstance();
649      INSTANCE.registerPropertyDefinition(PD_PASSWORD_GENERATOR);
650      INSTANCE.registerConstraint(PD_PASSWORD_GENERATOR.getSourceConstraint());
651  }
652
653
654
655  // Build the "password-history-count" property definition.
656  static {
657      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "password-history-count");
658      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "password-history-count"));
659      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("0");
660      builder.setDefaultBehaviorProvider(provider);
661      builder.setUpperLimit(2147483647);
662      builder.setLowerLimit(0);
663      PD_PASSWORD_HISTORY_COUNT = builder.getInstance();
664      INSTANCE.registerPropertyDefinition(PD_PASSWORD_HISTORY_COUNT);
665  }
666
667
668
669  // Build the "password-history-duration" property definition.
670  static {
671      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "password-history-duration");
672      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "password-history-duration"));
673      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("0 seconds");
674      builder.setDefaultBehaviorProvider(provider);
675      builder.setAllowUnlimited(false);
676      builder.setBaseUnit("s");
677      builder.setUpperLimit("2147483647");
678      builder.setLowerLimit("0");
679      PD_PASSWORD_HISTORY_DURATION = builder.getInstance();
680      INSTANCE.registerPropertyDefinition(PD_PASSWORD_HISTORY_DURATION);
681  }
682
683
684
685  // Build the "password-validator" property definition.
686  static {
687      AggregationPropertyDefinition.Builder<PasswordValidatorCfgClient, PasswordValidatorCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "password-validator");
688      builder.setOption(PropertyOption.MULTI_VALUED);
689      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "password-validator"));
690      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
691      builder.setParentPath("/");
692      builder.setRelationDefinition("password-validator");
693      builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
694      PD_PASSWORD_VALIDATOR = builder.getInstance();
695      INSTANCE.registerPropertyDefinition(PD_PASSWORD_VALIDATOR);
696      INSTANCE.registerConstraint(PD_PASSWORD_VALIDATOR.getSourceConstraint());
697  }
698
699
700
701  // Build the "previous-last-login-time-format" property definition.
702  static {
703      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "previous-last-login-time-format");
704      builder.setOption(PropertyOption.MULTI_VALUED);
705      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "previous-last-login-time-format"));
706      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
707      builder.setPattern(".*", "STRING");
708      PD_PREVIOUS_LAST_LOGIN_TIME_FORMAT = builder.getInstance();
709      INSTANCE.registerPropertyDefinition(PD_PREVIOUS_LAST_LOGIN_TIME_FORMAT);
710  }
711
712
713
714  // Build the "require-change-by-time" property definition.
715  static {
716      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "require-change-by-time");
717      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "require-change-by-time"));
718      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
719      builder.setPattern(".*", "STRING");
720      PD_REQUIRE_CHANGE_BY_TIME = builder.getInstance();
721      INSTANCE.registerPropertyDefinition(PD_REQUIRE_CHANGE_BY_TIME);
722  }
723
724
725
726  // Build the "require-secure-authentication" property definition.
727  static {
728      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "require-secure-authentication");
729      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "require-secure-authentication"));
730      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
731      builder.setDefaultBehaviorProvider(provider);
732      PD_REQUIRE_SECURE_AUTHENTICATION = builder.getInstance();
733      INSTANCE.registerPropertyDefinition(PD_REQUIRE_SECURE_AUTHENTICATION);
734  }
735
736
737
738  // Build the "require-secure-password-changes" property definition.
739  static {
740      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "require-secure-password-changes");
741      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "require-secure-password-changes"));
742      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
743      builder.setDefaultBehaviorProvider(provider);
744      PD_REQUIRE_SECURE_PASSWORD_CHANGES = builder.getInstance();
745      INSTANCE.registerPropertyDefinition(PD_REQUIRE_SECURE_PASSWORD_CHANGES);
746  }
747
748
749
750  // Build the "skip-validation-for-administrators" property definition.
751  static {
752      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "skip-validation-for-administrators");
753      builder.setOption(PropertyOption.ADVANCED);
754      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "skip-validation-for-administrators"));
755      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
756      builder.setDefaultBehaviorProvider(provider);
757      PD_SKIP_VALIDATION_FOR_ADMINISTRATORS = builder.getInstance();
758      INSTANCE.registerPropertyDefinition(PD_SKIP_VALIDATION_FOR_ADMINISTRATORS);
759  }
760
761
762
763  // Build the "state-update-failure-policy" property definition.
764  static {
765      EnumPropertyDefinition.Builder<StateUpdateFailurePolicy> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "state-update-failure-policy");
766      builder.setOption(PropertyOption.ADVANCED);
767      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "state-update-failure-policy"));
768      DefaultBehaviorProvider<StateUpdateFailurePolicy> provider = new DefinedDefaultBehaviorProvider<StateUpdateFailurePolicy>("reactive");
769      builder.setDefaultBehaviorProvider(provider);
770      builder.setEnumClass(StateUpdateFailurePolicy.class);
771      PD_STATE_UPDATE_FAILURE_POLICY = builder.getInstance();
772      INSTANCE.registerPropertyDefinition(PD_STATE_UPDATE_FAILURE_POLICY);
773  }
774
775
776
777  // Register the tags associated with this managed object definition.
778  static {
779    INSTANCE.registerTag(Tag.valueOf("user-management"));
780  }
781
782
783
784  /**
785   * Get the Password Policy configuration definition singleton.
786   *
787   * @return Returns the Password Policy configuration definition
788   *         singleton.
789   */
790  public static PasswordPolicyCfgDefn getInstance() {
791    return INSTANCE;
792  }
793
794
795
796  /**
797   * Private constructor.
798   */
799  private PasswordPolicyCfgDefn() {
800    super("password-policy", AuthenticationPolicyCfgDefn.getInstance());
801  }
802
803
804
805  /**
806   * {@inheritDoc}
807   */
808  public PasswordPolicyCfgClient createClientConfiguration(
809      ManagedObject<? extends PasswordPolicyCfgClient> impl) {
810    return new PasswordPolicyCfgClientImpl(impl);
811  }
812
813
814
815  /**
816   * {@inheritDoc}
817   */
818  public PasswordPolicyCfg createServerConfiguration(
819      ServerManagedObject<? extends PasswordPolicyCfg> impl) {
820    return new PasswordPolicyCfgServerImpl(impl);
821  }
822
823
824
825  /**
826   * {@inheritDoc}
827   */
828  public Class<PasswordPolicyCfg> getServerConfigurationClass() {
829    return PasswordPolicyCfg.class;
830  }
831
832
833
834  /**
835   * Get the "account-status-notification-handler" property definition.
836   * <p>
837   * Specifies the names of the account status notification handlers
838   * that are used with the associated password storage scheme.
839   *
840   * @return Returns the "account-status-notification-handler" property definition.
841   */
842  public AggregationPropertyDefinition<AccountStatusNotificationHandlerCfgClient, AccountStatusNotificationHandlerCfg> getAccountStatusNotificationHandlerPropertyDefinition() {
843    return PD_ACCOUNT_STATUS_NOTIFICATION_HANDLER;
844  }
845
846
847
848  /**
849   * Get the "allow-expired-password-changes" property definition.
850   * <p>
851   * Indicates whether a user whose password is expired is still
852   * allowed to change that password using the password modify extended
853   * operation.
854   *
855   * @return Returns the "allow-expired-password-changes" property definition.
856   */
857  public BooleanPropertyDefinition getAllowExpiredPasswordChangesPropertyDefinition() {
858    return PD_ALLOW_EXPIRED_PASSWORD_CHANGES;
859  }
860
861
862
863  /**
864   * Get the "allow-multiple-password-values" property definition.
865   * <p>
866   * Indicates whether user entries can have multiple distinct values
867   * for the password attribute.
868   * <p>
869   * This is potentially dangerous because many mechanisms used to
870   * change the password do not work well with such a configuration. If
871   * multiple password values are allowed, then any of them can be used
872   * to authenticate, and they are all subject to the same policy
873   * constraints.
874   *
875   * @return Returns the "allow-multiple-password-values" property definition.
876   */
877  public BooleanPropertyDefinition getAllowMultiplePasswordValuesPropertyDefinition() {
878    return PD_ALLOW_MULTIPLE_PASSWORD_VALUES;
879  }
880
881
882
883  /**
884   * Get the "allow-pre-encoded-passwords" property definition.
885   * <p>
886   * Indicates whether users can change their passwords by providing a
887   * pre-encoded value.
888   * <p>
889   * This can cause a security risk because the clear-text version of
890   * the password is not known and therefore validation checks cannot
891   * be applied to it.
892   *
893   * @return Returns the "allow-pre-encoded-passwords" property definition.
894   */
895  public BooleanPropertyDefinition getAllowPreEncodedPasswordsPropertyDefinition() {
896    return PD_ALLOW_PRE_ENCODED_PASSWORDS;
897  }
898
899
900
901  /**
902   * Get the "allow-user-password-changes" property definition.
903   * <p>
904   * Indicates whether users can change their own passwords.
905   * <p>
906   * This check is made in addition to access control evaluation. Both
907   * must allow the password change for it to occur.
908   *
909   * @return Returns the "allow-user-password-changes" property definition.
910   */
911  public BooleanPropertyDefinition getAllowUserPasswordChangesPropertyDefinition() {
912    return PD_ALLOW_USER_PASSWORD_CHANGES;
913  }
914
915
916
917  /**
918   * Get the "default-password-storage-scheme" property definition.
919   * <p>
920   * Specifies the names of the password storage schemes that are used
921   * to encode clear-text passwords for this password policy.
922   *
923   * @return Returns the "default-password-storage-scheme" property definition.
924   */
925  public AggregationPropertyDefinition<PasswordStorageSchemeCfgClient, PasswordStorageSchemeCfg> getDefaultPasswordStorageSchemePropertyDefinition() {
926    return PD_DEFAULT_PASSWORD_STORAGE_SCHEME;
927  }
928
929
930
931  /**
932   * Get the "deprecated-password-storage-scheme" property definition.
933   * <p>
934   * Specifies the names of the password storage schemes that are
935   * considered deprecated for this password policy.
936   * <p>
937   * If a user with this password policy authenticates to the server
938   * and his/her password is encoded with a deprecated scheme, those
939   * values are removed and replaced with values encoded using the
940   * default password storage scheme(s).
941   *
942   * @return Returns the "deprecated-password-storage-scheme" property definition.
943   */
944  public AggregationPropertyDefinition<PasswordStorageSchemeCfgClient, PasswordStorageSchemeCfg> getDeprecatedPasswordStorageSchemePropertyDefinition() {
945    return PD_DEPRECATED_PASSWORD_STORAGE_SCHEME;
946  }
947
948
949
950  /**
951   * Get the "expire-passwords-without-warning" property definition.
952   * <p>
953   * Indicates whether the directory server allows a user's password
954   * to expire even if that user has never seen an expiration warning
955   * notification.
956   * <p>
957   * If this property is true, accounts always expire when the
958   * expiration time arrives. If this property is false or disabled,
959   * the user always receives at least one warning notification, and
960   * the password expiration is set to the warning time plus the
961   * warning interval.
962   *
963   * @return Returns the "expire-passwords-without-warning" property definition.
964   */
965  public BooleanPropertyDefinition getExpirePasswordsWithoutWarningPropertyDefinition() {
966    return PD_EXPIRE_PASSWORDS_WITHOUT_WARNING;
967  }
968
969
970
971  /**
972   * Get the "force-change-on-add" property definition.
973   * <p>
974   * Indicates whether users are forced to change their passwords upon
975   * first authenticating to the directory server after their account
976   * has been created.
977   *
978   * @return Returns the "force-change-on-add" property definition.
979   */
980  public BooleanPropertyDefinition getForceChangeOnAddPropertyDefinition() {
981    return PD_FORCE_CHANGE_ON_ADD;
982  }
983
984
985
986  /**
987   * Get the "force-change-on-reset" property definition.
988   * <p>
989   * Indicates whether users are forced to change their passwords if
990   * they are reset by an administrator.
991   * <p>
992   * For this purpose, anyone with permission to change a given user's
993   * password other than that user is considered an administrator.
994   *
995   * @return Returns the "force-change-on-reset" property definition.
996   */
997  public BooleanPropertyDefinition getForceChangeOnResetPropertyDefinition() {
998    return PD_FORCE_CHANGE_ON_RESET;
999  }
1000
1001
1002
1003  /**
1004   * Get the "grace-login-count" property definition.
1005   * <p>
1006   * Specifies the number of grace logins that a user is allowed after
1007   * the account has expired to allow that user to choose a new
1008   * password.
1009   * <p>
1010   * A value of 0 indicates that no grace logins are allowed.
1011   *
1012   * @return Returns the "grace-login-count" property definition.
1013   */
1014  public IntegerPropertyDefinition getGraceLoginCountPropertyDefinition() {
1015    return PD_GRACE_LOGIN_COUNT;
1016  }
1017
1018
1019
1020  /**
1021   * Get the "idle-lockout-interval" property definition.
1022   * <p>
1023   * Specifies the maximum length of time that an account may remain
1024   * idle (that is, the associated user does not authenticate to the
1025   * server) before that user is locked out.
1026   * <p>
1027   * The value of this attribute is an integer followed by a unit of
1028   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
1029   * indicates that idle accounts are not automatically locked out.
1030   * This feature is available only if the last login time is
1031   * maintained.
1032   *
1033   * @return Returns the "idle-lockout-interval" property definition.
1034   */
1035  public DurationPropertyDefinition getIdleLockoutIntervalPropertyDefinition() {
1036    return PD_IDLE_LOCKOUT_INTERVAL;
1037  }
1038
1039
1040
1041  /**
1042   * Get the "java-class" property definition.
1043   * <p>
1044   * Specifies the fully-qualified name of the Java class which
1045   * provides the Password Policy implementation.
1046   *
1047   * @return Returns the "java-class" property definition.
1048   */
1049  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
1050    return PD_JAVA_CLASS;
1051  }
1052
1053
1054
1055  /**
1056   * Get the "last-login-time-attribute" property definition.
1057   * <p>
1058   * Specifies the name or OID of the attribute type that is used to
1059   * hold the last login time for users with the associated password
1060   * policy.
1061   * <p>
1062   * This attribute type must be defined in the directory server
1063   * schema and must either be defined as an operational attribute or
1064   * must be allowed by the set of objectClasses for all users with the
1065   * associated password policy.
1066   *
1067   * @return Returns the "last-login-time-attribute" property definition.
1068   */
1069  public AttributeTypePropertyDefinition getLastLoginTimeAttributePropertyDefinition() {
1070    return PD_LAST_LOGIN_TIME_ATTRIBUTE;
1071  }
1072
1073
1074
1075  /**
1076   * Get the "last-login-time-format" property definition.
1077   * <p>
1078   * Specifies the format string that is used to generate the last
1079   * login time value for users with the associated password policy.
1080   * <p>
1081   * This format string conforms to the syntax described in the API
1082   * documentation for the java.text.SimpleDateFormat class.
1083   *
1084   * @return Returns the "last-login-time-format" property definition.
1085   */
1086  public StringPropertyDefinition getLastLoginTimeFormatPropertyDefinition() {
1087    return PD_LAST_LOGIN_TIME_FORMAT;
1088  }
1089
1090
1091
1092  /**
1093   * Get the "lockout-duration" property definition.
1094   * <p>
1095   * Specifies the length of time that an account is locked after too
1096   * many authentication failures.
1097   * <p>
1098   * The value of this attribute is an integer followed by a unit of
1099   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
1100   * indicates that the account must remain locked until an
1101   * administrator resets the password.
1102   *
1103   * @return Returns the "lockout-duration" property definition.
1104   */
1105  public DurationPropertyDefinition getLockoutDurationPropertyDefinition() {
1106    return PD_LOCKOUT_DURATION;
1107  }
1108
1109
1110
1111  /**
1112   * Get the "lockout-failure-count" property definition.
1113   * <p>
1114   * Specifies the maximum number of authentication failures that a
1115   * user is allowed before the account is locked out.
1116   * <p>
1117   * A value of 0 indicates that accounts are never locked out due to
1118   * failed attempts.
1119   *
1120   * @return Returns the "lockout-failure-count" property definition.
1121   */
1122  public IntegerPropertyDefinition getLockoutFailureCountPropertyDefinition() {
1123    return PD_LOCKOUT_FAILURE_COUNT;
1124  }
1125
1126
1127
1128  /**
1129   * Get the "lockout-failure-expiration-interval" property definition.
1130   * <p>
1131   * Specifies the length of time before an authentication failure is
1132   * no longer counted against a user for the purposes of account
1133   * lockout.
1134   * <p>
1135   * The value of this attribute is an integer followed by a unit of
1136   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
1137   * indicates that the authentication failures must never expire. The
1138   * failure count is always cleared upon a successful authentication.
1139   *
1140   * @return Returns the "lockout-failure-expiration-interval" property definition.
1141   */
1142  public DurationPropertyDefinition getLockoutFailureExpirationIntervalPropertyDefinition() {
1143    return PD_LOCKOUT_FAILURE_EXPIRATION_INTERVAL;
1144  }
1145
1146
1147
1148  /**
1149   * Get the "max-password-age" property definition.
1150   * <p>
1151   * Specifies the maximum length of time that a user can continue
1152   * using the same password before it must be changed (that is, the
1153   * password expiration interval).
1154   * <p>
1155   * The value of this attribute is an integer followed by a unit of
1156   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
1157   * disables password expiration.
1158   *
1159   * @return Returns the "max-password-age" property definition.
1160   */
1161  public DurationPropertyDefinition getMaxPasswordAgePropertyDefinition() {
1162    return PD_MAX_PASSWORD_AGE;
1163  }
1164
1165
1166
1167  /**
1168   * Get the "max-password-reset-age" property definition.
1169   * <p>
1170   * Specifies the maximum length of time that users have to change
1171   * passwords after they have been reset by an administrator before
1172   * they become locked.
1173   * <p>
1174   * The value of this attribute is an integer followed by a unit of
1175   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
1176   * disables this feature.
1177   *
1178   * @return Returns the "max-password-reset-age" property definition.
1179   */
1180  public DurationPropertyDefinition getMaxPasswordResetAgePropertyDefinition() {
1181    return PD_MAX_PASSWORD_RESET_AGE;
1182  }
1183
1184
1185
1186  /**
1187   * Get the "min-password-age" property definition.
1188   * <p>
1189   * Specifies the minimum length of time after a password change
1190   * before the user is allowed to change the password again.
1191   * <p>
1192   * The value of this attribute is an integer followed by a unit of
1193   * seconds, minutes, hours, days, or weeks. This setting can be used
1194   * to prevent users from changing their passwords repeatedly over a
1195   * short period of time to flush an old password from the history so
1196   * that it can be re-used.
1197   *
1198   * @return Returns the "min-password-age" property definition.
1199   */
1200  public DurationPropertyDefinition getMinPasswordAgePropertyDefinition() {
1201    return PD_MIN_PASSWORD_AGE;
1202  }
1203
1204
1205
1206  /**
1207   * Get the "password-attribute" property definition.
1208   * <p>
1209   * Specifies the attribute type used to hold user passwords.
1210   * <p>
1211   * This attribute type must be defined in the server schema, and it
1212   * must have either the user password or auth password syntax.
1213   *
1214   * @return Returns the "password-attribute" property definition.
1215   */
1216  public AttributeTypePropertyDefinition getPasswordAttributePropertyDefinition() {
1217    return PD_PASSWORD_ATTRIBUTE;
1218  }
1219
1220
1221
1222  /**
1223   * Get the "password-change-requires-current-password" property definition.
1224   * <p>
1225   * Indicates whether user password changes must use the password
1226   * modify extended operation and must include the user's current
1227   * password before the change is allowed.
1228   *
1229   * @return Returns the "password-change-requires-current-password" property definition.
1230   */
1231  public BooleanPropertyDefinition getPasswordChangeRequiresCurrentPasswordPropertyDefinition() {
1232    return PD_PASSWORD_CHANGE_REQUIRES_CURRENT_PASSWORD;
1233  }
1234
1235
1236
1237  /**
1238   * Get the "password-expiration-warning-interval" property definition.
1239   * <p>
1240   * Specifies the maximum length of time before a user's password
1241   * actually expires that the server begins to include warning
1242   * notifications in bind responses for that user.
1243   * <p>
1244   * The value of this attribute is an integer followed by a unit of
1245   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
1246   * disables the warning interval.
1247   *
1248   * @return Returns the "password-expiration-warning-interval" property definition.
1249   */
1250  public DurationPropertyDefinition getPasswordExpirationWarningIntervalPropertyDefinition() {
1251    return PD_PASSWORD_EXPIRATION_WARNING_INTERVAL;
1252  }
1253
1254
1255
1256  /**
1257   * Get the "password-generator" property definition.
1258   * <p>
1259   * Specifies the name of the password generator that is used with
1260   * the associated password policy.
1261   * <p>
1262   * This is used in conjunction with the password modify extended
1263   * operation to generate a new password for a user when none was
1264   * provided in the request.
1265   *
1266   * @return Returns the "password-generator" property definition.
1267   */
1268  public AggregationPropertyDefinition<PasswordGeneratorCfgClient, PasswordGeneratorCfg> getPasswordGeneratorPropertyDefinition() {
1269    return PD_PASSWORD_GENERATOR;
1270  }
1271
1272
1273
1274  /**
1275   * Get the "password-history-count" property definition.
1276   * <p>
1277   * Specifies the maximum number of former passwords to maintain in
1278   * the password history.
1279   * <p>
1280   * When choosing a new password, the proposed password is checked to
1281   * ensure that it does not match the current password, nor any other
1282   * password in the history list. A value of zero indicates that
1283   * either no password history is to be maintained (if the password
1284   * history duration has a value of zero seconds), or that there is no
1285   * maximum number of passwords to maintain in the history (if the
1286   * password history duration has a value greater than zero seconds).
1287   *
1288   * @return Returns the "password-history-count" property definition.
1289   */
1290  public IntegerPropertyDefinition getPasswordHistoryCountPropertyDefinition() {
1291    return PD_PASSWORD_HISTORY_COUNT;
1292  }
1293
1294
1295
1296  /**
1297   * Get the "password-history-duration" property definition.
1298   * <p>
1299   * Specifies the maximum length of time that passwords remain in the
1300   * password history.
1301   * <p>
1302   * When choosing a new password, the proposed password is checked to
1303   * ensure that it does not match the current password, nor any other
1304   * password in the history list. A value of zero seconds indicates
1305   * that either no password history is to be maintained (if the
1306   * password history count has a value of zero), or that there is no
1307   * maximum duration for passwords in the history (if the password
1308   * history count has a value greater than zero).
1309   *
1310   * @return Returns the "password-history-duration" property definition.
1311   */
1312  public DurationPropertyDefinition getPasswordHistoryDurationPropertyDefinition() {
1313    return PD_PASSWORD_HISTORY_DURATION;
1314  }
1315
1316
1317
1318  /**
1319   * Get the "password-validator" property definition.
1320   * <p>
1321   * Specifies the names of the password validators that are used with
1322   * the associated password storage scheme.
1323   * <p>
1324   * The password validators are invoked when a user attempts to
1325   * provide a new password, to determine whether the new password is
1326   * acceptable.
1327   *
1328   * @return Returns the "password-validator" property definition.
1329   */
1330  public AggregationPropertyDefinition<PasswordValidatorCfgClient, PasswordValidatorCfg> getPasswordValidatorPropertyDefinition() {
1331    return PD_PASSWORD_VALIDATOR;
1332  }
1333
1334
1335
1336  /**
1337   * Get the "previous-last-login-time-format" property definition.
1338   * <p>
1339   * Specifies the format string(s) that might have been used with the
1340   * last login time at any point in the past for users associated with
1341   * the password policy.
1342   * <p>
1343   * These values are used to make it possible to parse previous
1344   * values, but are not used to set new values. The format strings
1345   * conform to the syntax described in the API documentation for the
1346   * java.text.SimpleDateFormat class.
1347   *
1348   * @return Returns the "previous-last-login-time-format" property definition.
1349   */
1350  public StringPropertyDefinition getPreviousLastLoginTimeFormatPropertyDefinition() {
1351    return PD_PREVIOUS_LAST_LOGIN_TIME_FORMAT;
1352  }
1353
1354
1355
1356  /**
1357   * Get the "require-change-by-time" property definition.
1358   * <p>
1359   * Specifies the time by which all users with the associated
1360   * password policy must change their passwords.
1361   * <p>
1362   * The value is expressed in a generalized time format. If this time
1363   * is equal to the current time or is in the past, then all users are
1364   * required to change their passwords immediately. The behavior of
1365   * the server in this mode is identical to the behavior observed when
1366   * users are forced to change their passwords after an administrative
1367   * reset.
1368   *
1369   * @return Returns the "require-change-by-time" property definition.
1370   */
1371  public StringPropertyDefinition getRequireChangeByTimePropertyDefinition() {
1372    return PD_REQUIRE_CHANGE_BY_TIME;
1373  }
1374
1375
1376
1377  /**
1378   * Get the "require-secure-authentication" property definition.
1379   * <p>
1380   * Indicates whether users with the associated password policy are
1381   * required to authenticate in a secure manner.
1382   * <p>
1383   * This might mean either using a secure communication channel
1384   * between the client and the server, or using a SASL mechanism that
1385   * does not expose the credentials.
1386   *
1387   * @return Returns the "require-secure-authentication" property definition.
1388   */
1389  public BooleanPropertyDefinition getRequireSecureAuthenticationPropertyDefinition() {
1390    return PD_REQUIRE_SECURE_AUTHENTICATION;
1391  }
1392
1393
1394
1395  /**
1396   * Get the "require-secure-password-changes" property definition.
1397   * <p>
1398   * Indicates whether users with the associated password policy are
1399   * required to change their password in a secure manner that does not
1400   * expose the credentials.
1401   *
1402   * @return Returns the "require-secure-password-changes" property definition.
1403   */
1404  public BooleanPropertyDefinition getRequireSecurePasswordChangesPropertyDefinition() {
1405    return PD_REQUIRE_SECURE_PASSWORD_CHANGES;
1406  }
1407
1408
1409
1410  /**
1411   * Get the "skip-validation-for-administrators" property definition.
1412   * <p>
1413   * Indicates whether passwords set by administrators are allowed to
1414   * bypass the password validation process that is required for user
1415   * password changes.
1416   *
1417   * @return Returns the "skip-validation-for-administrators" property definition.
1418   */
1419  public BooleanPropertyDefinition getSkipValidationForAdministratorsPropertyDefinition() {
1420    return PD_SKIP_VALIDATION_FOR_ADMINISTRATORS;
1421  }
1422
1423
1424
1425  /**
1426   * Get the "state-update-failure-policy" property definition.
1427   * <p>
1428   * Specifies how the server deals with the inability to update
1429   * password policy state information during an authentication
1430   * attempt.
1431   * <p>
1432   * In particular, this property can be used to control whether an
1433   * otherwise successful bind operation fails if a failure occurs
1434   * while attempting to update password policy state information (for
1435   * example, to clear a record of previous authentication failures or
1436   * to update the last login time). It can also be used to control
1437   * whether to reject a bind request if it is known ahead of time that
1438   * it will not be possible to update the authentication failure times
1439   * in the event of an unsuccessful bind attempt (for example, if the
1440   * backend writability mode is disabled).
1441   *
1442   * @return Returns the "state-update-failure-policy" property definition.
1443   */
1444  public EnumPropertyDefinition<StateUpdateFailurePolicy> getStateUpdateFailurePolicyPropertyDefinition() {
1445    return PD_STATE_UPDATE_FAILURE_POLICY;
1446  }
1447
1448
1449
1450  /**
1451   * Managed object client implementation.
1452   */
1453  private static class PasswordPolicyCfgClientImpl implements
1454    PasswordPolicyCfgClient {
1455
1456    // Private implementation.
1457    private ManagedObject<? extends PasswordPolicyCfgClient> impl;
1458
1459
1460
1461    // Private constructor.
1462    private PasswordPolicyCfgClientImpl(
1463        ManagedObject<? extends PasswordPolicyCfgClient> impl) {
1464      this.impl = impl;
1465    }
1466
1467
1468
1469    /**
1470     * {@inheritDoc}
1471     */
1472    public SortedSet<String> getAccountStatusNotificationHandler() {
1473      return impl.getPropertyValues(INSTANCE.getAccountStatusNotificationHandlerPropertyDefinition());
1474    }
1475
1476
1477
1478    /**
1479     * {@inheritDoc}
1480     */
1481    public void setAccountStatusNotificationHandler(Collection<String> values) {
1482      impl.setPropertyValues(INSTANCE.getAccountStatusNotificationHandlerPropertyDefinition(), values);
1483    }
1484
1485
1486
1487    /**
1488     * {@inheritDoc}
1489     */
1490    public boolean isAllowExpiredPasswordChanges() {
1491      return impl.getPropertyValue(INSTANCE.getAllowExpiredPasswordChangesPropertyDefinition());
1492    }
1493
1494
1495
1496    /**
1497     * {@inheritDoc}
1498     */
1499    public void setAllowExpiredPasswordChanges(Boolean value) {
1500      impl.setPropertyValue(INSTANCE.getAllowExpiredPasswordChangesPropertyDefinition(), value);
1501    }
1502
1503
1504
1505    /**
1506     * {@inheritDoc}
1507     */
1508    public boolean isAllowMultiplePasswordValues() {
1509      return impl.getPropertyValue(INSTANCE.getAllowMultiplePasswordValuesPropertyDefinition());
1510    }
1511
1512
1513
1514    /**
1515     * {@inheritDoc}
1516     */
1517    public void setAllowMultiplePasswordValues(Boolean value) {
1518      impl.setPropertyValue(INSTANCE.getAllowMultiplePasswordValuesPropertyDefinition(), value);
1519    }
1520
1521
1522
1523    /**
1524     * {@inheritDoc}
1525     */
1526    public boolean isAllowPreEncodedPasswords() {
1527      return impl.getPropertyValue(INSTANCE.getAllowPreEncodedPasswordsPropertyDefinition());
1528    }
1529
1530
1531
1532    /**
1533     * {@inheritDoc}
1534     */
1535    public void setAllowPreEncodedPasswords(Boolean value) {
1536      impl.setPropertyValue(INSTANCE.getAllowPreEncodedPasswordsPropertyDefinition(), value);
1537    }
1538
1539
1540
1541    /**
1542     * {@inheritDoc}
1543     */
1544    public boolean isAllowUserPasswordChanges() {
1545      return impl.getPropertyValue(INSTANCE.getAllowUserPasswordChangesPropertyDefinition());
1546    }
1547
1548
1549
1550    /**
1551     * {@inheritDoc}
1552     */
1553    public void setAllowUserPasswordChanges(Boolean value) {
1554      impl.setPropertyValue(INSTANCE.getAllowUserPasswordChangesPropertyDefinition(), value);
1555    }
1556
1557
1558
1559    /**
1560     * {@inheritDoc}
1561     */
1562    public SortedSet<String> getDefaultPasswordStorageScheme() {
1563      return impl.getPropertyValues(INSTANCE.getDefaultPasswordStorageSchemePropertyDefinition());
1564    }
1565
1566
1567
1568    /**
1569     * {@inheritDoc}
1570     */
1571    public void setDefaultPasswordStorageScheme(Collection<String> values) {
1572      impl.setPropertyValues(INSTANCE.getDefaultPasswordStorageSchemePropertyDefinition(), values);
1573    }
1574
1575
1576
1577    /**
1578     * {@inheritDoc}
1579     */
1580    public SortedSet<String> getDeprecatedPasswordStorageScheme() {
1581      return impl.getPropertyValues(INSTANCE.getDeprecatedPasswordStorageSchemePropertyDefinition());
1582    }
1583
1584
1585
1586    /**
1587     * {@inheritDoc}
1588     */
1589    public void setDeprecatedPasswordStorageScheme(Collection<String> values) {
1590      impl.setPropertyValues(INSTANCE.getDeprecatedPasswordStorageSchemePropertyDefinition(), values);
1591    }
1592
1593
1594
1595    /**
1596     * {@inheritDoc}
1597     */
1598    public boolean isExpirePasswordsWithoutWarning() {
1599      return impl.getPropertyValue(INSTANCE.getExpirePasswordsWithoutWarningPropertyDefinition());
1600    }
1601
1602
1603
1604    /**
1605     * {@inheritDoc}
1606     */
1607    public void setExpirePasswordsWithoutWarning(Boolean value) {
1608      impl.setPropertyValue(INSTANCE.getExpirePasswordsWithoutWarningPropertyDefinition(), value);
1609    }
1610
1611
1612
1613    /**
1614     * {@inheritDoc}
1615     */
1616    public boolean isForceChangeOnAdd() {
1617      return impl.getPropertyValue(INSTANCE.getForceChangeOnAddPropertyDefinition());
1618    }
1619
1620
1621
1622    /**
1623     * {@inheritDoc}
1624     */
1625    public void setForceChangeOnAdd(Boolean value) {
1626      impl.setPropertyValue(INSTANCE.getForceChangeOnAddPropertyDefinition(), value);
1627    }
1628
1629
1630
1631    /**
1632     * {@inheritDoc}
1633     */
1634    public boolean isForceChangeOnReset() {
1635      return impl.getPropertyValue(INSTANCE.getForceChangeOnResetPropertyDefinition());
1636    }
1637
1638
1639
1640    /**
1641     * {@inheritDoc}
1642     */
1643    public void setForceChangeOnReset(Boolean value) {
1644      impl.setPropertyValue(INSTANCE.getForceChangeOnResetPropertyDefinition(), value);
1645    }
1646
1647
1648
1649    /**
1650     * {@inheritDoc}
1651     */
1652    public int getGraceLoginCount() {
1653      return impl.getPropertyValue(INSTANCE.getGraceLoginCountPropertyDefinition());
1654    }
1655
1656
1657
1658    /**
1659     * {@inheritDoc}
1660     */
1661    public void setGraceLoginCount(Integer value) {
1662      impl.setPropertyValue(INSTANCE.getGraceLoginCountPropertyDefinition(), value);
1663    }
1664
1665
1666
1667    /**
1668     * {@inheritDoc}
1669     */
1670    public long getIdleLockoutInterval() {
1671      return impl.getPropertyValue(INSTANCE.getIdleLockoutIntervalPropertyDefinition());
1672    }
1673
1674
1675
1676    /**
1677     * {@inheritDoc}
1678     */
1679    public void setIdleLockoutInterval(Long value) {
1680      impl.setPropertyValue(INSTANCE.getIdleLockoutIntervalPropertyDefinition(), value);
1681    }
1682
1683
1684
1685    /**
1686     * {@inheritDoc}
1687     */
1688    public String getJavaClass() {
1689      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
1690    }
1691
1692
1693
1694    /**
1695     * {@inheritDoc}
1696     */
1697    public void setJavaClass(String value) {
1698      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
1699    }
1700
1701
1702
1703    /**
1704     * {@inheritDoc}
1705     */
1706    public AttributeType getLastLoginTimeAttribute() {
1707      return impl.getPropertyValue(INSTANCE.getLastLoginTimeAttributePropertyDefinition());
1708    }
1709
1710
1711
1712    /**
1713     * {@inheritDoc}
1714     */
1715    public void setLastLoginTimeAttribute(AttributeType value) {
1716      impl.setPropertyValue(INSTANCE.getLastLoginTimeAttributePropertyDefinition(), value);
1717    }
1718
1719
1720
1721    /**
1722     * {@inheritDoc}
1723     */
1724    public String getLastLoginTimeFormat() {
1725      return impl.getPropertyValue(INSTANCE.getLastLoginTimeFormatPropertyDefinition());
1726    }
1727
1728
1729
1730    /**
1731     * {@inheritDoc}
1732     */
1733    public void setLastLoginTimeFormat(String value) {
1734      impl.setPropertyValue(INSTANCE.getLastLoginTimeFormatPropertyDefinition(), value);
1735    }
1736
1737
1738
1739    /**
1740     * {@inheritDoc}
1741     */
1742    public long getLockoutDuration() {
1743      return impl.getPropertyValue(INSTANCE.getLockoutDurationPropertyDefinition());
1744    }
1745
1746
1747
1748    /**
1749     * {@inheritDoc}
1750     */
1751    public void setLockoutDuration(Long value) {
1752      impl.setPropertyValue(INSTANCE.getLockoutDurationPropertyDefinition(), value);
1753    }
1754
1755
1756
1757    /**
1758     * {@inheritDoc}
1759     */
1760    public int getLockoutFailureCount() {
1761      return impl.getPropertyValue(INSTANCE.getLockoutFailureCountPropertyDefinition());
1762    }
1763
1764
1765
1766    /**
1767     * {@inheritDoc}
1768     */
1769    public void setLockoutFailureCount(Integer value) {
1770      impl.setPropertyValue(INSTANCE.getLockoutFailureCountPropertyDefinition(), value);
1771    }
1772
1773
1774
1775    /**
1776     * {@inheritDoc}
1777     */
1778    public long getLockoutFailureExpirationInterval() {
1779      return impl.getPropertyValue(INSTANCE.getLockoutFailureExpirationIntervalPropertyDefinition());
1780    }
1781
1782
1783
1784    /**
1785     * {@inheritDoc}
1786     */
1787    public void setLockoutFailureExpirationInterval(Long value) {
1788      impl.setPropertyValue(INSTANCE.getLockoutFailureExpirationIntervalPropertyDefinition(), value);
1789    }
1790
1791
1792
1793    /**
1794     * {@inheritDoc}
1795     */
1796    public long getMaxPasswordAge() {
1797      return impl.getPropertyValue(INSTANCE.getMaxPasswordAgePropertyDefinition());
1798    }
1799
1800
1801
1802    /**
1803     * {@inheritDoc}
1804     */
1805    public void setMaxPasswordAge(Long value) {
1806      impl.setPropertyValue(INSTANCE.getMaxPasswordAgePropertyDefinition(), value);
1807    }
1808
1809
1810
1811    /**
1812     * {@inheritDoc}
1813     */
1814    public long getMaxPasswordResetAge() {
1815      return impl.getPropertyValue(INSTANCE.getMaxPasswordResetAgePropertyDefinition());
1816    }
1817
1818
1819
1820    /**
1821     * {@inheritDoc}
1822     */
1823    public void setMaxPasswordResetAge(Long value) {
1824      impl.setPropertyValue(INSTANCE.getMaxPasswordResetAgePropertyDefinition(), value);
1825    }
1826
1827
1828
1829    /**
1830     * {@inheritDoc}
1831     */
1832    public long getMinPasswordAge() {
1833      return impl.getPropertyValue(INSTANCE.getMinPasswordAgePropertyDefinition());
1834    }
1835
1836
1837
1838    /**
1839     * {@inheritDoc}
1840     */
1841    public void setMinPasswordAge(Long value) {
1842      impl.setPropertyValue(INSTANCE.getMinPasswordAgePropertyDefinition(), value);
1843    }
1844
1845
1846
1847    /**
1848     * {@inheritDoc}
1849     */
1850    public AttributeType getPasswordAttribute() {
1851      return impl.getPropertyValue(INSTANCE.getPasswordAttributePropertyDefinition());
1852    }
1853
1854
1855
1856    /**
1857     * {@inheritDoc}
1858     */
1859    public void setPasswordAttribute(AttributeType value) {
1860      impl.setPropertyValue(INSTANCE.getPasswordAttributePropertyDefinition(), value);
1861    }
1862
1863
1864
1865    /**
1866     * {@inheritDoc}
1867     */
1868    public boolean isPasswordChangeRequiresCurrentPassword() {
1869      return impl.getPropertyValue(INSTANCE.getPasswordChangeRequiresCurrentPasswordPropertyDefinition());
1870    }
1871
1872
1873
1874    /**
1875     * {@inheritDoc}
1876     */
1877    public void setPasswordChangeRequiresCurrentPassword(Boolean value) {
1878      impl.setPropertyValue(INSTANCE.getPasswordChangeRequiresCurrentPasswordPropertyDefinition(), value);
1879    }
1880
1881
1882
1883    /**
1884     * {@inheritDoc}
1885     */
1886    public long getPasswordExpirationWarningInterval() {
1887      return impl.getPropertyValue(INSTANCE.getPasswordExpirationWarningIntervalPropertyDefinition());
1888    }
1889
1890
1891
1892    /**
1893     * {@inheritDoc}
1894     */
1895    public void setPasswordExpirationWarningInterval(Long value) {
1896      impl.setPropertyValue(INSTANCE.getPasswordExpirationWarningIntervalPropertyDefinition(), value);
1897    }
1898
1899
1900
1901    /**
1902     * {@inheritDoc}
1903     */
1904    public String getPasswordGenerator() {
1905      return impl.getPropertyValue(INSTANCE.getPasswordGeneratorPropertyDefinition());
1906    }
1907
1908
1909
1910    /**
1911     * {@inheritDoc}
1912     */
1913    public void setPasswordGenerator(String value) {
1914      impl.setPropertyValue(INSTANCE.getPasswordGeneratorPropertyDefinition(), value);
1915    }
1916
1917
1918
1919    /**
1920     * {@inheritDoc}
1921     */
1922    public int getPasswordHistoryCount() {
1923      return impl.getPropertyValue(INSTANCE.getPasswordHistoryCountPropertyDefinition());
1924    }
1925
1926
1927
1928    /**
1929     * {@inheritDoc}
1930     */
1931    public void setPasswordHistoryCount(Integer value) {
1932      impl.setPropertyValue(INSTANCE.getPasswordHistoryCountPropertyDefinition(), value);
1933    }
1934
1935
1936
1937    /**
1938     * {@inheritDoc}
1939     */
1940    public long getPasswordHistoryDuration() {
1941      return impl.getPropertyValue(INSTANCE.getPasswordHistoryDurationPropertyDefinition());
1942    }
1943
1944
1945
1946    /**
1947     * {@inheritDoc}
1948     */
1949    public void setPasswordHistoryDuration(Long value) {
1950      impl.setPropertyValue(INSTANCE.getPasswordHistoryDurationPropertyDefinition(), value);
1951    }
1952
1953
1954
1955    /**
1956     * {@inheritDoc}
1957     */
1958    public SortedSet<String> getPasswordValidator() {
1959      return impl.getPropertyValues(INSTANCE.getPasswordValidatorPropertyDefinition());
1960    }
1961
1962
1963
1964    /**
1965     * {@inheritDoc}
1966     */
1967    public void setPasswordValidator(Collection<String> values) {
1968      impl.setPropertyValues(INSTANCE.getPasswordValidatorPropertyDefinition(), values);
1969    }
1970
1971
1972
1973    /**
1974     * {@inheritDoc}
1975     */
1976    public SortedSet<String> getPreviousLastLoginTimeFormat() {
1977      return impl.getPropertyValues(INSTANCE.getPreviousLastLoginTimeFormatPropertyDefinition());
1978    }
1979
1980
1981
1982    /**
1983     * {@inheritDoc}
1984     */
1985    public void setPreviousLastLoginTimeFormat(Collection<String> values) {
1986      impl.setPropertyValues(INSTANCE.getPreviousLastLoginTimeFormatPropertyDefinition(), values);
1987    }
1988
1989
1990
1991    /**
1992     * {@inheritDoc}
1993     */
1994    public String getRequireChangeByTime() {
1995      return impl.getPropertyValue(INSTANCE.getRequireChangeByTimePropertyDefinition());
1996    }
1997
1998
1999
2000    /**
2001     * {@inheritDoc}
2002     */
2003    public void setRequireChangeByTime(String value) {
2004      impl.setPropertyValue(INSTANCE.getRequireChangeByTimePropertyDefinition(), value);
2005    }
2006
2007
2008
2009    /**
2010     * {@inheritDoc}
2011     */
2012    public boolean isRequireSecureAuthentication() {
2013      return impl.getPropertyValue(INSTANCE.getRequireSecureAuthenticationPropertyDefinition());
2014    }
2015
2016
2017
2018    /**
2019     * {@inheritDoc}
2020     */
2021    public void setRequireSecureAuthentication(Boolean value) {
2022      impl.setPropertyValue(INSTANCE.getRequireSecureAuthenticationPropertyDefinition(), value);
2023    }
2024
2025
2026
2027    /**
2028     * {@inheritDoc}
2029     */
2030    public boolean isRequireSecurePasswordChanges() {
2031      return impl.getPropertyValue(INSTANCE.getRequireSecurePasswordChangesPropertyDefinition());
2032    }
2033
2034
2035
2036    /**
2037     * {@inheritDoc}
2038     */
2039    public void setRequireSecurePasswordChanges(Boolean value) {
2040      impl.setPropertyValue(INSTANCE.getRequireSecurePasswordChangesPropertyDefinition(), value);
2041    }
2042
2043
2044
2045    /**
2046     * {@inheritDoc}
2047     */
2048    public boolean isSkipValidationForAdministrators() {
2049      return impl.getPropertyValue(INSTANCE.getSkipValidationForAdministratorsPropertyDefinition());
2050    }
2051
2052
2053
2054    /**
2055     * {@inheritDoc}
2056     */
2057    public void setSkipValidationForAdministrators(Boolean value) {
2058      impl.setPropertyValue(INSTANCE.getSkipValidationForAdministratorsPropertyDefinition(), value);
2059    }
2060
2061
2062
2063    /**
2064     * {@inheritDoc}
2065     */
2066    public StateUpdateFailurePolicy getStateUpdateFailurePolicy() {
2067      return impl.getPropertyValue(INSTANCE.getStateUpdateFailurePolicyPropertyDefinition());
2068    }
2069
2070
2071
2072    /**
2073     * {@inheritDoc}
2074     */
2075    public void setStateUpdateFailurePolicy(StateUpdateFailurePolicy value) {
2076      impl.setPropertyValue(INSTANCE.getStateUpdateFailurePolicyPropertyDefinition(), value);
2077    }
2078
2079
2080
2081    /**
2082     * {@inheritDoc}
2083     */
2084    public ManagedObjectDefinition<? extends PasswordPolicyCfgClient, ? extends PasswordPolicyCfg> definition() {
2085      return INSTANCE;
2086    }
2087
2088
2089
2090    /**
2091     * {@inheritDoc}
2092     */
2093    public PropertyProvider properties() {
2094      return impl;
2095    }
2096
2097
2098
2099    /**
2100     * {@inheritDoc}
2101     */
2102    public void commit() throws ManagedObjectAlreadyExistsException,
2103        MissingMandatoryPropertiesException, ConcurrentModificationException,
2104        OperationRejectedException, AuthorizationException,
2105        CommunicationException {
2106      impl.commit();
2107    }
2108
2109
2110
2111    /** {@inheritDoc} */
2112    public String toString() {
2113      return impl.toString();
2114    }
2115  }
2116
2117
2118
2119  /**
2120   * Managed object server implementation.
2121   */
2122  private static class PasswordPolicyCfgServerImpl implements
2123    PasswordPolicyCfg {
2124
2125    // Private implementation.
2126    private ServerManagedObject<? extends PasswordPolicyCfg> impl;
2127
2128    // The value of the "account-status-notification-handler" property.
2129    private final SortedSet<String> pAccountStatusNotificationHandler;
2130
2131    // The value of the "allow-expired-password-changes" property.
2132    private final boolean pAllowExpiredPasswordChanges;
2133
2134    // The value of the "allow-multiple-password-values" property.
2135    private final boolean pAllowMultiplePasswordValues;
2136
2137    // The value of the "allow-pre-encoded-passwords" property.
2138    private final boolean pAllowPreEncodedPasswords;
2139
2140    // The value of the "allow-user-password-changes" property.
2141    private final boolean pAllowUserPasswordChanges;
2142
2143    // The value of the "default-password-storage-scheme" property.
2144    private final SortedSet<String> pDefaultPasswordStorageScheme;
2145
2146    // The value of the "deprecated-password-storage-scheme" property.
2147    private final SortedSet<String> pDeprecatedPasswordStorageScheme;
2148
2149    // The value of the "expire-passwords-without-warning" property.
2150    private final boolean pExpirePasswordsWithoutWarning;
2151
2152    // The value of the "force-change-on-add" property.
2153    private final boolean pForceChangeOnAdd;
2154
2155    // The value of the "force-change-on-reset" property.
2156    private final boolean pForceChangeOnReset;
2157
2158    // The value of the "grace-login-count" property.
2159    private final int pGraceLoginCount;
2160
2161    // The value of the "idle-lockout-interval" property.
2162    private final long pIdleLockoutInterval;
2163
2164    // The value of the "java-class" property.
2165    private final String pJavaClass;
2166
2167    // The value of the "last-login-time-attribute" property.
2168    private final AttributeType pLastLoginTimeAttribute;
2169
2170    // The value of the "last-login-time-format" property.
2171    private final String pLastLoginTimeFormat;
2172
2173    // The value of the "lockout-duration" property.
2174    private final long pLockoutDuration;
2175
2176    // The value of the "lockout-failure-count" property.
2177    private final int pLockoutFailureCount;
2178
2179    // The value of the "lockout-failure-expiration-interval" property.
2180    private final long pLockoutFailureExpirationInterval;
2181
2182    // The value of the "max-password-age" property.
2183    private final long pMaxPasswordAge;
2184
2185    // The value of the "max-password-reset-age" property.
2186    private final long pMaxPasswordResetAge;
2187
2188    // The value of the "min-password-age" property.
2189    private final long pMinPasswordAge;
2190
2191    // The value of the "password-attribute" property.
2192    private final AttributeType pPasswordAttribute;
2193
2194    // The value of the "password-change-requires-current-password" property.
2195    private final boolean pPasswordChangeRequiresCurrentPassword;
2196
2197    // The value of the "password-expiration-warning-interval" property.
2198    private final long pPasswordExpirationWarningInterval;
2199
2200    // The value of the "password-generator" property.
2201    private final String pPasswordGenerator;
2202
2203    // The value of the "password-history-count" property.
2204    private final int pPasswordHistoryCount;
2205
2206    // The value of the "password-history-duration" property.
2207    private final long pPasswordHistoryDuration;
2208
2209    // The value of the "password-validator" property.
2210    private final SortedSet<String> pPasswordValidator;
2211
2212    // The value of the "previous-last-login-time-format" property.
2213    private final SortedSet<String> pPreviousLastLoginTimeFormat;
2214
2215    // The value of the "require-change-by-time" property.
2216    private final String pRequireChangeByTime;
2217
2218    // The value of the "require-secure-authentication" property.
2219    private final boolean pRequireSecureAuthentication;
2220
2221    // The value of the "require-secure-password-changes" property.
2222    private final boolean pRequireSecurePasswordChanges;
2223
2224    // The value of the "skip-validation-for-administrators" property.
2225    private final boolean pSkipValidationForAdministrators;
2226
2227    // The value of the "state-update-failure-policy" property.
2228    private final StateUpdateFailurePolicy pStateUpdateFailurePolicy;
2229
2230
2231
2232    // Private constructor.
2233    private PasswordPolicyCfgServerImpl(ServerManagedObject<? extends PasswordPolicyCfg> impl) {
2234      this.impl = impl;
2235      this.pAccountStatusNotificationHandler = impl.getPropertyValues(INSTANCE.getAccountStatusNotificationHandlerPropertyDefinition());
2236      this.pAllowExpiredPasswordChanges = impl.getPropertyValue(INSTANCE.getAllowExpiredPasswordChangesPropertyDefinition());
2237      this.pAllowMultiplePasswordValues = impl.getPropertyValue(INSTANCE.getAllowMultiplePasswordValuesPropertyDefinition());
2238      this.pAllowPreEncodedPasswords = impl.getPropertyValue(INSTANCE.getAllowPreEncodedPasswordsPropertyDefinition());
2239      this.pAllowUserPasswordChanges = impl.getPropertyValue(INSTANCE.getAllowUserPasswordChangesPropertyDefinition());
2240      this.pDefaultPasswordStorageScheme = impl.getPropertyValues(INSTANCE.getDefaultPasswordStorageSchemePropertyDefinition());
2241      this.pDeprecatedPasswordStorageScheme = impl.getPropertyValues(INSTANCE.getDeprecatedPasswordStorageSchemePropertyDefinition());
2242      this.pExpirePasswordsWithoutWarning = impl.getPropertyValue(INSTANCE.getExpirePasswordsWithoutWarningPropertyDefinition());
2243      this.pForceChangeOnAdd = impl.getPropertyValue(INSTANCE.getForceChangeOnAddPropertyDefinition());
2244      this.pForceChangeOnReset = impl.getPropertyValue(INSTANCE.getForceChangeOnResetPropertyDefinition());
2245      this.pGraceLoginCount = impl.getPropertyValue(INSTANCE.getGraceLoginCountPropertyDefinition());
2246      this.pIdleLockoutInterval = impl.getPropertyValue(INSTANCE.getIdleLockoutIntervalPropertyDefinition());
2247      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
2248      this.pLastLoginTimeAttribute = impl.getPropertyValue(INSTANCE.getLastLoginTimeAttributePropertyDefinition());
2249      this.pLastLoginTimeFormat = impl.getPropertyValue(INSTANCE.getLastLoginTimeFormatPropertyDefinition());
2250      this.pLockoutDuration = impl.getPropertyValue(INSTANCE.getLockoutDurationPropertyDefinition());
2251      this.pLockoutFailureCount = impl.getPropertyValue(INSTANCE.getLockoutFailureCountPropertyDefinition());
2252      this.pLockoutFailureExpirationInterval = impl.getPropertyValue(INSTANCE.getLockoutFailureExpirationIntervalPropertyDefinition());
2253      this.pMaxPasswordAge = impl.getPropertyValue(INSTANCE.getMaxPasswordAgePropertyDefinition());
2254      this.pMaxPasswordResetAge = impl.getPropertyValue(INSTANCE.getMaxPasswordResetAgePropertyDefinition());
2255      this.pMinPasswordAge = impl.getPropertyValue(INSTANCE.getMinPasswordAgePropertyDefinition());
2256      this.pPasswordAttribute = impl.getPropertyValue(INSTANCE.getPasswordAttributePropertyDefinition());
2257      this.pPasswordChangeRequiresCurrentPassword = impl.getPropertyValue(INSTANCE.getPasswordChangeRequiresCurrentPasswordPropertyDefinition());
2258      this.pPasswordExpirationWarningInterval = impl.getPropertyValue(INSTANCE.getPasswordExpirationWarningIntervalPropertyDefinition());
2259      this.pPasswordGenerator = impl.getPropertyValue(INSTANCE.getPasswordGeneratorPropertyDefinition());
2260      this.pPasswordHistoryCount = impl.getPropertyValue(INSTANCE.getPasswordHistoryCountPropertyDefinition());
2261      this.pPasswordHistoryDuration = impl.getPropertyValue(INSTANCE.getPasswordHistoryDurationPropertyDefinition());
2262      this.pPasswordValidator = impl.getPropertyValues(INSTANCE.getPasswordValidatorPropertyDefinition());
2263      this.pPreviousLastLoginTimeFormat = impl.getPropertyValues(INSTANCE.getPreviousLastLoginTimeFormatPropertyDefinition());
2264      this.pRequireChangeByTime = impl.getPropertyValue(INSTANCE.getRequireChangeByTimePropertyDefinition());
2265      this.pRequireSecureAuthentication = impl.getPropertyValue(INSTANCE.getRequireSecureAuthenticationPropertyDefinition());
2266      this.pRequireSecurePasswordChanges = impl.getPropertyValue(INSTANCE.getRequireSecurePasswordChangesPropertyDefinition());
2267      this.pSkipValidationForAdministrators = impl.getPropertyValue(INSTANCE.getSkipValidationForAdministratorsPropertyDefinition());
2268      this.pStateUpdateFailurePolicy = impl.getPropertyValue(INSTANCE.getStateUpdateFailurePolicyPropertyDefinition());
2269    }
2270
2271
2272
2273    /**
2274     * {@inheritDoc}
2275     */
2276    public void addPasswordPolicyChangeListener(
2277        ConfigurationChangeListener<PasswordPolicyCfg> listener) {
2278      impl.registerChangeListener(listener);
2279    }
2280
2281
2282
2283    /**
2284     * {@inheritDoc}
2285     */
2286    public void removePasswordPolicyChangeListener(
2287        ConfigurationChangeListener<PasswordPolicyCfg> listener) {
2288      impl.deregisterChangeListener(listener);
2289    }
2290    /**
2291     * {@inheritDoc}
2292     */
2293    public void addChangeListener(
2294        ConfigurationChangeListener<AuthenticationPolicyCfg> listener) {
2295      impl.registerChangeListener(listener);
2296    }
2297
2298
2299
2300    /**
2301     * {@inheritDoc}
2302     */
2303    public void removeChangeListener(
2304        ConfigurationChangeListener<AuthenticationPolicyCfg> listener) {
2305      impl.deregisterChangeListener(listener);
2306    }
2307
2308
2309
2310    /**
2311     * {@inheritDoc}
2312     */
2313    public SortedSet<String> getAccountStatusNotificationHandler() {
2314      return pAccountStatusNotificationHandler;
2315    }
2316
2317
2318
2319    /**
2320     * {@inheritDoc}
2321     */
2322    public SortedSet<DN> getAccountStatusNotificationHandlerDNs() {
2323      SortedSet<String> values = getAccountStatusNotificationHandler();
2324      SortedSet<DN> dnValues = new TreeSet<DN>();
2325      for (String value : values) {
2326        DN dn = INSTANCE.getAccountStatusNotificationHandlerPropertyDefinition().getChildDN(value);
2327        dnValues.add(dn);
2328      }
2329      return dnValues;
2330    }
2331
2332
2333
2334    /**
2335     * {@inheritDoc}
2336     */
2337    public boolean isAllowExpiredPasswordChanges() {
2338      return pAllowExpiredPasswordChanges;
2339    }
2340
2341
2342
2343    /**
2344     * {@inheritDoc}
2345     */
2346    public boolean isAllowMultiplePasswordValues() {
2347      return pAllowMultiplePasswordValues;
2348    }
2349
2350
2351
2352    /**
2353     * {@inheritDoc}
2354     */
2355    public boolean isAllowPreEncodedPasswords() {
2356      return pAllowPreEncodedPasswords;
2357    }
2358
2359
2360
2361    /**
2362     * {@inheritDoc}
2363     */
2364    public boolean isAllowUserPasswordChanges() {
2365      return pAllowUserPasswordChanges;
2366    }
2367
2368
2369
2370    /**
2371     * {@inheritDoc}
2372     */
2373    public SortedSet<String> getDefaultPasswordStorageScheme() {
2374      return pDefaultPasswordStorageScheme;
2375    }
2376
2377
2378
2379    /**
2380     * {@inheritDoc}
2381     */
2382    public SortedSet<DN> getDefaultPasswordStorageSchemeDNs() {
2383      SortedSet<String> values = getDefaultPasswordStorageScheme();
2384      SortedSet<DN> dnValues = new TreeSet<DN>();
2385      for (String value : values) {
2386        DN dn = INSTANCE.getDefaultPasswordStorageSchemePropertyDefinition().getChildDN(value);
2387        dnValues.add(dn);
2388      }
2389      return dnValues;
2390    }
2391
2392
2393
2394    /**
2395     * {@inheritDoc}
2396     */
2397    public SortedSet<String> getDeprecatedPasswordStorageScheme() {
2398      return pDeprecatedPasswordStorageScheme;
2399    }
2400
2401
2402
2403    /**
2404     * {@inheritDoc}
2405     */
2406    public SortedSet<DN> getDeprecatedPasswordStorageSchemeDNs() {
2407      SortedSet<String> values = getDeprecatedPasswordStorageScheme();
2408      SortedSet<DN> dnValues = new TreeSet<DN>();
2409      for (String value : values) {
2410        DN dn = INSTANCE.getDeprecatedPasswordStorageSchemePropertyDefinition().getChildDN(value);
2411        dnValues.add(dn);
2412      }
2413      return dnValues;
2414    }
2415
2416
2417
2418    /**
2419     * {@inheritDoc}
2420     */
2421    public boolean isExpirePasswordsWithoutWarning() {
2422      return pExpirePasswordsWithoutWarning;
2423    }
2424
2425
2426
2427    /**
2428     * {@inheritDoc}
2429     */
2430    public boolean isForceChangeOnAdd() {
2431      return pForceChangeOnAdd;
2432    }
2433
2434
2435
2436    /**
2437     * {@inheritDoc}
2438     */
2439    public boolean isForceChangeOnReset() {
2440      return pForceChangeOnReset;
2441    }
2442
2443
2444
2445    /**
2446     * {@inheritDoc}
2447     */
2448    public int getGraceLoginCount() {
2449      return pGraceLoginCount;
2450    }
2451
2452
2453
2454    /**
2455     * {@inheritDoc}
2456     */
2457    public long getIdleLockoutInterval() {
2458      return pIdleLockoutInterval;
2459    }
2460
2461
2462
2463    /**
2464     * {@inheritDoc}
2465     */
2466    public String getJavaClass() {
2467      return pJavaClass;
2468    }
2469
2470
2471
2472    /**
2473     * {@inheritDoc}
2474     */
2475    public AttributeType getLastLoginTimeAttribute() {
2476      return pLastLoginTimeAttribute;
2477    }
2478
2479
2480
2481    /**
2482     * {@inheritDoc}
2483     */
2484    public String getLastLoginTimeFormat() {
2485      return pLastLoginTimeFormat;
2486    }
2487
2488
2489
2490    /**
2491     * {@inheritDoc}
2492     */
2493    public long getLockoutDuration() {
2494      return pLockoutDuration;
2495    }
2496
2497
2498
2499    /**
2500     * {@inheritDoc}
2501     */
2502    public int getLockoutFailureCount() {
2503      return pLockoutFailureCount;
2504    }
2505
2506
2507
2508    /**
2509     * {@inheritDoc}
2510     */
2511    public long getLockoutFailureExpirationInterval() {
2512      return pLockoutFailureExpirationInterval;
2513    }
2514
2515
2516
2517    /**
2518     * {@inheritDoc}
2519     */
2520    public long getMaxPasswordAge() {
2521      return pMaxPasswordAge;
2522    }
2523
2524
2525
2526    /**
2527     * {@inheritDoc}
2528     */
2529    public long getMaxPasswordResetAge() {
2530      return pMaxPasswordResetAge;
2531    }
2532
2533
2534
2535    /**
2536     * {@inheritDoc}
2537     */
2538    public long getMinPasswordAge() {
2539      return pMinPasswordAge;
2540    }
2541
2542
2543
2544    /**
2545     * {@inheritDoc}
2546     */
2547    public AttributeType getPasswordAttribute() {
2548      return pPasswordAttribute;
2549    }
2550
2551
2552
2553    /**
2554     * {@inheritDoc}
2555     */
2556    public boolean isPasswordChangeRequiresCurrentPassword() {
2557      return pPasswordChangeRequiresCurrentPassword;
2558    }
2559
2560
2561
2562    /**
2563     * {@inheritDoc}
2564     */
2565    public long getPasswordExpirationWarningInterval() {
2566      return pPasswordExpirationWarningInterval;
2567    }
2568
2569
2570
2571    /**
2572     * {@inheritDoc}
2573     */
2574    public String getPasswordGenerator() {
2575      return pPasswordGenerator;
2576    }
2577
2578
2579
2580    /**
2581     * {@inheritDoc}
2582     */
2583    public DN getPasswordGeneratorDN() {
2584      String value = getPasswordGenerator();
2585      if (value == null) return null;
2586      return INSTANCE.getPasswordGeneratorPropertyDefinition().getChildDN(value);
2587    }
2588
2589
2590
2591    /**
2592     * {@inheritDoc}
2593     */
2594    public int getPasswordHistoryCount() {
2595      return pPasswordHistoryCount;
2596    }
2597
2598
2599
2600    /**
2601     * {@inheritDoc}
2602     */
2603    public long getPasswordHistoryDuration() {
2604      return pPasswordHistoryDuration;
2605    }
2606
2607
2608
2609    /**
2610     * {@inheritDoc}
2611     */
2612    public SortedSet<String> getPasswordValidator() {
2613      return pPasswordValidator;
2614    }
2615
2616
2617
2618    /**
2619     * {@inheritDoc}
2620     */
2621    public SortedSet<DN> getPasswordValidatorDNs() {
2622      SortedSet<String> values = getPasswordValidator();
2623      SortedSet<DN> dnValues = new TreeSet<DN>();
2624      for (String value : values) {
2625        DN dn = INSTANCE.getPasswordValidatorPropertyDefinition().getChildDN(value);
2626        dnValues.add(dn);
2627      }
2628      return dnValues;
2629    }
2630
2631
2632
2633    /**
2634     * {@inheritDoc}
2635     */
2636    public SortedSet<String> getPreviousLastLoginTimeFormat() {
2637      return pPreviousLastLoginTimeFormat;
2638    }
2639
2640
2641
2642    /**
2643     * {@inheritDoc}
2644     */
2645    public String getRequireChangeByTime() {
2646      return pRequireChangeByTime;
2647    }
2648
2649
2650
2651    /**
2652     * {@inheritDoc}
2653     */
2654    public boolean isRequireSecureAuthentication() {
2655      return pRequireSecureAuthentication;
2656    }
2657
2658
2659
2660    /**
2661     * {@inheritDoc}
2662     */
2663    public boolean isRequireSecurePasswordChanges() {
2664      return pRequireSecurePasswordChanges;
2665    }
2666
2667
2668
2669    /**
2670     * {@inheritDoc}
2671     */
2672    public boolean isSkipValidationForAdministrators() {
2673      return pSkipValidationForAdministrators;
2674    }
2675
2676
2677
2678    /**
2679     * {@inheritDoc}
2680     */
2681    public StateUpdateFailurePolicy getStateUpdateFailurePolicy() {
2682      return pStateUpdateFailurePolicy;
2683    }
2684
2685
2686
2687    /**
2688     * {@inheritDoc}
2689     */
2690    public Class<? extends PasswordPolicyCfg> configurationClass() {
2691      return PasswordPolicyCfg.class;
2692    }
2693
2694
2695
2696    /**
2697     * {@inheritDoc}
2698     */
2699    public DN dn() {
2700      return impl.getDN();
2701    }
2702
2703
2704
2705    /** {@inheritDoc} */
2706    public String toString() {
2707      return impl.toString();
2708    }
2709  }
2710}