Class AutoEncryptionOptions
- Namespace
- MongoDB.Driver.Encryption
- Assembly
- MongoDB.Driver.dll
Auto encryption options.
public class AutoEncryptionOptions
- Inheritance
-
AutoEncryptionOptions
- Inherited Members
Constructors
AutoEncryptionOptions(CollectionNamespace, IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>>, Optional<bool>, Optional<IReadOnlyDictionary<string, object>>, Optional<IMongoClient>, Optional<IReadOnlyDictionary<string, BsonDocument>>, Optional<IReadOnlyDictionary<string, SslSettings>>, Optional<IReadOnlyDictionary<string, BsonDocument>>, Optional<bool?>)
Initializes a new instance of the AutoEncryptionOptions class.
public AutoEncryptionOptions(CollectionNamespace keyVaultNamespace, IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>> kmsProviders, Optional<bool> bypassAutoEncryption = default, Optional<IReadOnlyDictionary<string, object>> extraOptions = default, Optional<IMongoClient> keyVaultClient = default, Optional<IReadOnlyDictionary<string, BsonDocument>> schemaMap = default, Optional<IReadOnlyDictionary<string, SslSettings>> tlsOptions = default, Optional<IReadOnlyDictionary<string, BsonDocument>> encryptedFieldsMap = default, Optional<bool?> bypassQueryAnalysis = default)
Parameters
keyVaultNamespaceCollectionNamespaceThe keyVault namespace.
kmsProvidersIReadOnlyDictionary<string, IReadOnlyDictionary<string, object>>The kms providers.
bypassAutoEncryptionOptional<bool>The bypass auto encryption flag.
extraOptionsOptional<IReadOnlyDictionary<string, object>>The extra options.
keyVaultClientOptional<IMongoClient>The keyVault client.
schemaMapOptional<IReadOnlyDictionary<string, BsonDocument>>The schema map.
tlsOptionsOptional<IReadOnlyDictionary<string, SslSettings>>The tls options.
encryptedFieldsMapOptional<IReadOnlyDictionary<string, BsonDocument>>The encryptedFields map.
bypassQueryAnalysisOptional<bool?>The bypass query analysis flag.
Properties
BypassAutoEncryption
Gets a value indicating whether to bypass automatic encryption.
public bool BypassAutoEncryption { get; }
Property Value
- bool
trueif automatic encryption should be bypasssed; otherwise,false.
BypassQueryAnalysis
Gets a value indicating whether to bypass query analysis.
public bool? BypassQueryAnalysis { get; }
Property Value
- bool?
EncryptedFieldsMap
Gets the encrypted fields map. Supplying an encryptedFieldsMap provides more security than relying on an encryptedFields obtained from the server. It protects against a malicious server advertising a false encryptedFields.
public IReadOnlyDictionary<string, BsonDocument> EncryptedFieldsMap { get; }
Property Value
ExtraOptions
Gets the extra options.
public IReadOnlyDictionary<string, object> ExtraOptions { get; }
Property Value
- IReadOnlyDictionary<string, object>
The extra options.
Remarks
All MongoClient objects in the same process should use the same setting for extraOptions.cryptSharedLibPath, as it is an error to load more that one crypt_shared dynamic library simultaneously in a single operating system process.
KeyVaultClient
Gets the key vault client.
public IMongoClient KeyVaultClient { get; }
Property Value
- IMongoClient
The key vault client.
KeyVaultNamespace
Gets the key vault namespace.
public CollectionNamespace KeyVaultNamespace { get; }
Property Value
- CollectionNamespace
The key vault namespace.
KmsProviders
Gets the KMS providers.
public IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>> KmsProviders { get; }
Property Value
- IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>>
The KMS providers.
SchemaMap
Gets the schema map.
public IReadOnlyDictionary<string, BsonDocument> SchemaMap { get; }
Property Value
- IReadOnlyDictionary<string, BsonDocument>
The schema map.
TlsOptions
Gets the tls options.
public IReadOnlyDictionary<string, SslSettings> TlsOptions { get; }
Property Value
- IReadOnlyDictionary<string, SslSettings>
The tls options.
Methods
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
With(Optional<CollectionNamespace>, Optional<IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>>>, Optional<bool>, Optional<bool?>, Optional<IReadOnlyDictionary<string, object>>, Optional<IMongoClient>, Optional<IReadOnlyDictionary<string, BsonDocument>>, Optional<IReadOnlyDictionary<string, SslSettings>>, Optional<IReadOnlyDictionary<string, BsonDocument>>)
Returns a new instance of the AutoEncryptionOptions class.
public AutoEncryptionOptions With(Optional<CollectionNamespace> keyVaultNamespace = default, Optional<IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>>> kmsProviders = default, Optional<bool> bypassAutoEncryption = default, Optional<bool?> bypassQueryAnalysis = default, Optional<IReadOnlyDictionary<string, object>> extraOptions = default, Optional<IMongoClient> keyVaultClient = default, Optional<IReadOnlyDictionary<string, BsonDocument>> schemaMap = default, Optional<IReadOnlyDictionary<string, SslSettings>> tlsOptions = default, Optional<IReadOnlyDictionary<string, BsonDocument>> encryptedFieldsMap = default)
Parameters
keyVaultNamespaceOptional<CollectionNamespace>The keyVault namespace.
kmsProvidersOptional<IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>>>The kms providers.
bypassAutoEncryptionOptional<bool>The bypass auto encryption flag.
bypassQueryAnalysisOptional<bool?>The bypass query analysis flag.
extraOptionsOptional<IReadOnlyDictionary<string, object>>The extra options.
keyVaultClientOptional<IMongoClient>The keyVault client.
schemaMapOptional<IReadOnlyDictionary<string, BsonDocument>>The schema map.
tlsOptionsOptional<IReadOnlyDictionary<string, SslSettings>>The tls options.
encryptedFieldsMapOptional<IReadOnlyDictionary<string, BsonDocument>>The encryptedFields map.
Returns
- AutoEncryptionOptions
A new instance of AutoEncryptionOptions.