Java Doc for JBossSecurityMgrRealm.java in  » EJB-Server-JBoss-4.2.1 » tomcat » org » jboss » web » tomcat » 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 » EJB Server JBoss 4.2.1 » tomcat » org.jboss.web.tomcat.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jboss.web.tomcat.security.JBossSecurityMgrRealm

All known Subclasses:   org.jboss.web.tomcat.security.JaccAuthorizationRealm,
JBossSecurityMgrRealm
public class JBossSecurityMgrRealm extends RealmBase implements Realm(Code)
An implementation of the catelinz Realm and Valve interfaces. The Realm implementation handles authentication and authorization using the JBossSX security framework. It relieas on the JNDI ENC namespace setup by the AbstractWebContainer. In particular, it uses the java:comp/env/security subcontext to access the security manager interfaces for authorization and authenticaton.

The Valve interface is used to associated the authenticated user with the SecurityAssociation class when a request begins so that web components may call EJBs and have the principal propagated. The security association is removed when the request completes.
author:
   Scott.Stark@jboss.org
version:
   $Revision: 57206 $
See Also:   org.jboss.security.AuthenticationManager
See Also:   org.jboss.security.CertificatePrincipal
See Also:   org.jboss.security.RealmMapping
See Also:   org.jboss.security.SimplePrincipal
See Also:   org.jboss.security.SecurityAssociation
See Also:   org.jboss.security.SubjectSecurityManager



Field Summary
static  Loggerlog
    


Method Summary
public  Principalauthenticate(X509Certificate[] certs)
     Return the Principal associated with the specified chain of X509 client certificates.
public  Principalauthenticate(String username, String digest, String nonce, String nc, String cnonce, String qop, String realm, String md5a2)
     Return the Principal associated with the specified username, which matches the digest calculated using the given parameters using the method described in RFC 2069; otherwise return null.
public  Principalauthenticate(String username, String credentials)
     Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
public  Principalauthenticate(String username, byte[] credentials)
     Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
protected  PrincipalgetCachingPrincpal(RealmMapping realmMapping, Principal authPrincipal, Principal callerPrincipal, Object credential, Subject subject)
     Create the session principal tomcat will cache to avoid callouts to this Realm.
protected  StringgetName()
     Return a short name for this Realm implementation, for use in log messages.
protected  StringgetPassword(String username)
     Return the password associated with the given principal's user name.
protected  PrincipalgetPrincipal(String username)
     Return the Principal associated with the given user name.
protected  SetgetPrincipalRoles(Principal principal)
     Access the set of role Princpals associated with the given caller princpal.
public  booleanhasResourcePermission(Request request, Response response, SecurityConstraint[] constraints, org.apache.catalina.Context context)
    
public  booleanhasRole(Principal principal, String role)
     Returns true if the specified user Principal has the specified security role, within the context of this Realm; otherwise return false.
public  voidsetCertificatePrincipal(String className)
     Set the class name of the CertificatePrincipal used for mapping X509 cert chains to a Princpal.
public  voidstart()
    
public  voidstop()
    

Field Detail
log
static Logger log(Code)





Method Detail
authenticate
public Principal authenticate(X509Certificate[] certs)(Code)
Return the Principal associated with the specified chain of X509 client certificates. If there is none, return null.
Parameters:
  certs - Array of client certificates, with the first one in the arraybeing the certificate of the client itself.



authenticate
public Principal authenticate(String username, String digest, String nonce, String nc, String cnonce, String qop, String realm, String md5a2)(Code)
Return the Principal associated with the specified username, which matches the digest calculated using the given parameters using the method described in RFC 2069; otherwise return null.
Parameters:
  username - Username of the Principal to look up
Parameters:
  digest - Digest which has been submitted by the client
Parameters:
  nonce - Unique (or supposedly unique) token which has been used forthis request
Parameters:
  nc - client nonce reuse count
Parameters:
  cnonce - client token
Parameters:
  qop - quality of protection
Parameters:
  realm - Realm name
Parameters:
  md5a2 - Second MD5 digest used to calculate the digest : MD5(Method +":" + uri)



authenticate
public Principal authenticate(String username, String credentials)(Code)
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
Parameters:
  username - Username of the Principal to look up
Parameters:
  credentials - Password or other credentials to use in authenticatingthis username



authenticate
public Principal authenticate(String username, byte[] credentials)(Code)
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
Parameters:
  username - Username of the Principal to look up
Parameters:
  credentials - Password or other credentials to use in authenticatingthis username



getCachingPrincpal
protected Principal getCachingPrincpal(RealmMapping realmMapping, Principal authPrincipal, Principal callerPrincipal, Object credential, Subject subject)(Code)
Create the session principal tomcat will cache to avoid callouts to this Realm.
Parameters:
  realmMapping - - the role mapping security manager
Parameters:
  authPrincipal - - the principal used for authentication and stored inthe security manager cache
Parameters:
  callerPrincipal - - the possibly different caller principalrepresentation of the authenticated principal
Parameters:
  credential - - the credential used for authentication the tomcat session principal wrapper



getName
protected String getName()(Code)
Return a short name for this Realm implementation, for use in log messages.



getPassword
protected String getPassword(String username)(Code)
Return the password associated with the given principal's user name.



getPrincipal
protected Principal getPrincipal(String username)(Code)
Return the Principal associated with the given user name.



getPrincipalRoles
protected Set getPrincipalRoles(Principal principal)(Code)
Access the set of role Princpals associated with the given caller princpal.
Parameters:
  principal - - the Principal mapped from the authentication principaland visible from the HttpServletRequest.getUserPrincipal a possible null Set for the caller roles



hasResourcePermission
public boolean hasResourcePermission(Request request, Response response, SecurityConstraint[] constraints, org.apache.catalina.Context context) throws IOException(Code)



hasRole
public boolean hasRole(Principal principal, String role)(Code)
Returns true if the specified user Principal has the specified security role, within the context of this Realm; otherwise return false. This will be true when an associated role Principal can be found whose getName method returns a String equalling the specified role.
Parameters:
  principal - Principal for whom the role is to bechecked
Parameters:
  role - Security role to be checked



setCertificatePrincipal
public void setCertificatePrincipal(String className)(Code)
Set the class name of the CertificatePrincipal used for mapping X509 cert chains to a Princpal.
Parameters:
  className - the CertificatePrincipal implementation class that musthave a no-arg ctor.
See Also:   org.jboss.security.CertificatePrincipal



start
public void start() throws LifecycleException(Code)
Override to allow a single realm to be shared as a realm and valve



stop
public void stop() throws LifecycleException(Code)
Override to allow a single realm to be shared as a realm and valve



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