Java Doc for SecurityVerifier.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » auth » 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 » Wiki Engine » JSPWiki » com.ecyrd.jspwiki.auth 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ecyrd.jspwiki.auth.SecurityVerifier

SecurityVerifier
final public class SecurityVerifier (Code)
Helper class for verifying JSPWiki's security configuration. Invoked by admin/SecurityConfig.jsp.
author:
   Andrew Jaquith
since:
   2.4


Field Summary
final public static  StringERROR
     Message prefix for errors.
final public static  StringERROR_DB
     Message topic for user database errors.
final public static  StringERROR_GROUPS
     Message topic for group database errors.
final public static  StringERROR_JAAS
     Message topic for JAAS errors.
final public static  StringERROR_POLICY
     Message topic for policy errors.
final public static  StringERROR_ROLES
     Message topic for role-checking errors.
final public static  StringINFO
     Message prefix for information messages.
final public static  StringINFO_DB
     Message topic for user database information messages.
final public static  StringINFO_GROUPS
     Message topic for group database information messages.
final public static  StringINFO_JAAS
     Message topic for JAAS information messages.
final public static  StringINFO_POLICY
     Message topic for policy information messages.
final public static  StringINFO_ROLES
     Message topic for role-checking information messages.
final public static  StringWARNING
     Message prefix for warnings.
final public static  StringWARNING_DB
     Message topic for user database warnings.
final public static  StringWARNING_GROUPS
     Message topic for group database warnings.
final public static  StringWARNING_JAAS
     Message topic for JAAS warnings.
final public static  StringWARNING_POLICY
     Message topic for policy warnings.

Constructor Summary
public  SecurityVerifier(WikiEngine engine, WikiSession session)
     Constructs a new SecurityVerifier for a supplied WikiEngine and WikiSession.

Method Summary
final public  StringcontainerRoleTable()
     Formats and returns an HTML table containing the roles the web container is aware of, and whether each role maps to particular JSPs.
final protected  FilegetFileFromProperty(String property)
     Looks up a file name based on a JRE system property and returns the associated File object if it exists.
final protected  booleanisJaasConfigurationAvailable(String config)
     Returns true if JSPWiki can locate a named JAAS login configuration.
Parameters:
  config - the name of the application (e.g.,JSPWiki-container).
final public  booleanisJaasConfigured()
     Returns true if JAAS is configured correctly.
final public  booleanisJaasConfiguredAtStartup()
     Returns true if the JAAS login configuration was already set when JSPWiki started up.
final public  booleanisSecurityPolicyConfigured()
     Returns true if the Java security policy is configured correctly, and it verifies as valid.
final public  FilejaasConfiguration()
     Returns the location of the JAAS configuration file if and only if the java.security.auth.login.config is set and the file it points to exists in the file system; returns null in all other cases.
final public  Principal[]policyPrincipals()
     Returns an array of unique Principals from the JSPWIki security policy file.
final public  StringpolicyRoleTable()
     Formats and returns an HTML table containing sample permissions and what roles are allowed to have them.
final protected  voidverifyGroupDatabase()
     Verifies that the group datbase was initialized properly, and that user add and delete operations work as they should.
final protected  voidverifyJaas()
     Verfies the JAAS configuration.
final protected  voidverifyPolicy()
     Verfies the Java security policy configuration.
final protected  voidverifyPolicyAndContainerRoles()
     Verifies that the roles given in the security policy are reflected by the container web.xml file.
final protected  booleanverifyStaticPermission(Principal principal, Permission permission)
     Verifies that a particular Principal possesses a Permission, as defined in the security policy file.
final protected  voidverifyUserDatabase()
     Verifies that the user datbase was initialized properly, and that user add and delete operations work as they should.
final public  Principal[]webContainerRoles()
     If the active Authorizer is the WebContainerAuthorizer, returns the roles it knows about; otherwise, a zero-length array.

Field Detail
ERROR
final public static String ERROR(Code)
Message prefix for errors.



ERROR_DB
final public static String ERROR_DB(Code)
Message topic for user database errors.



ERROR_GROUPS
final public static String ERROR_GROUPS(Code)
Message topic for group database errors.



ERROR_JAAS
final public static String ERROR_JAAS(Code)
Message topic for JAAS errors.



ERROR_POLICY
final public static String ERROR_POLICY(Code)
Message topic for policy errors.



ERROR_ROLES
final public static String ERROR_ROLES(Code)
Message topic for role-checking errors.



INFO
final public static String INFO(Code)
Message prefix for information messages.



INFO_DB
final public static String INFO_DB(Code)
Message topic for user database information messages.



INFO_GROUPS
final public static String INFO_GROUPS(Code)
Message topic for group database information messages.



INFO_JAAS
final public static String INFO_JAAS(Code)
Message topic for JAAS information messages.



INFO_POLICY
final public static String INFO_POLICY(Code)
Message topic for policy information messages.



