Interface IKmsConnector
- Namespace
- MongoDB.Driver.Encryption
- Assembly
- MongoDB.Driver.dll
Opens the transport connection used to reach a KMS host. When supplied via
ClientEncryptionOptions.SetKmsConnector or SetKmsConnector(IKmsConnector),
the driver invokes this instead of opening a direct TCP connection to the KMS host, then wraps the
returned stream in TLS using the KMS provider's configured TLS options.
The primary use case is routing KMS traffic through an HTTP proxy via HTTPS CONNECT.
public interface IKmsConnector
Remarks
Both Connect(KmsConnectionContext, CancellationToken) and ConnectAsync(KmsConnectionContext, CancellationToken) must be implemented, even if the application only uses one of the driver's sync or async encryption APIs: the driver calls whichever method matches the API used for the operation in progress. An implementation that only supports one direction can have the other throw.
Methods
- Connect(KmsConnectionContext, CancellationToken)
Opens a connection to the specified KMS host.
- ConnectAsync(KmsConnectionContext, CancellationToken)
Opens a connection to the specified KMS host.