383N/A * The contents of this file are subject to the terms of the 383N/A * Common Development and Distribution License, Version 1.0 only 383N/A * (the "License"). You may not use this file except in compliance 383N/A * See the License for the specific language governing permissions 383N/A * and limitations under the License. 383N/A * When distributing Covered Code, include this CDDL HEADER in each 6982N/A * If applicable, add the following below this CDDL HEADER, with the 6982N/A * fields enclosed by brackets "[]" replaced with your own identifying 383N/A * Portions Copyright [yyyy] [name of copyright owner] 4352N/A * Copyright 2006-2009 Sun Microsystems, Inc. 6105N/A * Portions Copyright 2011-2013 ForgeRock AS 383N/A * A set of test cases for the LDAPSearch tool. 383N/A // The path to a file containing an invalid bind password. 383N/A // The path to a file containing a valid bind password. 383N/A * Ensures that the Directory Server is running and performs other necessary 383N/A * @throws Exception If an unexpected problem occurs. 3888N/A "set-sasl-mechanism-handler-prop",
3888N/A "--handler-name",
"DIGEST-MD5",
3888N/A "--set",
"server-fqdn:" +
"127.0.0.1");
3888N/A "set-sasl-mechanism-handler-prop",
3888N/A "--handler-name",
"DIGEST-MD5",
3888N/A "--remove",
"server-fqdn:" +
"127.0.0.1");
383N/A * Retrieves sets of invalid arguments that may not be used to initialize 383N/A * @return Sets of invalid arguments that may not be used to initialize the 6105N/A "-h",
"-p",
"-V",
"-f",
"-J",
"-z",
"-l",
"-s",
"-a",
"-o",
"-c",
6105N/A "--assertionFilter",
"--matchedValuesFilter");
383N/A "--invalidLongArgument" 383N/A "--assertionFilter",
"(invalidfilter)",
383N/A "--matchedValuesFilter",
"(invalidfilter)",
383N/A "-D",
"cn=Directory Manager",
383N/A "-D",
"cn=Directory Manager",
383N/A "-J",
"1.2.3.4:invalidcriticality",
383N/A "-C",
"ps:add,delete,modify,modifydn,invalid",
383N/A "-C",
"ps:all:invalid",
383N/A "-C",
"ps:all:1:invalid",
383N/A "-K",
"key.store.file",
383N/A * Tests the LDAPSearch tool with sets of invalid arguments. 497N/A * @param args The set of arguments to use for the LDAPSearch tool. 497N/A * @param invalidReason The reason that the set of arguments is not valid. 383N/A * Tests a simple LDAPv2 search. 383N/A "-D",
"cn=Directory Manager",
383N/A * Tests a simple LDAPv3 search. 383N/A "-D",
"cn=Directory Manager",
1924N/A * Tests a simple search with verbose output. 1924N/A "-D",
"cn=Directory Manager",
1060N/A * Tests a simple invocation using the "--dry-run" option with a valid argument 962N/A "-h",
"doesnt.need.to.resolve",
962N/A "-D",
"cn=Directory Manager",
1060N/A * Tests a simple invocation using the "--dry-run" option with an invalid 962N/A "-h",
"doesnt.need.to.resolve",
962N/A "-D",
"cn=Directory Manager",
383N/A * Tests a simple LDAP search over SSL using blind trust. 383N/A * Tests a simple LDAP search over SSL using a trust store. 383N/A * Tests a simple LDAP search using StartTLS with blind trust. 383N/A * Tests a simple LDAP search using StartTLS with a trust store. 383N/A * Tests a simple LDAP search over SSL using a trust store and SASL EXTERNAL 383N/A * @throws Exception If an unexpected problem occurs. 383N/A "dn: cn=Test User,o=test",
383N/A "objectClass: organizationalPerson",
383N/A "objectClass: inetOrgPerson",
867N/A * Tests a simple LDAP search over SSL using a trust store and SASL EXTERNAL 867N/A * authentication when explicitly specifying a valid client certificate. 867N/A * @throws Exception If an unexpected problem occurs. 867N/A "dn: cn=Test User,o=test",
867N/A "objectClass: organizationalPerson",
867N/A "objectClass: inetOrgPerson",
867N/A * Tests a simple LDAP search over SSL using a trust store and SASL EXTERNAL 867N/A * authentication when explicitly specifying an invalid client certificate. 867N/A * @throws Exception If an unexpected problem occurs. 867N/A "dn: cn=Test User,o=test",
867N/A "objectClass: organizationalPerson",
867N/A "objectClass: inetOrgPerson",
383N/A * Tests a simple LDAP search using StartTLS with a trust store and SASL 383N/A * EXTERNAL authentication. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A "dn: cn=Test User,o=test",
383N/A "objectClass: organizationalPerson",
383N/A "objectClass: inetOrgPerson",
383N/A * Tests a simple search operation using CRAM-MD5 authentication. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A "dn: uid=test.user,o=test",
383N/A "objectClass: organizationalPerson",
383N/A "objectClass: inetOrgPerson",
383N/A "userPassword: password",
549N/A "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
383N/A "cn=Password Policies,cn=config");
383N/A "-o",
"authid=u:test.user",
383N/A * Tests a simple search operation using CRAM-MD5 authentication. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A "dn: uid=test.user,o=test",
383N/A "objectClass: organizationalPerson",
383N/A "objectClass: inetOrgPerson",
383N/A "userPassword: password",
549N/A "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
383N/A "cn=Password Policies,cn=config");
383N/A "-o",
"mech=DIGEST-MD5",
383N/A "-o",
"authid=u:test.user",
383N/A "-o",
"authzid=u:test.user",
383N/A * Tests a simple search operation using PLAIN authentication. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A "-o",
"authid=dn:cn=Directory Manager",
383N/A * Tests a search with a malformed bind DN. 383N/A * Tests a search with a nonexistent bind DN. 383N/A "-D",
"cn=Does Not Exist",
383N/A * Tests a search with an invalid password. 383N/A "-D",
"cn=Directory Manager",
383N/A * Tests a search with a valid password read from a file. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A "-D",
"cn=Directory Manager",
383N/A * Tests a search with an invalid password read from a file. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A "-D",
"cn=Directory Manager",
383N/A * Tests a search with a malformed base DN. 383N/A * Tests a search with a nonexistent base DN. 383N/A "-b",
"o=does not exist",
383N/A * Retrieves the set of valid search scopes. 383N/A * @return The set of valid search scopes. 383N/A * Tests searches with the various allowed search scopes. 383N/A * @param scope The scope to use for the search. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A * Retrieves the set of valid alias dereferencing policies. 383N/A * @return The set of valid alias dereferencing policies. 383N/A * Tests searches with the various allowed dereference policy values. 383N/A * @param derefPolicy The alias dereferencing policy for the search. 383N/A * @throws Exception If an unexpected problem occurs. 383N/A * Tests with the typesOnly option. 383N/A * Tests with the reportAuthzID option for an unauthenticated search. 383N/A * Tests with the reportAuthzID option for an authenticated search. 383N/A "-D",
"cn=Directory Manager",
383N/A * Tests with the usePasswordPolicyControl option for an authenticated search. 383N/A "-D",
"cn=Directory Manager",
383N/A "--usePasswordPolicyControl",
383N/A * Tests with the account usability control for an authenticated search. 383N/A "-D",
"cn=Directory Manager",
556N/A * Tests with the account usability control with an alternate name for an 556N/A * authenticated search. 556N/A "-D",
"cn=Directory Manager",
556N/A "-J",
"accountusable:true",
383N/A * Tests with the LDAP assertion control in which the assertion is true. 383N/A "-D",
"cn=Directory Manager",
383N/A "--assertionFilter",
"(objectClass=top)",
383N/A * Tests with the LDAP assertion control in which the assertion is false. 383N/A "-D",
"cn=Directory Manager",
383N/A "--assertionFilter",
"(objectClass=doesNotMatch)",
383N/A * Tests with the LDAP matched values control. 383N/A "-D",
"cn=Directory Manager",
383N/A "--matchedValuesFilter",
"(objectClass=*person)",
556N/A * Tests the use of the LDAP subentries control. 556N/A * @throws Exception If an unexpected problem occurs. 556N/A "objectClass: ldapSubEntry",
844N/A "-D",
"cn=Directory Manager",
844N/A "-D",
"cn=Directory Manager",
844N/A "-D",
"cn=Directory Manager",
553N/A * Tests the inclusion of multiple arbitrary controls in the request to the 553N/A * @throws Exception If an unexpectd problem occurs. 553N/A "-D",
"cn=Directory Manager",
763N/A * Tests the use of the simple paged results control. 763N/A * @throws Exception If an unexpectd problem occurs. 763N/A "dn: cn=device 1,dc=example,dc=com",
763N/A "dn: cn=device 2,dc=example,dc=com",
763N/A "dn: cn=device 3,dc=example,dc=com",
763N/A "dn: cn=device 4,dc=example,dc=com",
763N/A "dn: cn=device 5,dc=example,dc=com",
763N/A "-D",
"cn=Directory Manager",
763N/A "-b",
"dc=example,dc=com",
763N/A "--simplePageSize",
"2",
1211N/A * Tests the use of both the server-side sort control and the simple paged 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "dn: uid=albert.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=albert.smith,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=aaron.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=mary.jones,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=margaret.jones,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=aaccf.johnson,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=sam.zweck,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=lowercase.mcgee,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=zorro,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "-D",
"cn=Directory Manager",
1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with valid sort criteria. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "dn: uid=albert.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=albert.smith,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=aaron.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with valid sort criteria. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "dn: uid=albert.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=albert.smith,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=aaron.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with valid sort criteria. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "dn: uid=albert.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=albert.smith,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=aaron.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "-D",
"cn=Directory Manager",
1211N/A "-S",
"givenName:caseExactOrderingMatch",
1211N/A * Tests the use of the server-side sort control with valid sort criteria. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "dn: uid=albert.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=albert.smith,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=aaron.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with valid sort criteria. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "dn: uid=albert.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=albert.smith,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "dn: uid=aaron.zimmerman,dc=example,dc=com",
1211N/A "objectClass: organizationalPerson",
1211N/A "objectClass: inetOrgPerson",
1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with an empty sort order. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with a sort order containing 1211N/A * a key with no attribute type. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with a sort order containing 1211N/A * a key with a colon but no matching rule. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with an undefined attribute. 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "-D",
"cn=Directory Manager",
1211N/A * Tests the use of the server-side sort control with an undefined ordering 1211N/A * @throws Exception If an unexpectd problem occurs. 1211N/A "-D",
"cn=Directory Manager",
1211N/A "-S",
"givenName:undefined",
5419N/A * Tests the use of a control with an empty value. 5419N/A * We use the ManageDSAIt control for this. 5419N/A * @throws Exception If an unexpected problem occurs. 5419N/A "-D",
"cn=Directory Manager",
5419N/A "-J",
"managedsait:false:",
1224N/A * Tests the use of the virtual list view control without the server-side sort 1224N/A * @throws Exception If an unexpected problem occurs. 5419N/A // Test is supposed to fail in parsing arguments. But we do not 5419N/A // want it to fail because there no backend to search in. 1224N/A "-D",
"cn=Directory Manager",
1224N/A * Tests the use of the server-side sort control with both the simple paged 1224N/A * results and virtual list view controls. 1224N/A * @throws Exception If an unexpectd problem occurs. 1224N/A "-D",
"cn=Directory Manager",
1224N/A * Tests the use of the virtual list view control with an invalid descriptor 1224N/A * @throws Exception If an unexpected problem occurs. 1224N/A "-D",
"cn=Directory Manager",
1224N/A * Tests the use of the virtual list view control with an invalid descriptor 1224N/A * @throws Exception If an unexpected problem occurs. 1224N/A "-D",
"cn=Directory Manager",
1224N/A * Tests the use of the virtual list view control with an invalid descriptor 1224N/A * @throws Exception If an unexpected problem occurs. 1224N/A "-D",
"cn=Directory Manager",
1224N/A * Tests the use of both the server-side sort control and the virtual list 1224N/A * @throws Exception If an unexpectd problem occurs. 1224N/A "dn: uid=albert.zimmerman,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=albert.smith,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=aaron.zimmerman,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=mary.jones,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=margaret.jones,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=aaccf.johnson,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=sam.zweck,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=lowercase.mcgee,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "dn: uid=zorro,dc=example,dc=com",
1224N/A "objectClass: organizationalPerson",
1224N/A "objectClass: inetOrgPerson",
1224N/A "-D",
"cn=Directory Manager",
383N/A * Tests the LDAPSearch tool with the "--help" option.