239N/A * The contents of this file are subject to the terms of the 239N/A * Common Development and Distribution License, Version 1.0 only 239N/A * (the "License"). You may not use this file except in compliance 239N/A * You can obtain a copy of the license at 239N/A * See the License for the specific language governing permissions 239N/A * and limitations under the License. 239N/A * When distributing Covered Code, include this CDDL HEADER in each 239N/A * file and include the License file at 239N/A * add the following below this CDDL HEADER, with the fields enclosed 873N/A * by brackets "[]" replaced with your own identifying information: 239N/A * Portions Copyright [yyyy] [name of copyright owner] 3232N/A * Copyright 2006-2008 Sun Microsystems, Inc. 239N/A * A set of test cases for the "Who Am I?" extended operation. 239N/A * Ensures that the Directory Server is running. 239N/A * @throws Exception If an unexpected problem occurs. 239N/A * Tests the use of the Who Am I? extended operation with an internal 239N/A * connection authenticated as a root user. 239N/A * Tests the use of the Who Am I? extended operation with an internal 239N/A * unauthenticated connection. 2105N/A * @throws Exception If an unexpected problem occurs. 239N/A * Tests the use of the Who Am I? extended operation with an internal 239N/A * connection authenticated as a normal user. 239N/A * @throws Exception If an unexpected problem occurs. 239N/A "dn: uid=test.user,o=test",
239N/A "objectClass: organizationalPerson",
239N/A "objectClass: inetOrgPerson",
239N/A "userPassword: password");
239N/A * Tests the use of the Who Am I? extended operation with an LDAP connection 239N/A * authenticated as a root user. 239N/A * @throws Exception If an unexpected problem occurs. 239N/A * Tests the use of the Who Am I? extended operation with an unauthenticated 239N/A * @throws Exception If an unexpected problem occurs. 239N/A * Tests the use of the Who Am I? extended operation with an LDAP connection 239N/A * authenticated as a normal user. 239N/A * @throws Exception If an unexpected problem occurs. 239N/A "dn: uid=test.user,o=test",
239N/A "objectClass: organizationalPerson",
239N/A "objectClass: inetOrgPerson",
239N/A "userPassword: password");
2017N/A * Tests the use of the "Who Am I?" extended operation when used by a client 2017N/A * that has authenticated using a SASL mechanism and specified an alternate 2017N/A * @throws Exception If an unexpected problem occurs. 2017N/A "dn: uid=test.user,o=test",
2017N/A "objectClass: organizationalPerson",
2017N/A "objectClass: inetOrgPerson",
2017N/A "dn: uid=proxy.user,o=test",
2017N/A "objectClass: organizationalPerson",
2017N/A "objectClass: inetOrgPerson",
2017N/A "ds-privilege-name: bypass-acl",
2017N/A "ds-privilege-name: proxied-auth");
2017N/A // Bind as the proxy user with an alternate authorization identity, and use 2017N/A // the "Who Am I?" operation. 2017N/A // Close the connection to the server. 2017N/A * Tests the use of the Who Am I? extended operation in conjunction with the 2017N/A * proxied authorization control by an appropriately authorized user. 2017N/A * @throws Exception If an unexpected problem occurs. 2017N/A "dn: uid=test.user,o=test",
2017N/A "objectClass: organizationalPerson",
2017N/A "objectClass: inetOrgPerson",
2017N/A "dn: uid=proxy.user,o=test",
2017N/A "objectClass: organizationalPerson",
2017N/A "objectClass: inetOrgPerson",
2017N/A "ds-privilege-name: bypass-acl",
2017N/A "ds-privilege-name: proxied-auth");
2017N/A // Bind as the proxy user and use the "Who Am I?" operation, but without the 2017N/A // Use the "Who Am I?" operation again, this time with the proxy control. 2017N/A // Close the connection to the server. 2017N/A * Tests the use of the Who Am I? extended operation in conjunction with the 2017N/A * proxied authorization control by a user who doesn't have the rights to use 2017N/A * @throws Exception If an unexpected problem occurs. 2017N/A "dn: uid=test.user,o=test",
2017N/A "objectClass: organizationalPerson",
2017N/A "objectClass: inetOrgPerson",
2017N/A "dn: uid=cantproxy.user,o=test",
2017N/A "objectClass: organizationalPerson",
2017N/A "objectClass: inetOrgPerson",
2017N/A "ds-privilege-name: bypass-acl");
2017N/A // Bind as the proxy user and use the "Who Am I?" operation, but without the 2017N/A // Use the "Who Am I?" operation again, this time with the proxy control. 2017N/A // Close the connection to the server.