SimilarityBasedPasswordValidatorTestCase.java revision 5902
1017N/A * The contents of this file are subject to the terms of the 1017N/A * Common Development and Distribution License, Version 1.0 only 1017N/A * (the "License"). You may not use this file except in compliance 1017N/A * You can obtain a copy of the license at 1017N/A * See the License for the specific language governing permissions 1017N/A * and limitations under the License. 1017N/A * When distributing Covered Code, include this CDDL HEADER in each 1017N/A * file and include the License file at 1017N/A * add the following below this CDDL HEADER, with the fields enclosed 1017N/A * by brackets "[]" replaced with your own identifying information: 1017N/A * Portions Copyright [yyyy] [name of copyright owner] 3232N/A * Copyright 2006-2008 Sun Microsystems, Inc. 1017N/A * A set of test cases for the Similarity-Based Password Validator. 1017N/A * Ensures that the Directory Server is running. 1017N/A * @throws Exception If an unexpected problem occurs. 1017N/A * Retrieves a set of valid configuration entries that may be used to 1017N/A * initialize the validator. 1017N/A * @throws Exception If an unexpected problem occurs. 1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A "ds-cfg-min-password-difference: 6",
1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A "ds-cfg-min-password-difference: 3",
1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A "ds-cfg-min-password-difference: 0" 1017N/A * Tests the process of initializing the server with valid configurations. 1017N/A * @param entry The configuration entry to use for the initialization. 1017N/A * @throws Exception If an unexpected problem occurs. 1017N/A * Retrieves a set of invvalid configuration entries. 1017N/A * @throws Exception If an unexpected problem occurs. 1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A "ds-cfg-min-password-difference: -1",
1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A // "ds-cfg-min-password-difference: -1", // error here 1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A "ds-cfg-min-password-difference: notNumeric");
1017N/A * Tests the process of initializing the server with invalid configurations. 1017N/A * @param entry The configuration entry to use for the initialization. 1017N/A * @throws Exception If an unexpected problem occurs. 1017N/A * Tests the <CODE>passwordIsAcceptable</CODE> method with no constraints on 1017N/A * @throws Exception If an unexpected problem occurs. 1017N/A "dn: uid=test.user,o=test",
1017N/A "objectClass: organizationalPerson",
1017N/A "objectClass: inetOrgPerson",
1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A "ds-cfg-min-password-difference: 0" 1017N/A * Tests the <CODE>passwordIsAcceptable</CODE> method with a constraint on the 1017N/A * minimum password difference. 1017N/A * @throws Exception If an unexpected problem occurs. 1017N/A "dn: uid=test.user,o=test",
1017N/A "objectClass: organizationalPerson",
1017N/A "objectClass: inetOrgPerson",
1017N/A "dn: cn=Similarity-Based Password Validator,cn=Password Validators," +
1017N/A "objectClass: ds-cfg-password-validator",
1017N/A "objectClass: ds-cfg-similarity-based-password-validator",
1017N/A "cn: Similarity-Based Password Validator",
2624N/A "ds-cfg-java-class: org.opends.server.extensions." +
1017N/A "SimilarityBasedPasswordValidator",
2624N/A "ds-cfg-min-password-difference: 3"