-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Minor Change
-
Service Arch 2022-12-26, Service Arch 2023-01-09, Service Arch 2023-01-23, Service Arch 2023-02-06, Service Arch 2023-02-20
See design.
The SSL code cannot be completely sandboxed from Session without its own large design which would likely inflate the scope of this project. We are opting for a short-term alternative that minimizes the impact that SSL has on the Session API, while allowing for a future project to clean up the ASIOSession to have better separation of responsibilities.
The SSL-specific code is easily identifiable by searching for #ifdef MONGO_CONFIG_SSL throughout the code base. The three functions in the API and what we should do with them follows:
- getSSLManager
- Remove from the public interface. The only caller is a uassert checking whether SSL is enabled for the session.
- Worst case: this part of the public API is replaced by a simpler function: isSSLEnabled.
- Best case: the SSLManagerCoordinator is given the ability to lookup an SSL manager from a Session.
- getSSLConfiguration
- Remove this. It can be acquired through the SSLManager, which in the best case described above will be found through the SSLManagerCoordinator.
- getSniName
- Remove. Its only caller is Client::getSniNameForSession, which can be rewritten to get this information through other means.