1026N/A * The contents of this file are subject to the terms of the 1026N/A * Common Development and Distribution License, Version 1.0 only 1026N/A * (the "License"). You may not use this file except in compliance 1026N/A * You can obtain a copy of the license at 1026N/A * See the License for the specific language governing permissions 1026N/A * and limitations under the License. 1026N/A * When distributing Covered Code, include this CDDL HEADER in each 1026N/A * file and include the License file at 1026N/A * add the following below this CDDL HEADER, with the fields enclosed 1026N/A * by brackets "[]" replaced with your own identifying information: 1026N/A * Portions Copyright [yyyy] [name of copyright owner] 3232N/A * Copyright 2006-2008 Sun Microsystems, Inc. 1026N/A * A set of test cases for the unique characters password validator. 1026N/A * Ensures that the Directory Server is running. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A * Retrieves a set of valid configuration entries that may be used to 1026N/A * initialize the validator. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: false",
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: true",
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 0",
1026N/A "ds-cfg-case-sensitive-validation: false");
1026N/A * Tests the process of initializing the server with valid configurations. 1026N/A * @param entry The configuration entry to use for the initialization. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A * Retrieves a set of invalid configuration entries. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A // Missing minimum unique characters 1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
1026N/A "ds-cfg-case-sensitive-validation: false",
1026N/A // Missing case-sensitive validation 1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A // Non-numeric minimum unique characters 1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: non-numeric",
1026N/A "ds-cfg-case-sensitive-validation: false",
1026N/A // Non-boolean case-sensitive validation 1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: non-boolean",
1026N/A // Minimum unique characters out of range. 1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: -1",
1026N/A "ds-cfg-case-sensitive-validation: false");
1026N/A * Tests the process of initializing the server with invalid configurations. 1026N/A * @param entry The configuration entry to use for the initialization. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A * Tests the {@code passwordIsAcceptable} method with a password that falls 1026N/A * within the constraints of the password validator. Case-sensitivity will 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A "dn: uid=test.user,o=test",
1026N/A "objectClass: organizationalPerson",
1026N/A "objectClass: inetOrgPerson",
1026N/A "userPassword: doesntmatter");
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: false");
1026N/A * Tests the {@code passwordIsAcceptable} method with a password that falls 1026N/A * outside the constraints of the password validator. Case-sensitivity will 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A "dn: uid=test.user,o=test",
1026N/A "objectClass: organizationalPerson",
1026N/A "objectClass: inetOrgPerson",
1026N/A "userPassword: doesntmatter");
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: false");
1026N/A * Tests the {@code passwordIsAcceptable} method with a password that falls 1026N/A * within the constraints of the password validator only because it uses 1026N/A * case-sensitive validation. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A "dn: uid=test.user,o=test",
1026N/A "objectClass: organizationalPerson",
1026N/A "objectClass: inetOrgPerson",
1026N/A "userPassword: doesntmatter");
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: true");
1026N/A * Tests the {@code passwordIsAcceptable} method with a password that falls 1026N/A * outside the constraints of the password validator because it uses 1026N/A * case-insensitive validation. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A "dn: uid=test.user,o=test",
1026N/A "objectClass: organizationalPerson",
1026N/A "objectClass: inetOrgPerson",
1026N/A "userPassword: doesntmatter");
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: false");
1026N/A * Tests the {@code passwordIsAcceptable} method when the validator is 1026N/A * configured to accept any number of unique characters. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A "dn: uid=test.user,o=test",
1026N/A "objectClass: organizationalPerson",
1026N/A "objectClass: inetOrgPerson",
1026N/A "userPassword: doesntmatter");
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 0",
1026N/A "ds-cfg-case-sensitive-validation: true");
1026N/A * Tests the ability of the password validator to change its behavior when 1026N/A * the configuration is updated. 1026N/A * @throws Exception If an unexpected problem occurs. 1026N/A "dn: uid=test.user,o=test",
1026N/A "objectClass: organizationalPerson",
1026N/A "objectClass: inetOrgPerson",
1026N/A "userPassword: doesntmatter");
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 0",
1026N/A "ds-cfg-case-sensitive-validation: true");
1026N/A "dn: cn=Unique Characters,cn=Password Validators,cn=config",
1026N/A "objectClass: ds-cfg-password-validator",
1026N/A "objectClass: ds-cfg-unique-characters-password-validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1026N/A "UniqueCharactersPasswordValidator",
2624N/A "ds-cfg-min-unique-characters: 5",
1026N/A "ds-cfg-case-sensitive-validation: true");