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