Java Doc for TlsConfiguration.java in  » ESB » mule » org » mule » api » security » tls » 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 » ESB » mule » org.mule.api.security.tls 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mule.api.security.tls.TlsConfiguration

TlsConfiguration
final public class TlsConfiguration implements TlsDirectTrustStore,TlsDirectKeyStore,TlsIndirectKeyStore,TlsProtocolHandler(Code)
Support for configuring TLS/SSL connections.

Introduction

This class was introduced to centralise the work of TLS/SSL configuration. It is intended to be backwards compatible with earlier code (as much as possible) and so is perhaps more complex than would be necessary if starting from zero - the main source of confusion is the distinction between direct and indirect creation of sockets and stores.

Configuration

The documentation in this class is intended more for programmers than end uses. If you are configuring a connector the interfaces org.mule.api.security.TlsIndirectTrustStore , TlsDirectTrustStore , TlsDirectKeyStore and TlsIndirectKeyStore should provide guidance to individual properties. In addition you should check the documentation for the specific protocol / connector used and may also need to read the discussion on direct and indirect socket and store creation below (or, more simply, just use whichever key store interface your connector implements!).

Programming

This class is intended to be used as a delegate as we typically want to add security to an already existing connector (so we inherit from that connector, implement the appropriate interfaces from org.mule.api.security.TlsIndirectTrustStore , TlsDirectTrustStore , TlsDirectKeyStore and TlsIndirectKeyStore , and then forward calls to the interfaces to an instance of this class).

For setting System properties (and reading them) use TlsPropertiesMapper . This can take a "namespace" which can then be used by TlsPropertiesSocketFactory to construct an appropriate socket factory. This approach (storing to proeprties and then retrieving that information later in a socket factory) lets us pass TLS/SSL configuration into libraries that are configured by specifying on the socket factory class.

Direct and Indirect Socket and Store Creation

For the SSL transport, which historically defined parameters for many different secure transports, the configuration interfaces worked as follows:

TlsDirectTrustStore
Used to generate trust store directly and indirectly for all TLS/SSL conections via System properties
TlsDirectKeyStore
Used to generate key store directly
TlsIndirectKeyStore
Used to generate key store indirectly for all TLS/SSL conections via System properties

Historically, many other transports relied on the indirect configurations defined above. So they implemented org.mule.api.security.TlsIndirectTrustStore (a superclass of TlsDirectTrustStore ) and relied on TlsIndirectKeyStore from the SSL configuration. For continuity these interfaces continue to be used, even though the configurations are now typically (see individual connector/protocol documentation) specific to a protocol or connector. Note - these interfaces are new, but the original code had those methods, used as described. The new interfaces only make things explicit.

Note for programmers One way to understand the above is to see that many protocols are handled by libraries that are configured by providing either properties or a socket factory. In both cases (the latter via TlsPropertiesSocketFactory ) we continue to use properties and the "indirect" interface. Note also that the mapping in TlsPropertiesMapper correctly handles the asymmetry, so an initial call to TlsConfiguration uses the keystore defined via TlsDirectKeyStore , but when a TlsConfiguration is retrieved from System proerties using TlsPropertiesMapper.readFromProperties(TlsConfigurationjava.util.Properties) the "indirect" properties are supplied as "direct" values, meaning that the "indirect" socket factory can be retrieved from TlsConfiguration.getKeyManagerFactory() . It just works.



Field Summary
final public static  StringDEFAULT_KEYSTORE
    
final public static  StringDEFAULT_KEYSTORE_TYPE
    
final public static  StringDEFAULT_SSL_TYPE
    
final public static  StringJSSE_NAMESPACE
    

Constructor Summary
public  TlsConfiguration(String keyStore)
    

Method Summary
public  StringgetClientKeyStore()
    
public  StringgetClientKeyStorePassword()
    
public  StringgetClientKeyStoreType()
    
public  StringgetKeyManagerAlgorithm()
    
public  KeyManagerFactorygetKeyManagerFactory()
    
public  StringgetKeyPassword()
    
public  StringgetKeyStore()
    
public  StringgetKeyStorePassword()
    
public  StringgetKeyStoreType()
    
public  StringgetProtocolHandler()
    
public  ProvidergetProvider()
    
public  SecurityProviderFactorygetSecurityProviderFactory()
    
public  SSLServerSocketFactorygetServerSocketFactory()
    
public  SSLSocketFactorygetSocketFactory()
    
public  SSLContextgetSslContext()
    
public  StringgetSslType()
    
public  StringgetTrustManagerAlgorithm()
    
public  TrustManagerFactorygetTrustManagerFactory()
    
public  StringgetTrustStore()
    
public  StringgetTrustStorePassword()
    
public  StringgetTrustStoreType()
    
public  voidinitialise(boolean anon, String namespace)
    
public  booleanisExplicitTrustStoreOnly()
    
public  booleanisRequireClientAuthentication()
    
public  voidsetClientKeyStore(String name)
    
public  voidsetClientKeyStorePassword(String clientKeyStorePassword)
    
public  voidsetClientKeyStoreType(String clientKeyStoreType)
    
public  voidsetExplicitTrustStoreOnly(boolean explicitTrustStoreOnly)
    
public  voidsetKeyManagerAlgorithm(String keyManagerAlgorithm)
    
public  voidsetKeyPassword(String keyPassword)
    
