001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.client;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.opends.server.admin.ManagedObjectDefinition;
033import org.opends.server.admin.PropertyException;
034import org.opends.server.admin.std.meta.PasswordPolicyCfgDefn.StateUpdateFailurePolicy;
035import org.opends.server.admin.std.server.PasswordPolicyCfg;
036import org.opends.server.types.AttributeType;
037
038
039
040/**
041 * A client-side interface for reading and modifying Password Policy
042 * settings.
043 * <p>
044 * Password Policies define a number of password management rules, as
045 * well as requirements for authentication processing.
046 */
047public interface PasswordPolicyCfgClient extends AuthenticationPolicyCfgClient {
048
049  /**
050   * Get the configuration definition associated with this Password Policy.
051   *
052   * @return Returns the configuration definition associated with this Password Policy.
053   */
054  ManagedObjectDefinition<? extends PasswordPolicyCfgClient, ? extends PasswordPolicyCfg> definition();
055
056
057
058  /**
059   * Gets the "account-status-notification-handler" property.
060   * <p>
061   * Specifies the names of the account status notification handlers
062   * that are used with the associated password storage scheme.
063   *
064   * @return Returns the values of the "account-status-notification-handler" property.
065   */
066  SortedSet<String> getAccountStatusNotificationHandler();
067
068
069
070  /**
071   * Sets the "account-status-notification-handler" property.
072   * <p>
073   * Specifies the names of the account status notification handlers
074   * that are used with the associated password storage scheme.
075   *
076   * @param values The values of the "account-status-notification-handler" property.
077   * @throws PropertyException
078   *           If one or more of the new values are invalid.
079   */
080  void setAccountStatusNotificationHandler(Collection<String> values) throws PropertyException;
081
082
083
084  /**
085   * Gets the "allow-expired-password-changes" property.
086   * <p>
087   * Indicates whether a user whose password is expired is still
088   * allowed to change that password using the password modify extended
089   * operation.
090   *
091   * @return Returns the value of the "allow-expired-password-changes" property.
092   */
093  boolean isAllowExpiredPasswordChanges();
094
095
096
097  /**
098   * Sets the "allow-expired-password-changes" property.
099   * <p>
100   * Indicates whether a user whose password is expired is still
101   * allowed to change that password using the password modify extended
102   * operation.
103   *
104   * @param value The value of the "allow-expired-password-changes" property.
105   * @throws PropertyException
106   *           If the new value is invalid.
107   */
108  void setAllowExpiredPasswordChanges(Boolean value) throws PropertyException;
109
110
111
112  /**
113   * Gets the "allow-multiple-password-values" property.
114   * <p>
115   * Indicates whether user entries can have multiple distinct values
116   * for the password attribute.
117   * <p>
118   * This is potentially dangerous because many mechanisms used to
119   * change the password do not work well with such a configuration. If
120   * multiple password values are allowed, then any of them can be used
121   * to authenticate, and they are all subject to the same policy
122   * constraints.
123   *
124   * @return Returns the value of the "allow-multiple-password-values" property.
125   */
126  boolean isAllowMultiplePasswordValues();
127
128
129
130  /**
131   * Sets the "allow-multiple-password-values" property.
132   * <p>
133   * Indicates whether user entries can have multiple distinct values
134   * for the password attribute.
135   * <p>
136   * This is potentially dangerous because many mechanisms used to
137   * change the password do not work well with such a configuration. If
138   * multiple password values are allowed, then any of them can be used
139   * to authenticate, and they are all subject to the same policy
140   * constraints.
141   *
142   * @param value The value of the "allow-multiple-password-values" property.
143   * @throws PropertyException
144   *           If the new value is invalid.
145   */
146  void setAllowMultiplePasswordValues(Boolean value) throws PropertyException;
147
148
149
150  /**
151   * Gets the "allow-pre-encoded-passwords" property.
152   * <p>
153   * Indicates whether users can change their passwords by providing a
154   * pre-encoded value.
155   * <p>
156   * This can cause a security risk because the clear-text version of
157   * the password is not known and therefore validation checks cannot
158   * be applied to it.
159   *
160   * @return Returns the value of the "allow-pre-encoded-passwords" property.
161   */
162  boolean isAllowPreEncodedPasswords();
163
164
165
166  /**
167   * Sets the "allow-pre-encoded-passwords" property.
168   * <p>
169   * Indicates whether users can change their passwords by providing a
170   * pre-encoded value.
171   * <p>
172   * This can cause a security risk because the clear-text version of
173   * the password is not known and therefore validation checks cannot
174   * be applied to it.
175   *
176   * @param value The value of the "allow-pre-encoded-passwords" property.
177   * @throws PropertyException
178   *           If the new value is invalid.
179   */
180  void setAllowPreEncodedPasswords(Boolean value) throws PropertyException;
181
182
183
184  /**
185   * Gets the "allow-user-password-changes" property.
186   * <p>
187   * Indicates whether users can change their own passwords.
188   * <p>
189   * This check is made in addition to access control evaluation. Both
190   * must allow the password change for it to occur.
191   *
192   * @return Returns the value of the "allow-user-password-changes" property.
193   */
194  boolean isAllowUserPasswordChanges();
195
196
197
198  /**
199   * Sets the "allow-user-password-changes" property.
200   * <p>
201   * Indicates whether users can change their own passwords.
202   * <p>
203   * This check is made in addition to access control evaluation. Both
204   * must allow the password change for it to occur.
205   *
206   * @param value The value of the "allow-user-password-changes" property.
207   * @throws PropertyException
208   *           If the new value is invalid.
209   */
210  void setAllowUserPasswordChanges(Boolean value) throws PropertyException;
211
212
213
214  /**
215   * Gets the "default-password-storage-scheme" property.
216   * <p>
217   * Specifies the names of the password storage schemes that are used
218   * to encode clear-text passwords for this password policy.
219   *
220   * @return Returns the values of the "default-password-storage-scheme" property.
221   */
222  SortedSet<String> getDefaultPasswordStorageScheme();
223
224
225
226  /**
227   * Sets the "default-password-storage-scheme" property.
228   * <p>
229   * Specifies the names of the password storage schemes that are used
230   * to encode clear-text passwords for this password policy.
231   *
232   * @param values The values of the "default-password-storage-scheme" property.
233   * @throws PropertyException
234   *           If one or more of the new values are invalid.
235   */
236  void setDefaultPasswordStorageScheme(Collection<String> values) throws PropertyException;
237
238
239
240  /**
241   * Gets the "deprecated-password-storage-scheme" property.
242   * <p>
243   * Specifies the names of the password storage schemes that are
244   * considered deprecated for this password policy.
245   * <p>
246   * If a user with this password policy authenticates to the server
247   * and his/her password is encoded with a deprecated scheme, those
248   * values are removed and replaced with values encoded using the
249   * default password storage scheme(s).
250   *
251   * @return Returns the values of the "deprecated-password-storage-scheme" property.
252   */
253  SortedSet<String> getDeprecatedPasswordStorageScheme();
254
255
256
257  /**
258   * Sets the "deprecated-password-storage-scheme" property.
259   * <p>
260   * Specifies the names of the password storage schemes that are
261   * considered deprecated for this password policy.
262   * <p>
263   * If a user with this password policy authenticates to the server
264   * and his/her password is encoded with a deprecated scheme, those
265   * values are removed and replaced with values encoded using the
266   * default password storage scheme(s).
267   *
268   * @param values The values of the "deprecated-password-storage-scheme" property.
269   * @throws PropertyException
270   *           If one or more of the new values are invalid.
271   */
272  void setDeprecatedPasswordStorageScheme(Collection<String> values) throws PropertyException;
273
274
275
276  /**
277   * Gets the "expire-passwords-without-warning" property.
278   * <p>
279   * Indicates whether the directory server allows a user's password
280   * to expire even if that user has never seen an expiration warning
281   * notification.
282   * <p>
283   * If this property is true, accounts always expire when the
284   * expiration time arrives. If this property is false or disabled,
285   * the user always receives at least one warning notification, and
286   * the password expiration is set to the warning time plus the
287   * warning interval.
288   *
289   * @return Returns the value of the "expire-passwords-without-warning" property.
290   */
291  boolean isExpirePasswordsWithoutWarning();
292
293
294
295  /**
296   * Sets the "expire-passwords-without-warning" property.
297   * <p>
298   * Indicates whether the directory server allows a user's password
299   * to expire even if that user has never seen an expiration warning
300   * notification.
301   * <p>
302   * If this property is true, accounts always expire when the
303   * expiration time arrives. If this property is false or disabled,
304   * the user always receives at least one warning notification, and
305   * the password expiration is set to the warning time plus the
306   * warning interval.
307   *
308   * @param value The value of the "expire-passwords-without-warning" property.
309   * @throws PropertyException
310   *           If the new value is invalid.
311   */
312  void setExpirePasswordsWithoutWarning(Boolean value) throws PropertyException;
313
314
315
316  /**
317   * Gets the "force-change-on-add" property.
318   * <p>
319   * Indicates whether users are forced to change their passwords upon
320   * first authenticating to the directory server after their account
321   * has been created.
322   *
323   * @return Returns the value of the "force-change-on-add" property.
324   */
325  boolean isForceChangeOnAdd();
326
327
328
329  /**
330   * Sets the "force-change-on-add" property.
331   * <p>
332   * Indicates whether users are forced to change their passwords upon
333   * first authenticating to the directory server after their account
334   * has been created.
335   *
336   * @param value The value of the "force-change-on-add" property.
337   * @throws PropertyException
338   *           If the new value is invalid.
339   */
340  void setForceChangeOnAdd(Boolean value) throws PropertyException;
341
342
343
344  /**
345   * Gets the "force-change-on-reset" property.
346   * <p>
347   * Indicates whether users are forced to change their passwords if
348   * they are reset by an administrator.
349   * <p>
350   * For this purpose, anyone with permission to change a given user's
351   * password other than that user is considered an administrator.
352   *
353   * @return Returns the value of the "force-change-on-reset" property.
354   */
355  boolean isForceChangeOnReset();
356
357
358
359  /**
360   * Sets the "force-change-on-reset" property.
361   * <p>
362   * Indicates whether users are forced to change their passwords if
363   * they are reset by an administrator.
364   * <p>
365   * For this purpose, anyone with permission to change a given user's
366   * password other than that user is considered an administrator.
367   *
368   * @param value The value of the "force-change-on-reset" property.
369   * @throws PropertyException
370   *           If the new value is invalid.
371   */
372  void setForceChangeOnReset(Boolean value) throws PropertyException;
373
374
375
376  /**
377   * Gets the "grace-login-count" property.
378   * <p>
379   * Specifies the number of grace logins that a user is allowed after
380   * the account has expired to allow that user to choose a new
381   * password.
382   * <p>
383   * A value of 0 indicates that no grace logins are allowed.
384   *
385   * @return Returns the value of the "grace-login-count" property.
386   */
387  int getGraceLoginCount();
388
389
390
391  /**
392   * Sets the "grace-login-count" property.
393   * <p>
394   * Specifies the number of grace logins that a user is allowed after
395   * the account has expired to allow that user to choose a new
396   * password.
397   * <p>
398   * A value of 0 indicates that no grace logins are allowed.
399   *
400   * @param value The value of the "grace-login-count" property.
401   * @throws PropertyException
402   *           If the new value is invalid.
403   */
404  void setGraceLoginCount(Integer value) throws PropertyException;
405
406
407
408  /**
409   * Gets the "idle-lockout-interval" property.
410   * <p>
411   * Specifies the maximum length of time that an account may remain
412   * idle (that is, the associated user does not authenticate to the
413   * server) before that user is locked out.
414   * <p>
415   * The value of this attribute is an integer followed by a unit of
416   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
417   * indicates that idle accounts are not automatically locked out.
418   * This feature is available only if the last login time is
419   * maintained.
420   *
421   * @return Returns the value of the "idle-lockout-interval" property.
422   */
423  long getIdleLockoutInterval();
424
425
426
427  /**
428   * Sets the "idle-lockout-interval" property.
429   * <p>
430   * Specifies the maximum length of time that an account may remain
431   * idle (that is, the associated user does not authenticate to the
432   * server) before that user is locked out.
433   * <p>
434   * The value of this attribute is an integer followed by a unit of
435   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
436   * indicates that idle accounts are not automatically locked out.
437   * This feature is available only if the last login time is
438   * maintained.
439   *
440   * @param value The value of the "idle-lockout-interval" property.
441   * @throws PropertyException
442   *           If the new value is invalid.
443   */
444  void setIdleLockoutInterval(Long value) throws PropertyException;
445
446
447
448  /**
449   * Gets the "java-class" property.
450   * <p>
451   * Specifies the fully-qualified name of the Java class which
452   * provides the Password Policy implementation.
453   *
454   * @return Returns the value of the "java-class" property.
455   */
456  String getJavaClass();
457
458
459
460  /**
461   * Sets the "java-class" property.
462   * <p>
463   * Specifies the fully-qualified name of the Java class which
464   * provides the Password Policy implementation.
465   *
466   * @param value The value of the "java-class" property.
467   * @throws PropertyException
468   *           If the new value is invalid.
469   */
470  void setJavaClass(String value) throws PropertyException;
471
472
473
474  /**
475   * Gets the "last-login-time-attribute" property.
476   * <p>
477   * Specifies the name or OID of the attribute type that is used to
478   * hold the last login time for users with the associated password
479   * policy.
480   * <p>
481   * This attribute type must be defined in the directory server
482   * schema and must either be defined as an operational attribute or
483   * must be allowed by the set of objectClasses for all users with the
484   * associated password policy.
485   *
486   * @return Returns the value of the "last-login-time-attribute" property.
487   */
488  AttributeType getLastLoginTimeAttribute();
489
490
491
492  /**
493   * Sets the "last-login-time-attribute" property.
494   * <p>
495   * Specifies the name or OID of the attribute type that is used to
496   * hold the last login time for users with the associated password
497   * policy.
498   * <p>
499   * This attribute type must be defined in the directory server
500   * schema and must either be defined as an operational attribute or
501   * must be allowed by the set of objectClasses for all users with the
502   * associated password policy.
503   *
504   * @param value The value of the "last-login-time-attribute" property.
505   * @throws PropertyException
506   *           If the new value is invalid.
507   */
508  void setLastLoginTimeAttribute(AttributeType value) throws PropertyException;
509
510
511
512  /**
513   * Gets the "last-login-time-format" property.
514   * <p>
515   * Specifies the format string that is used to generate the last
516   * login time value for users with the associated password policy.
517   * <p>
518   * This format string conforms to the syntax described in the API
519   * documentation for the java.text.SimpleDateFormat class.
520   *
521   * @return Returns the value of the "last-login-time-format" property.
522   */
523  String getLastLoginTimeFormat();
524
525
526
527  /**
528   * Sets the "last-login-time-format" property.
529   * <p>
530   * Specifies the format string that is used to generate the last
531   * login time value for users with the associated password policy.
532   * <p>
533   * This format string conforms to the syntax described in the API
534   * documentation for the java.text.SimpleDateFormat class.
535   *
536   * @param value The value of the "last-login-time-format" property.
537   * @throws PropertyException
538   *           If the new value is invalid.
539   */
540  void setLastLoginTimeFormat(String value) throws PropertyException;
541
542
543
544  /**
545   * Gets the "lockout-duration" property.
546   * <p>
547   * Specifies the length of time that an account is locked after too
548   * many authentication failures.
549   * <p>
550   * The value of this attribute is an integer followed by a unit of
551   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
552   * indicates that the account must remain locked until an
553   * administrator resets the password.
554   *
555   * @return Returns the value of the "lockout-duration" property.
556   */
557  long getLockoutDuration();
558
559
560
561  /**
562   * Sets the "lockout-duration" property.
563   * <p>
564   * Specifies the length of time that an account is locked after too
565   * many authentication failures.
566   * <p>
567   * The value of this attribute is an integer followed by a unit of
568   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
569   * indicates that the account must remain locked until an
570   * administrator resets the password.
571   *
572   * @param value The value of the "lockout-duration" property.
573   * @throws PropertyException
574   *           If the new value is invalid.
575   */
576  void setLockoutDuration(Long value) throws PropertyException;
577
578
579
580  /**
581   * Gets the "lockout-failure-count" property.
582   * <p>
583   * Specifies the maximum number of authentication failures that a
584   * user is allowed before the account is locked out.
585   * <p>
586   * A value of 0 indicates that accounts are never locked out due to
587   * failed attempts.
588   *
589   * @return Returns the value of the "lockout-failure-count" property.
590   */
591  int getLockoutFailureCount();
592
593
594
595  /**
596   * Sets the "lockout-failure-count" property.
597   * <p>
598   * Specifies the maximum number of authentication failures that a
599   * user is allowed before the account is locked out.
600   * <p>
601   * A value of 0 indicates that accounts are never locked out due to
602   * failed attempts.
603   *
604   * @param value The value of the "lockout-failure-count" property.
605   * @throws PropertyException
606   *           If the new value is invalid.
607   */
608  void setLockoutFailureCount(Integer value) throws PropertyException;
609
610
611
612  /**
613   * Gets the "lockout-failure-expiration-interval" property.
614   * <p>
615   * Specifies the length of time before an authentication failure is
616   * no longer counted against a user for the purposes of account
617   * lockout.
618   * <p>
619   * The value of this attribute is an integer followed by a unit of
620   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
621   * indicates that the authentication failures must never expire. The
622   * failure count is always cleared upon a successful authentication.
623   *
624   * @return Returns the value of the "lockout-failure-expiration-interval" property.
625   */
626  long getLockoutFailureExpirationInterval();
627
628
629
630  /**
631   * Sets the "lockout-failure-expiration-interval" property.
632   * <p>
633   * Specifies the length of time before an authentication failure is
634   * no longer counted against a user for the purposes of account
635   * lockout.
636   * <p>
637   * The value of this attribute is an integer followed by a unit of
638   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
639   * indicates that the authentication failures must never expire. The
640   * failure count is always cleared upon a successful authentication.
641   *
642   * @param value The value of the "lockout-failure-expiration-interval" property.
643   * @throws PropertyException
644   *           If the new value is invalid.
645   */
646  void setLockoutFailureExpirationInterval(Long value) throws PropertyException;
647
648
649
650  /**
651   * Gets the "max-password-age" property.
652   * <p>
653   * Specifies the maximum length of time that a user can continue
654   * using the same password before it must be changed (that is, the
655   * password expiration interval).
656   * <p>
657   * The value of this attribute is an integer followed by a unit of
658   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
659   * disables password expiration.
660   *
661   * @return Returns the value of the "max-password-age" property.
662   */
663  long getMaxPasswordAge();
664
665
666
667  /**
668   * Sets the "max-password-age" property.
669   * <p>
670   * Specifies the maximum length of time that a user can continue
671   * using the same password before it must be changed (that is, the
672   * password expiration interval).
673   * <p>
674   * The value of this attribute is an integer followed by a unit of
675   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
676   * disables password expiration.
677   *
678   * @param value The value of the "max-password-age" property.
679   * @throws PropertyException
680   *           If the new value is invalid.
681   */
682  void setMaxPasswordAge(Long value) throws PropertyException;
683
684
685
686  /**
687   * Gets the "max-password-reset-age" property.
688   * <p>
689   * Specifies the maximum length of time that users have to change
690   * passwords after they have been reset by an administrator before
691   * they become locked.
692   * <p>
693   * The value of this attribute is an integer followed by a unit of
694   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
695   * disables this feature.
696   *
697   * @return Returns the value of the "max-password-reset-age" property.
698   */
699  long getMaxPasswordResetAge();
700
701
702
703  /**
704   * Sets the "max-password-reset-age" property.
705   * <p>
706   * Specifies the maximum length of time that users have to change
707   * passwords after they have been reset by an administrator before
708   * they become locked.
709   * <p>
710   * The value of this attribute is an integer followed by a unit of
711   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
712   * disables this feature.
713   *
714   * @param value The value of the "max-password-reset-age" property.
715   * @throws PropertyException
716   *           If the new value is invalid.
717   */
718  void setMaxPasswordResetAge(Long value) throws PropertyException;
719
720
721
722  /**
723   * Gets the "min-password-age" property.
724   * <p>
725   * Specifies the minimum length of time after a password change
726   * before the user is allowed to change the password again.
727   * <p>
728   * The value of this attribute is an integer followed by a unit of
729   * seconds, minutes, hours, days, or weeks. This setting can be used
730   * to prevent users from changing their passwords repeatedly over a
731   * short period of time to flush an old password from the history so
732   * that it can be re-used.
733   *
734   * @return Returns the value of the "min-password-age" property.
735   */
736  long getMinPasswordAge();
737
738
739
740  /**
741   * Sets the "min-password-age" property.
742   * <p>
743   * Specifies the minimum length of time after a password change
744   * before the user is allowed to change the password again.
745   * <p>
746   * The value of this attribute is an integer followed by a unit of
747   * seconds, minutes, hours, days, or weeks. This setting can be used
748   * to prevent users from changing their passwords repeatedly over a
749   * short period of time to flush an old password from the history so
750   * that it can be re-used.
751   *
752   * @param value The value of the "min-password-age" property.
753   * @throws PropertyException
754   *           If the new value is invalid.
755   */
756  void setMinPasswordAge(Long value) throws PropertyException;
757
758
759
760  /**
761   * Gets the "password-attribute" property.
762   * <p>
763   * Specifies the attribute type used to hold user passwords.
764   * <p>
765   * This attribute type must be defined in the server schema, and it
766   * must have either the user password or auth password syntax.
767   *
768   * @return Returns the value of the "password-attribute" property.
769   */
770  AttributeType getPasswordAttribute();
771
772
773
774  /**
775   * Sets the "password-attribute" property.
776   * <p>
777   * Specifies the attribute type used to hold user passwords.
778   * <p>
779   * This attribute type must be defined in the server schema, and it
780   * must have either the user password or auth password syntax.
781   *
782   * @param value The value of the "password-attribute" property.
783   * @throws PropertyException
784   *           If the new value is invalid.
785   */
786  void setPasswordAttribute(AttributeType value) throws PropertyException;
787
788
789
790  /**
791   * Gets the "password-change-requires-current-password" property.
792   * <p>
793   * Indicates whether user password changes must use the password
794   * modify extended operation and must include the user's current
795   * password before the change is allowed.
796   *
797   * @return Returns the value of the "password-change-requires-current-password" property.
798   */
799  boolean isPasswordChangeRequiresCurrentPassword();
800
801
802
803  /**
804   * Sets the "password-change-requires-current-password" property.
805   * <p>
806   * Indicates whether user password changes must use the password
807   * modify extended operation and must include the user's current
808   * password before the change is allowed.
809   *
810   * @param value The value of the "password-change-requires-current-password" property.
811   * @throws PropertyException
812   *           If the new value is invalid.
813   */
814  void setPasswordChangeRequiresCurrentPassword(Boolean value) throws PropertyException;
815
816
817
818  /**
819   * Gets the "password-expiration-warning-interval" property.
820   * <p>
821   * Specifies the maximum length of time before a user's password
822   * actually expires that the server begins to include warning
823   * notifications in bind responses for that user.
824   * <p>
825   * The value of this attribute is an integer followed by a unit of
826   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
827   * disables the warning interval.
828   *
829   * @return Returns the value of the "password-expiration-warning-interval" property.
830   */
831  long getPasswordExpirationWarningInterval();
832
833
834
835  /**
836   * Sets the "password-expiration-warning-interval" property.
837   * <p>
838   * Specifies the maximum length of time before a user's password
839   * actually expires that the server begins to include warning
840   * notifications in bind responses for that user.
841   * <p>
842   * The value of this attribute is an integer followed by a unit of
843   * seconds, minutes, hours, days, or weeks. A value of 0 seconds
844   * disables the warning interval.
845   *
846   * @param value The value of the "password-expiration-warning-interval" property.
847   * @throws PropertyException
848   *           If the new value is invalid.
849   */
850  void setPasswordExpirationWarningInterval(Long value) throws PropertyException;
851
852
853
854  /**
855   * Gets the "password-generator" property.
856   * <p>
857   * Specifies the name of the password generator that is used with
858   * the associated password policy.
859   * <p>
860   * This is used in conjunction with the password modify extended
861   * operation to generate a new password for a user when none was
862   * provided in the request.
863   *
864   * @return Returns the value of the "password-generator" property.
865   */
866  String getPasswordGenerator();
867
868
869
870  /**
871   * Sets the "password-generator" property.
872   * <p>
873   * Specifies the name of the password generator that is used with
874   * the associated password policy.
875   * <p>
876   * This is used in conjunction with the password modify extended
877   * operation to generate a new password for a user when none was
878   * provided in the request.
879   *
880   * @param value The value of the "password-generator" property.
881   * @throws PropertyException
882   *           If the new value is invalid.
883   */
884  void setPasswordGenerator(String value) throws PropertyException;
885
886
887
888  /**
889   * Gets the "password-history-count" property.
890   * <p>
891   * Specifies the maximum number of former passwords to maintain in
892   * the password history.
893   * <p>
894   * When choosing a new password, the proposed password is checked to
895   * ensure that it does not match the current password, nor any other
896   * password in the history list. A value of zero indicates that
897   * either no password history is to be maintained (if the password
898   * history duration has a value of zero seconds), or that there is no
899   * maximum number of passwords to maintain in the history (if the
900   * password history duration has a value greater than zero seconds).
901   *
902   * @return Returns the value of the "password-history-count" property.
903   */
904  int getPasswordHistoryCount();
905
906
907
908  /**
909   * Sets the "password-history-count" property.
910   * <p>
911   * Specifies the maximum number of former passwords to maintain in
912   * the password history.
913   * <p>
914   * When choosing a new password, the proposed password is checked to
915   * ensure that it does not match the current password, nor any other
916   * password in the history list. A value of zero indicates that
917   * either no password history is to be maintained (if the password
918   * history duration has a value of zero seconds), or that there is no
919   * maximum number of passwords to maintain in the history (if the
920   * password history duration has a value greater than zero seconds).
921   *
922   * @param value The value of the "password-history-count" property.
923   * @throws PropertyException
924   *           If the new value is invalid.
925   */
926  void setPasswordHistoryCount(Integer value) throws PropertyException;
927
928
929
930  /**
931   * Gets the "password-history-duration" property.
932   * <p>
933   * Specifies the maximum length of time that passwords remain in the
934   * password history.
935   * <p>
936   * When choosing a new password, the proposed password is checked to
937   * ensure that it does not match the current password, nor any other
938   * password in the history list. A value of zero seconds indicates
939   * that either no password history is to be maintained (if the
940   * password history count has a value of zero), or that there is no
941   * maximum duration for passwords in the history (if the password
942   * history count has a value greater than zero).
943   *
944   * @return Returns the value of the "password-history-duration" property.
945   */
946  long getPasswordHistoryDuration();
947
948
949
950  /**
951   * Sets the "password-history-duration" property.
952   * <p>
953   * Specifies the maximum length of time that passwords remain in the
954   * password history.
955   * <p>
956   * When choosing a new password, the proposed password is checked to
957   * ensure that it does not match the current password, nor any other
958   * password in the history list. A value of zero seconds indicates
959   * that either no password history is to be maintained (if the
960   * password history count has a value of zero), or that there is no
961   * maximum duration for passwords in the history (if the password
962   * history count has a value greater than zero).
963   *
964   * @param value The value of the "password-history-duration" property.
965   * @throws PropertyException
966   *           If the new value is invalid.
967   */
968  void setPasswordHistoryDuration(Long value) throws PropertyException;
969
970
971
972  /**
973   * Gets the "password-validator" property.
974   * <p>
975   * Specifies the names of the password validators that are used with
976   * the associated password storage scheme.
977   * <p>
978   * The password validators are invoked when a user attempts to
979   * provide a new password, to determine whether the new password is
980   * acceptable.
981   *
982   * @return Returns the values of the "password-validator" property.
983   */
984  SortedSet<String> getPasswordValidator();
985
986
987
988  /**
989   * Sets the "password-validator" property.
990   * <p>
991   * Specifies the names of the password validators that are used with
992   * the associated password storage scheme.
993   * <p>
994   * The password validators are invoked when a user attempts to
995   * provide a new password, to determine whether the new password is
996   * acceptable.
997   *
998   * @param values The values of the "password-validator" property.
999   * @throws PropertyException
1000   *           If one or more of the new values are invalid.
1001   */
1002  void setPasswordValidator(Collection<String> values) throws PropertyException;
1003
1004
1005
1006  /**
1007   * Gets the "previous-last-login-time-format" property.
1008   * <p>
1009   * Specifies the format string(s) that might have been used with the
1010   * last login time at any point in the past for users associated with
1011   * the password policy.
1012   * <p>
1013   * These values are used to make it possible to parse previous
1014   * values, but are not used to set new values. The format strings
1015   * conform to the syntax described in the API documentation for the
1016   * java.text.SimpleDateFormat class.
1017   *
1018   * @return Returns the values of the "previous-last-login-time-format" property.
1019   */
1020  SortedSet<String> getPreviousLastLoginTimeFormat();
1021
1022
1023
1024  /**
1025   * Sets the "previous-last-login-time-format" property.
1026   * <p>
1027   * Specifies the format string(s) that might have been used with the
1028   * last login time at any point in the past for users associated with
1029   * the password policy.
1030   * <p>
1031   * These values are used to make it possible to parse previous
1032   * values, but are not used to set new values. The format strings
1033   * conform to the syntax described in the API documentation for the
1034   * java.text.SimpleDateFormat class.
1035   *
1036   * @param values The values of the "previous-last-login-time-format" property.
1037   * @throws PropertyException
1038   *           If one or more of the new values are invalid.
1039   */
1040  void setPreviousLastLoginTimeFormat(Collection<String> values) throws PropertyException;
1041
1042
1043
1044  /**
1045   * Gets the "require-change-by-time" property.
1046   * <p>
1047   * Specifies the time by which all users with the associated
1048   * password policy must change their passwords.
1049   * <p>
1050   * The value is expressed in a generalized time format. If this time
1051   * is equal to the current time or is in the past, then all users are
1052   * required to change their passwords immediately. The behavior of
1053   * the server in this mode is identical to the behavior observed when
1054   * users are forced to change their passwords after an administrative
1055   * reset.
1056   *
1057   * @return Returns the value of the "require-change-by-time" property.
1058   */
1059  String getRequireChangeByTime();
1060
1061
1062
1063  /**
1064   * Sets the "require-change-by-time" property.
1065   * <p>
1066   * Specifies the time by which all users with the associated
1067   * password policy must change their passwords.
1068   * <p>
1069   * The value is expressed in a generalized time format. If this time
1070   * is equal to the current time or is in the past, then all users are
1071   * required to change their passwords immediately. The behavior of
1072   * the server in this mode is identical to the behavior observed when
1073   * users are forced to change their passwords after an administrative
1074   * reset.
1075   *
1076   * @param value The value of the "require-change-by-time" property.
1077   * @throws PropertyException
1078   *           If the new value is invalid.
1079   */
1080  void setRequireChangeByTime(String value) throws PropertyException;
1081
1082
1083
1084  /**
1085   * Gets the "require-secure-authentication" property.
1086   * <p>
1087   * Indicates whether users with the associated password policy are
1088   * required to authenticate in a secure manner.
1089   * <p>
1090   * This might mean either using a secure communication channel
1091   * between the client and the server, or using a SASL mechanism that
1092   * does not expose the credentials.
1093   *
1094   * @return Returns the value of the "require-secure-authentication" property.
1095   */
1096  boolean isRequireSecureAuthentication();
1097
1098
1099
1100  /**
1101   * Sets the "require-secure-authentication" property.
1102   * <p>
1103   * Indicates whether users with the associated password policy are
1104   * required to authenticate in a secure manner.
1105   * <p>
1106   * This might mean either using a secure communication channel
1107   * between the client and the server, or using a SASL mechanism that
1108   * does not expose the credentials.
1109   *
1110   * @param value The value of the "require-secure-authentication" property.
1111   * @throws PropertyException
1112   *           If the new value is invalid.
1113   */
1114  void setRequireSecureAuthentication(Boolean value) throws PropertyException;
1115
1116
1117
1118  /**
1119   * Gets the "require-secure-password-changes" property.
1120   * <p>
1121   * Indicates whether users with the associated password policy are
1122   * required to change their password in a secure manner that does not
1123   * expose the credentials.
1124   *
1125   * @return Returns the value of the "require-secure-password-changes" property.
1126   */
1127  boolean isRequireSecurePasswordChanges();
1128
1129
1130
1131  /**
1132   * Sets the "require-secure-password-changes" property.
1133   * <p>
1134   * Indicates whether users with the associated password policy are
1135   * required to change their password in a secure manner that does not
1136   * expose the credentials.
1137   *
1138   * @param value The value of the "require-secure-password-changes" property.
1139   * @throws PropertyException
1140   *           If the new value is invalid.
1141   */
1142  void setRequireSecurePasswordChanges(Boolean value) throws PropertyException;
1143
1144
1145
1146  /**
1147   * Gets the "skip-validation-for-administrators" property.
1148   * <p>
1149   * Indicates whether passwords set by administrators are allowed to
1150   * bypass the password validation process that is required for user
1151   * password changes.
1152   *
1153   * @return Returns the value of the "skip-validation-for-administrators" property.
1154   */
1155  boolean isSkipValidationForAdministrators();
1156
1157
1158
1159  /**
1160   * Sets the "skip-validation-for-administrators" property.
1161   * <p>
1162   * Indicates whether passwords set by administrators are allowed to
1163   * bypass the password validation process that is required for user
1164   * password changes.
1165   *
1166   * @param value The value of the "skip-validation-for-administrators" property.
1167   * @throws PropertyException
1168   *           If the new value is invalid.
1169   */
1170  void setSkipValidationForAdministrators(Boolean value) throws PropertyException;
1171
1172
1173
1174  /**
1175   * Gets the "state-update-failure-policy" property.
1176   * <p>
1177   * Specifies how the server deals with the inability to update
1178   * password policy state information during an authentication
1179   * attempt.
1180   * <p>
1181   * In particular, this property can be used to control whether an
1182   * otherwise successful bind operation fails if a failure occurs
1183   * while attempting to update password policy state information (for
1184   * example, to clear a record of previous authentication failures or
1185   * to update the last login time). It can also be used to control
1186   * whether to reject a bind request if it is known ahead of time that
1187   * it will not be possible to update the authentication failure times
1188   * in the event of an unsuccessful bind attempt (for example, if the
1189   * backend writability mode is disabled).
1190   *
1191   * @return Returns the value of the "state-update-failure-policy" property.
1192   */
1193  StateUpdateFailurePolicy getStateUpdateFailurePolicy();
1194
1195
1196
1197  /**
1198   * Sets the "state-update-failure-policy" property.
1199   * <p>
1200   * Specifies how the server deals with the inability to update
1201   * password policy state information during an authentication
1202   * attempt.
1203   * <p>
1204   * In particular, this property can be used to control whether an
1205   * otherwise successful bind operation fails if a failure occurs
1206   * while attempting to update password policy state information (for
1207   * example, to clear a record of previous authentication failures or
1208   * to update the last login time). It can also be used to control
1209   * whether to reject a bind request if it is known ahead of time that
1210   * it will not be possible to update the authentication failure times
1211   * in the event of an unsuccessful bind attempt (for example, if the
1212   * backend writability mode is disabled).
1213   *
1214   * @param value The value of the "state-update-failure-policy" property.
1215   * @throws PropertyException
1216   *           If the new value is invalid.
1217   */
1218  void setStateUpdateFailurePolicy(StateUpdateFailurePolicy value) throws PropertyException;
1219
1220}