| |
|
| org.objectweb.jonas.jtests.util.JTestCase org.objectweb.jonas.jtests.clients.security.F_RunAs
F_RunAs | public class F_RunAs extends JTestCase (Code) | | Security Management Suite with a stateless session as first bean
Test the run-as element
author: Florent Benoit |
PRINCIPAL1_NAME | protected static String PRINCIPAL1_NAME(Code) | | Name of the principal 1
|
PRINCIPAL2_NAME | protected static String PRINCIPAL2_NAME(Code) | | Name of the principal 2
|
ROLE1_NAME | protected static String ROLE1_NAME(Code) | | Name of the role 1
|
ROLE2_NAME | protected static String ROLE2_NAME(Code) | | Name of the role 2
|
getNoRunAsHome | public BaseSHome getNoRunAsHome()(Code) | | Return the Home no runAs
|
setUp | protected void setUp()(Code) | | init environment:
- load beans
|
suite | public static Test suite()(Code) | | This suite is all BMP test cases
|
testNoRunAsAtAll | public void testNoRunAsAtAll() throws Exception(Code) | | Test the call on a bean which call another bean without any runAs
The principal must be propagated
|
testRunAsAndNoRunAs | public void testRunAsAndNoRunAs() throws Exception(Code) | | Test the call on a bean which call another bean.
First bean need to have a run-as access, but not the second
The principal must be propagated
|
testRunAsAndSecurityOrderDeclaration | public void testRunAsAndSecurityOrderDeclaration() throws Exception(Code) | | Test call on protected beans, some beans have run-as roles
It also use LoginContext to authenticate
This test come from user Alexander Daryin
This testcase test the problem of the order in ejb-jar.xml of the permissions
|
testRunAsChain | public void testRunAsChain() throws Exception(Code) | | Test the call on a bean which call another bean.
First bean need to have a run-as access and the second too
First run-as is role1 ,second run-as is role3
so the test works if there is an access denied in second bean
The principal must be propagated
|
testRunAsJms | public void testRunAsJms() throws Exception(Code) | | Send a message to a MDB which create another bean with its run-as role
MDB send to a queue the answer to see if the test is ok or fail
|
testRunAsMultipleChain | public void testRunAsMultipleChain() throws Exception(Code) | | Test the call on a bean which call another bean, etc
First bean need role2 and has a run-as
After calling a runas bean, it call a no-run as bean
First run-as is role2 ,second run-as is role3 and last call is done on a without runas
The principal must be propagated
|
testRunAsOnTimer | public void testRunAsOnTimer() throws Exception(Code) | | Test the run-as with a Timer
First bean implements TimedObject and has the run-as set.
Timeout method calls another bean method protected
throws: Exception - Unexpected Test error |
testnoRunAsAndRunAs | public void testnoRunAsAndRunAs() throws Exception(Code) | | Test the call on a bean which call another bean.
First bean don't need to have a run-as access, but the second does
The principal must be propagated
|
|
|
|