Task #6842
Bug #6786: d1_libclient_java should support Session parameters
Task #6788: refactor how the Multipart*Nodes get their rest client
expose the session information in CertificateManager
100%
Description
The motivation is that MultipartD1Nodes have a default MultipartRestClient set at construction, and a Session with no certificate information is passed in on the method parameters, making it difficult to compare the two when time to choose. Underlying HttpClients don't expose what certificate they are configured with, too.
Try the X509Session idea - a Session subclass that contains certificate information
Associated revisions
Refs #6788, #6786, #6842: Refactored MultipartD1Node (constructors and added getRestClient(Session s) method to provide a standard way for API methods to decide between Sessions passed via the method vs. in the constructor. Added new X509Session class, and restructured HttpMultipartRestClient and HttpUtils to work with new X509Session objects and allow removal of DefaultHttpMultipartRestClient.
Refs #6788, #6786, #6842: Refactored MultipartD1Node (constructors and added getRestClient(Session s) method to provide a standard way for API methods to decide between Sessions passed via the method vs. in the constructor. Added new X509Session class, and restructured HttpMultipartRestClient and HttpUtils to work with new X509Session objects and allow removal of DefaultHttpMultipartRestClient.
History
#1 Updated by Rob Nahf almost 10 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- translation missing: en.field_remaining_hours set to 0
Created the X509Session object to hold both the certificate / key objects, as well as Session information. Also ended up adding HttpClient and MultipartRestClient properties to it to allow to already-built heavyweight constructs to be passed in on the method Session. The strategy is to use instanceof and property checks to check if any heavyweight constructs need to be built or not.
CertificateManager getSSLConnectionSocketFactory method used to do 3-4 distinct tasks, so I atomized these tasks into helper methods, the first of which is selectSession and returns the X509Session. Exposing the X509Session as a return gives users the opportunity to have access to the Session extracted from the certificate, as well as the certificate itself (to give access to expiration info).