Java Doc for F_RunAs.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » jtests » clients » security » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.jtests.clients.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
protected static  StringPRINCIPAL1_NAME
    
protected static  StringPRINCIPAL2_NAME
    
protected static  StringROLE1_NAME
    
protected static  StringROLE2_NAME
    
protected static  SecurityCurrentcurrent
    
protected static  BaseSHomenoRunAsHome
    
protected static  SecurityContextprincipal1
    
protected static  SecurityContextprincipal2
    
protected static  BaseSHomerunAsHome
    

Constructor Summary
public  F_RunAs(String name)
    

Method Summary
public  BaseSgetBaseNoRunAs()
    
public  BaseSgetBaseRunAs()
    
public  BaseSHomegetNoRunAsHome()
    
public  BaseSHomegetRunAsHome()
    
public static  voidmain(String args)
    
protected  voidsetUp()
    
public static  Testsuite()
    
public  voidtestNoRunAsAtAll()
    
public  voidtestRunAsAndNoRunAs()
     Test the call on a bean which call another bean.
public  voidtestRunAsAndSecurityOrderDeclaration()
    
public  voidtestRunAsChain()
     Test the call on a bean which call another bean.
public  voidtestRunAsJms()
    
public  voidtestRunAsMultipleChain()
    
public  voidtestRunAsOnTimer()
     Test the run-as with a Timer First bean implements TimedObject and has the run-as set.
public  voidtestnoRunAsAndRunAs()
     Test the call on a bean which call another bean.

Field Detail
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



current
protected static SecurityCurrent current(Code)
Current



noRunAsHome
protected static BaseSHome noRunAsHome(Code)
Home no runAs



principal1
protected static SecurityContext principal1(Code)
principal 1



principal2
protected static SecurityContext principal2(Code)
principal 2



runAsHome
protected static BaseSHome runAsHome(Code)
Home runAs




Constructor Detail
F_RunAs
public F_RunAs(String name)(Code)
Constructor




Method Detail
getBaseNoRunAs
public BaseS getBaseNoRunAs() throws Exception(Code)



getBaseRunAs
public BaseS getBaseRunAs() throws Exception(Code)



getNoRunAsHome
public BaseSHome getNoRunAsHome()(Code)
Return the Home no runAs



getRunAsHome
public BaseSHome getRunAsHome()(Code)
Return the Home runAs



main
public static void main(String args)(Code)



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



Fields inherited from org.objectweb.jonas.jtests.util.JTestCase
final public static String PACKAGE(Code)(Java Doc)
protected static Context ictx(Code)(Java Doc)
protected static String jonasName(Code)(Java Doc)
protected StringBuffer msgerror(Code)(Java Doc)
protected static String testtorun(Code)(Java Doc)
public static UserTransaction utx(Code)(Java Doc)

Methods inherited from org.objectweb.jonas.jtests.util.JTestCase
protected static void callTest(String classname, String testname) throws Exception(Code)(Java Doc)
protected static void callrepeatedTest(String classname, String testname, int n) throws Exception(Code)(Java Doc)
public static void debug(String msg)(Code)(Java Doc)
public static void error(String msg)(Code)(Java Doc)
public DBEnv getDBEnv()(Code)(Java Doc)
public int random(int max) throws RemoteException(Code)(Java Doc)
protected void setUp()(Code)(Java Doc)
public void sleep(int msec)(Code)(Java Doc)
public void sync(boolean passivate)(Code)(Java Doc)
protected void tearDown() throws Exception(Code)(Java Doc)
public void testEmpty() throws Exception(Code)(Java Doc)
public void unloadBeans(String filename)(Code)(Java Doc)
public void useBeans(String filename, boolean create)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.