public  voidsetKeyStore(String name)
    
public  voidsetKeyStorePassword(String storePassword)
    
public  voidsetKeyStoreType(String keystoreType)
    
public  voidsetProtocolHandler(String protocolHandler)
    
public  voidsetProvider(Provider provider)
    
public  voidsetRequireClientAuthentication(boolean requireClientAuthentication)
    
public  voidsetSecurityProviderFactory(SecurityProviderFactory spFactory)
    
public  voidsetSslType(String sslType)
    
public  voidsetTrustManagerAlgorithm(String trustManagerAlgorithm)
    
public  voidsetTrustManagerFactory(TrustManagerFactory trustManagerFactory)
    
public  voidsetTrustStore(String name)
    
public  voidsetTrustStorePassword(String trustStorePassword)
    
public  voidsetTrustStoreType(String trustStoreType)
    

Field Detail
DEFAULT_KEYSTORE
final public static String DEFAULT_KEYSTORE(Code)



DEFAULT_KEYSTORE_TYPE
final public static String DEFAULT_KEYSTORE_TYPE(Code)



DEFAULT_SSL_TYPE
final public static String DEFAULT_SSL_TYPE(Code)



JSSE_NAMESPACE
final public static String JSSE_NAMESPACE(Code)




Constructor Detail
TlsConfiguration
public TlsConfiguration(String keyStore)(Code)
Support for TLS connections with a given initial value for the key store
Parameters:
  keyStore - initial value for the key store




Method Detail
getClientKeyStore
public String getClientKeyStore()(Code)



getClientKeyStorePassword
public String getClientKeyStorePassword()(Code)



getClientKeyStoreType
public String getClientKeyStoreType()(Code)



getKeyManagerAlgorithm
public String getKeyManagerAlgorithm()(Code)



getKeyManagerFactory
public KeyManagerFactory getKeyManagerFactory()(Code)



getKeyPassword
public String getKeyPassword()(Code)



getKeyStore
public String getKeyStore()(Code)



getKeyStorePassword
public String getKeyStorePassword()(Code)



getKeyStoreType
public String getKeyStoreType()(Code)



getProtocolHandler
public String getProtocolHandler()(Code)



getProvider
public Provider getProvider()(Code)



getSecurityProviderFactory
public SecurityProviderFactory getSecurityProviderFactory()(Code)



getServerSocketFactory
public SSLServerSocketFactory getServerSocketFactory() throws NoSuchAlgorithmException, KeyManagementException(Code)



getSocketFactory
public SSLSocketFactory getSocketFactory() throws NoSuchAlgorithmException, KeyManagementException(Code)



getSslContext
public SSLContext getSslContext() throws NoSuchAlgorithmException, KeyManagementException(Code)



getSslType
public String getSslType()(Code)



getTrustManagerAlgorithm
public String getTrustManagerAlgorithm()(Code)



getTrustManagerFactory
public TrustManagerFactory getTrustManagerFactory()(Code)



getTrustStore
public String getTrustStore()(Code)



getTrustStorePassword
public String getTrustStorePassword()(Code)



getTrustStoreType
public String getTrustStoreType()(Code)



initialise
public void initialise(boolean anon, String namespace) throws CreateException(Code)

Parameters:
  anon - If the connection is anonymous then we don't care about client keys
Parameters:
  namespace - Namespace to use for global properties (for JSSE use JSSE_NAMESPACE)
throws:
  CreateException - ON initialisation problems



isExplicitTrustStoreOnly
public boolean isExplicitTrustStoreOnly()(Code)



isRequireClientAuthentication
public boolean isRequireClientAuthentication()(Code)



setClientKeyStore
public void setClientKeyStore(String name) throws IOException(Code)



setClientKeyStorePassword
public void setClientKeyStorePassword(String clientKeyStorePassword)(Code)



setClientKeyStoreType
public void setClientKeyStoreType(String clientKeyStoreType)(Code)



setExplicitTrustStoreOnly
public void setExplicitTrustStoreOnly(boolean explicitTrustStoreOnly)(Code)



setKeyManagerAlgorithm
public void setKeyManagerAlgorithm(String keyManagerAlgorithm)(Code)



setKeyPassword
public void setKeyPassword(String keyPassword)(Code)



setKeyStore
public void setKeyStore(String name) throws IOException(Code)



setKeyStorePassword
public void setKeyStorePassword(String storePassword)(Code)



setKeyStoreType
public void setKeyStoreType(String keystoreType)(Code)



setProtocolHandler
public void setProtocolHandler(String protocolHandler)(Code)



setProvider
public void setProvider(Provider provider)(Code)



setRequireClientAuthentication
public void setRequireClientAuthentication(boolean requireClientAuthentication)(Code)



setSecurityProviderFactory
public void setSecurityProviderFactory(SecurityProviderFactory spFactory)(Code)



setSslType
public void setSslType(String sslType)(Code)



setTrustManagerAlgorithm
public void setTrustManagerAlgorithm(String trustManagerAlgorithm)(Code)



setTrustManagerFactory
public void setTrustManagerFactory(TrustManagerFactory trustManagerFactory)(Code)



setTrustStore
public void setTrustStore(String name) throws IOException(Code)



setTrustStorePassword
public void setTrustStorePassword(String trustStorePassword)(Code)



setTrustStoreType
public void setTrustStoreType(String trustStoreType)(Code)



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.