NestedGroupDNTestCase.java revision ea1068c292e9b341af6d6b563cd8988a96be20a9
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
* Portions Copyright 2015 ForgeRock AS
*/
/**
* Test the groupdn keyword using nested groups.
*/
public class NestedGroupDNTestCase extends AciTestCase {
private static final
"(version 3.0; acl \"group ACI\"; " +
"allow (all) " +
public void setupClass() throws Exception {
addEntries("o=test");
}
public void clearBackend() throws Exception {
}
/**
* Test access using static nested groups. Add a user to group3, add group3
* to group2 and group2 to group1.
*
* @throws Exception If an unexpected result is received.
*/
@Test
public void testNestedGroup() throws Exception {
//Access to user5 should be denied, user5 is not in any groups.
//Add user5 to group1.
//Nest group1 in group2.
//Nest group2 in group1.
//Results should be returned since user5 now has access.
}
/**
* Test access using a dynamic nested group. Group 4 (dynamic) is nested
* in group1, group1 is nested in group2, group2 is nested in group1.
*
* @throws Exception If an unexpected result is returned.
*/
@Test
public void testNestedDynamicGroup() throws Exception {
//Add group4 (dynamic) to group3.
//Results should be returned, since user5 now has access because of
//nested group4.
}
/**
* Test group access using a circular group definition. Group3 points back
* to group1.
*
* @throws Exception IKf an unexpected result is returned.
*/
@Test
public void testNestedCircularGroup() throws Exception {
//Nest group1 in group3, creating circular nesting.
//Results should not be returned because of circular condition.
}
}