Migrate outbound connections to SslStream

Problem

API Security currently makes use of a 3rdParty TLS stack Bouncy Castle. This choice was made due to limitations in the Microsoft SslStream at the time. Since them SslStream has added SNI support. The Microsoft implementation is desirable over Bouncy Castle for several reasons:

  1. Easier to use. Simplifies our code, with Bouncy Castle we wrote and maintain our version of SslStream.
  2. Faster. Implementation is optimized by Microsoft. Bouncy Castle is a port of the Java library.
  3. Improved compatibility. We have run into issues in the past with incompatibilities with our Bouncy Castle usage.

Proposal

  1. Replace usage of our TlsService and TlsClient with SslStream.
  2. Update related code to use Microsoft's certificate classes instead of Bouncy Castle's.
  3. Verify client cert authentication works.
  4. Verify tests all pass
  5. Update e2e tests to assert if error or critical log levels found in log output
  6. Release new container
Edited by Michael Eddington