Java Doc for AuthenticationServiceBase.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » jdbc » authentication » 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 » Database DBMS » db derby 10.2 » org.apache.derby.impl.jdbc.authentication 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase

All known Subclasses:   org.apache.derby.impl.jdbc.authentication.JNDIAuthenticationService,  org.apache.derby.impl.jdbc.authentication.SpecificAuthenticationServiceImpl,  org.apache.derby.impl.jdbc.authentication.NoneAuthenticationServiceImpl,  org.apache.derby.impl.jdbc.authentication.BasicAuthenticationServiceImpl,
AuthenticationServiceBase
abstract public class AuthenticationServiceBase implements AuthenticationService,ModuleControl,ModuleSupportable,PropertySetCallback(Code)
This is the authentication service base class.

There can be 1 Authentication Service for the whole Cloudscape system and/or 1 authentication per database. In a near future, we intend to allow multiple authentication services per system and/or per database.

It should be extended by the specialized authentication services. IMPORTANT NOTE: -------------- User passwords are encrypted using SHA-1 message digest algorithm if they're stored in the database; otherwise they are not encrypted if they were defined at the system level. SHA-1 digest is single hash (one way) digest and is considered very secure (160 bits).
author:
   Francois



Field Summary
final public static  StringAuthenticationTrace
    
final public static  StringID_PATTERN_NEW_SCHEME
    
final public static  intMAGICLEN_NEWENCRYPT_SCHEME
    
final protected static  intSECMEC_USRSSBPWD
    
protected  UserAuthenticatorauthenticationScheme
    

Constructor Summary
public  AuthenticationServiceBase()
    

Method Summary
public  Serviceableapply(String key, Serializable value, Dictionary p)
    
public  booleanauthenticate(String databaseName, Properties userInfo)
     Authenticate a User inside JBMS.T his is an overload method.
public  voidboot(boolean create, Properties properties)
     Start this module.
protected  StringencryptPassword(String plainTxtUserPassword)
     This method encrypts a clear user password using a Single Hash algorithm such as SHA-1 (SHA equivalent) (it is a 160 bits digest) The digest is returned as an object string.
public  StringgetDatabaseProperty(String key)
    
public  StringgetProperty(String key)
     Returns a property if it was set at the database or system level.
public  StringgetSystemProperty(String key)
    
public  voidinit(boolean dbOnly, Dictionary p)
    
public  Serializablemap(String key, Serializable value, Dictionary p)
    
final protected  booleanrequireAuthentication(Properties properties)
    
protected  voidsetAuthenticationService(UserAuthenticator aScheme)
    
public  voidstop()
    
protected  StringsubstitutePassword(String userName, String password, Properties info, boolean databaseUser)
     Strong Password Substitution (USRSSBPWD).
public  booleanvalidate(String key, Serializable value, Dictionary p)
    

Field Detail
AuthenticationTrace
final public static String AuthenticationTrace(Code)
Trace flag to trace authentication operations



ID_PATTERN_NEW_SCHEME
final public static String ID_PATTERN_NEW_SCHEME(Code)
Pattern that is prefixed to the stored password in the new authentication scheme



MAGICLEN_NEWENCRYPT_SCHEME
final public static int MAGICLEN_NEWENCRYPT_SCHEME(Code)
Length of the encrypted password in the new authentication scheme See Beetle4601



SECMEC_USRSSBPWD
final protected static int SECMEC_USRSSBPWD(Code)
Userid with Strong password substitute DRDA security mechanism



authenticationScheme
protected UserAuthenticator authenticationScheme(Code)




Constructor Detail
AuthenticationServiceBase
public AuthenticationServiceBase()(Code)




Method Detail
apply
public Serviceable apply(String key, Serializable value, Dictionary p)(Code)

See Also:   PropertySetCallback.validate



authenticate
public boolean authenticate(String databaseName, Properties userInfo) throws java.sql.SQLException(Code)
Authenticate a User inside JBMS.T his is an overload method. We're passed-in a Properties object containing user credentials information (as well as database name if user needs to be validated for a certain database access).
See Also:   org.apache.derby.iapi.jdbc.AuthenticationService.authenticate



boot
public void boot(boolean create, Properties properties) throws StandardException(Code)
Start this module. In this case, nothing needs to be done.
See Also:   org.apache.derby.iapi.services.monitor.ModuleControl.boot
exception:
  StandardException - upon failure to load/bootthe expected authentication service.



encryptPassword
protected String encryptPassword(String plainTxtUserPassword)(Code)
This method encrypts a clear user password using a Single Hash algorithm such as SHA-1 (SHA equivalent) (it is a 160 bits digest) The digest is returned as an object string.
Parameters:
  plainTxtUserPassword - Plain text user password encrypted user password (digest) as a String object



getDatabaseProperty
public String getDatabaseProperty(String key)(Code)



getProperty
public String getProperty(String key)(Code)
Returns a property if it was set at the database or system level. Treated as SERVICE property by default. a property string value.



getSystemProperty
public String getSystemProperty(String key)(Code)



init
public void init(boolean dbOnly, Dictionary p)(Code)



map
public Serializable map(String key, Serializable value, Dictionary p) throws StandardException(Code)

See Also:   PropertySetCallback.map
exception:
  StandardException - Thrown on error.



requireAuthentication
final protected boolean requireAuthentication(Properties properties)(Code)



setAuthenticationService
protected void setAuthenticationService(UserAuthenticator aScheme)(Code)



stop
public void stop()(Code)

See Also:   org.apache.derby.iapi.services.monitor.ModuleControl.stop



substitutePassword
protected String substitutePassword(String userName, String password, Properties info, boolean databaseUser)(Code)
Strong Password Substitution (USRSSBPWD). This method generate a password subtitute to authenticate a client which is using a DRDA security mechanism such as SECMEC_USRSSBPWD. Depending how the user is defined in Derby and if BUILTIN is used, the stored password can be in clear-text (system level) or encrypted (hashed - *not decryptable*)) (database level) - If the user has authenticated at the network level via SECMEC_USRSSBPWD, it means we're presented with a password substitute and we need to generate a substitute password coming from the store to compare with the one passed-in. NOTE: A lot of this logic could be shared with the DRDA decryption and client encryption managers - This will be done _once_ code sharing along with its rules are defined between the Derby engine, client and network code (PENDING). Substitution algorithm works as follow: PW_TOKEN = SHA-1(PW, ID) The password (PW) and user name (ID) can be of any length greater than or equal to 1 byte. The client generates a 20-byte password substitute (PW_SUB) as follows: PW_SUB = SHA-1(PW_TOKEN, RDr, RDs, ID, PWSEQs) w/ (RDs) as the random client seed and (RDr) as the server one. See PWDSSB - Strong Password Substitution Security Mechanism (DRDA Vol.3 - P.650) a substituted password.



validate
public boolean validate(String key, Serializable value, Dictionary p)(Code)

See Also:   PropertySetCallback.validate



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.