ISSUE SUMMARY
Applications may be unable to reuse a session to a MongoDB instance when using a driver which uses TLS session tickets.
Currently, the C# driver is the only driver known to produce this issue.
Connection attempts meeting the following criteria may encounter this issue:
- The connection is secured with SSL
- The connection is closed and reopened using a TLS session ticket
- The server must have been started with --sslCAFile
USER IMPACT
Attempting to reopen connections secured with SSL using an affected driver may result in the server closing the socket and emitting an error to its logs resembling the following message:
ERROR: error:140D9115:SSL routines:SSL_GET_PREV_SESSION:session id context uninitialized
WORKAROUNDS
Disable the use of TLS session tickets in your driver. For the C# driver on Windows, set the ClientCacheTime registry key to 0. Note that this is a global setting which will affect all programs running on the machine. There are no known workarounds for other software environments.
AFFECTED VERSIONS
MongoDB production releases between 2.4.7 and 2.6.7, inclusive, are affected.
FIX VERSION
The fix is included in the 2.6.8 production release.
RESOLUTION DETAILS
OpenSSL requires an SSL session id context in order to perform peer validation when re-establishing a session,
whether from the session cache, or from a TLS session ticket. Because MongoDB disabled the session cache in
2.4.7 and unset the session id context, clients attempting to restore a session from a ticket would cause OpenSSL
to fail. To fix this, the SSL session cache has been re-enabled, and the session id context is saved.
Original description
Something in Windows SChannel doesn't respect the no SSL Session Caching change made in SERVER-10261. This breaks any MongoDB driver on Windows that uses SChannel.
The currently available workaround is to set the ClientCacheTime registry key to 0 to disable caching, however this is a system wide change which could have unforeseen consequences in a server environment.
- is related to
-
SERVER-10261 Disable SSL session caching on server to avoid Java driver SSL connection problems
- Closed
-
SERVER-11612 Java driver problems with SSL session caching
- Closed