INFO_ROLES
final public static String INFO_ROLES(Code)
Message topic for role-checking information messages.



WARNING
final public static String WARNING(Code)
Message prefix for warnings.



WARNING_DB
final public static String WARNING_DB(Code)
Message topic for user database warnings.



WARNING_GROUPS
final public static String WARNING_GROUPS(Code)
Message topic for group database warnings.



WARNING_JAAS
final public static String WARNING_JAAS(Code)
Message topic for JAAS warnings.



WARNING_POLICY
final public static String WARNING_POLICY(Code)
Message topic for policy warnings.




Constructor Detail
SecurityVerifier
public SecurityVerifier(WikiEngine engine, WikiSession session)(Code)
Constructs a new SecurityVerifier for a supplied WikiEngine and WikiSession.
Parameters:
  engine - the wiki engine
Parameters:
  session - the wiki session (typically, that of an administrator)




Method Detail
containerRoleTable
final public String containerRoleTable() throws WikiException(Code)
Formats and returns an HTML table containing the roles the web container is aware of, and whether each role maps to particular JSPs. This method throws an IllegalStateException if the authorizer is not of type com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer the formatted HTML table containing the result of the tests
throws:
  WikiException - if tests fail for unexpected reasons



getFileFromProperty
final protected File getFileFromProperty(String property)(Code)
Looks up a file name based on a JRE system property and returns the associated File object if it exists. This method adds messages with the topic prefix SecurityVerifier.ERROR and SecurityVerifier.INFO as appropriate, with the suffix matching the supplied property.
Parameters:
  property - the system property to look up the file object, or null if not found



isJaasConfigurationAvailable
final protected boolean isJaasConfigurationAvailable(String config)(Code)
Returns true if JSPWiki can locate a named JAAS login configuration.
Parameters:
  config - the name of the application (e.g.,JSPWiki-container). true if found; false otherwise



isJaasConfigured
final public boolean isJaasConfigured()(Code)
Returns true if JAAS is configured correctly. the result of the configuration check



isJaasConfiguredAtStartup
final public boolean isJaasConfiguredAtStartup()(Code)
Returns true if the JAAS login configuration was already set when JSPWiki started up. We determine this value by consulting a protected member field of AuthenticationManager , which was set at in initialization by PolicyLoader . true if PolicyLoader successfully set thepolicy, or false for any other reason.



isSecurityPolicyConfigured
final public boolean isSecurityPolicyConfigured()(Code)
Returns true if the Java security policy is configured correctly, and it verifies as valid. the result of the configuration check



jaasConfiguration
final public File jaasConfiguration()(Code)
Returns the location of the JAAS configuration file if and only if the java.security.auth.login.config is set and the file it points to exists in the file system; returns null in all other cases. the location of the JAAS configuration file



policyPrincipals
final public Principal[] policyPrincipals()(Code)
Returns an array of unique Principals from the JSPWIki security policy file. This array will be zero-length if the policy file was not successfully located, or if the file did not specify any Principals in the policy. the array of principals



policyRoleTable
final public String policyRoleTable()(Code)
Formats and returns an HTML table containing sample permissions and what roles are allowed to have them. This method will throw an IllegalStateException if the authorizer is not of type com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer the formatted HTML table containing the result of the tests



verifyGroupDatabase
final protected void verifyGroupDatabase()(Code)
Verifies that the group datbase was initialized properly, and that user add and delete operations work as they should.



verifyJaas
final protected void verifyJaas()(Code)
Verfies the JAAS configuration. The configuration is valid if value of the system property java.security.auth.login.config resolves to an existing file, and we can find the JAAS login configurations for JSPWiki-container and JSPWiki-custom.



verifyPolicy
final protected void verifyPolicy()(Code)
Verfies the Java security policy configuration. The configuration is valid if value of the local policy (at WEB-INF/jspwiki.policy resolves to an existing file, and the policy file contained therein represents a valid policy.



verifyPolicyAndContainerRoles
final protected void verifyPolicyAndContainerRoles() throws WikiException(Code)
Verifies that the roles given in the security policy are reflected by the container web.xml file.
throws:
  WikiException - if the web authorizer cannot verify the roles



verifyStaticPermission
final protected boolean verifyStaticPermission(Principal principal, Permission permission)(Code)
Verifies that a particular Principal possesses a Permission, as defined in the security policy file.
Parameters:
  principal - the principal
Parameters:
  permission - the permission the result, based on consultation with the active Java securitypolicy



verifyUserDatabase
final protected void verifyUserDatabase()(Code)
Verifies that the user datbase was initialized properly, and that user add and delete operations work as they should.



webContainerRoles
final public Principal[] webContainerRoles() throws WikiException(Code)
If the active Authorizer is the WebContainerAuthorizer, returns the roles it knows about; otherwise, a zero-length array. the roles parsed from web.xml, or a zero-length array
throws:
  WikiException - if the web authorizer cannot obtain the list of roles



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.