Skip to content

Commit e69251d

Browse files
CSHARP-4193: Add [Beta] flags for public Queryable Encryption API. (#808)
1 parent 772a3f0 commit e69251d

File tree

7 files changed

+31
-23
lines changed

7 files changed

+31
-23
lines changed

src/MongoDB.Driver.Core/Core/Configuration/ClusterSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class ClusterSettings
5858
/// </summary>
5959
/// <param name="connectionMode">The connection mode.</param>
6060
/// <param name="connectionModeSwitch">The connection mode switch.</param>
61-
/// <param name="cryptClientSettings">Crypt client settings.</param>
61+
/// <param name="cryptClientSettings">[Beta] Crypt client settings.</param>
6262
/// <param name="directConnection">The directConnection.</param>
6363
/// <param name="endPoints">The end points.</param>
6464
/// <param name="loadBalanced">The load balanced.</param>
@@ -142,7 +142,7 @@ public ConnectionModeSwitch ConnectionModeSwitch
142142
}
143143

144144
/// <summary>
145-
/// Gets the crypt client settings.
145+
/// [Beta] Gets the crypt client settings.
146146
/// </summary>
147147
public CryptClientSettings CryptClientSettings
148148
{
@@ -286,7 +286,7 @@ public IServerSelector PostServerSelector
286286
/// </summary>
287287
/// <param name="connectionMode">The connection mode.</param>
288288
/// <param name="connectionModeSwitch">The connection mode switch.</param>
289-
/// <param name="cryptClientSettings">Crypt client settings.</param>
289+
/// <param name="cryptClientSettings">[Beta] Crypt client settings.</param>
290290
/// <param name="directConnection">The directConnection.</param>
291291
/// <param name="endPoints">The end points.</param>
292292
/// <param name="loadBalanced">The load balanced.</param>

src/MongoDB.Driver.Core/Core/Configuration/CryptClientSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace MongoDB.Driver.Core.Configuration
2121
{
2222
/// <summary>
23-
/// Represents settings for a crypt client.
23+
/// [Beta] Represents settings for a crypt client.
2424
/// </summary>
2525
public sealed class CryptClientSettings
2626
{

src/MongoDB.Driver/CreateCollectionOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public ChangeStreamPreAndPostImagesOptions ChangeStreamPreAndPostImagesOptions
8181
}
8282

8383
/// <summary>
84-
/// Gets or sets encrypted fields.
84+
/// [Beta] Gets or sets encrypted fields.
8585
/// </summary>
8686
public BsonDocument EncryptedFields
8787
{

src/MongoDB.Driver/DropCollectionOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class DropCollectionOptions
2525
private BsonDocument _encryptedFields;
2626

2727
/// <summary>
28-
/// Gets or sets encrypted fields.
28+
/// [Beta] Gets or sets encrypted fields.
2929
/// </summary>
3030
public BsonDocument EncryptedFields
3131
{

src/MongoDB.Driver/Encryption/AutoEncryptionOptions.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public class AutoEncryptionOptions
5454
/// <param name="keyVaultClient">The keyVault client.</param>
5555
/// <param name="schemaMap">The schema map.</param>
5656
/// <param name="tlsOptions">The tls options.</param>
57-
/// <param name="encryptedFieldsMap">The encryptedFields map.</param>
58-
/// <param name="bypassQueryAnalysis">The bypass query analysis flag.</param>
57+
/// <param name="encryptedFieldsMap">[Beta] The encryptedFields map.</param>
58+
/// <param name="bypassQueryAnalysis">[Beta] The bypass query analysis flag.</param>
5959
public AutoEncryptionOptions(
6060
CollectionNamespace keyVaultNamespace,
6161
IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>> kmsProviders,
@@ -93,12 +93,12 @@ public AutoEncryptionOptions(
9393
public bool BypassAutoEncryption => _bypassAutoEncryption;
9494

9595
/// <summary>
96-
/// Gets a value indicating whether to bypass query analysis.
96+
/// [Beta] Gets a value indicating whether to bypass query analysis.
9797
/// </summary>
9898
public bool? BypassQueryAnalysis => _bypassQueryAnalysis;
9999

100100
/// <summary>
101-
/// Gets the encrypted fields map.
101+
/// [Beta] Gets the encrypted fields map.
102102
/// 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.
103103
/// </summary>
104104
public IReadOnlyDictionary<string, BsonDocument> EncryptedFieldsMap => _encryptedFieldsMap;
@@ -109,6 +109,10 @@ public AutoEncryptionOptions(
109109
/// <value>
110110
/// The extra options.
111111
/// </value>
112+
/// <remarks>
113+
/// All MongoClient objects in the same process should use the same setting for extraOptions.cryptSharedLibPath,
114+
/// as it is an error to load more that one crypt_shared dynamic library simultaneously in a single operating system process.
115+
/// </remarks>
112116
public IReadOnlyDictionary<string, object> ExtraOptions => _extraOptions;
113117

114118
/// <summary>
@@ -157,12 +161,12 @@ public AutoEncryptionOptions(
157161
/// <param name="keyVaultNamespace">The keyVault namespace.</param>
158162
/// <param name="kmsProviders">The kms providers.</param>
159163
/// <param name="bypassAutoEncryption">The bypass auto encryption flag.</param>
160-
/// <param name="bypassQueryAnalysis">The bypass query analysis flag.</param>
164+
/// <param name="bypassQueryAnalysis">[Beta] The bypass query analysis flag.</param>
161165
/// <param name="extraOptions">The extra options.</param>
162166
/// <param name="keyVaultClient">The keyVault client.</param>
163167
/// <param name="schemaMap">The schema map.</param>
164168
/// <param name="tlsOptions">The tls options.</param>
165-
/// <param name="encryptedFieldsMap">The encryptedFields map.</param>
169+
/// <param name="encryptedFieldsMap">[Beta] The encryptedFields map.</param>
166170
/// <returns>A new instance of <see cref="AutoEncryptionOptions"/>.</returns>
167171
public AutoEncryptionOptions With(
168172
Optional<CollectionNamespace> keyVaultNamespace = default,

src/MongoDB.Driver/Encryption/EncryptOptions.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace MongoDB.Driver.Encryption
2020
{
2121
/// <summary>
22-
/// The QueryType to use for "Indexed" queries.
22+
/// [Beta] The QueryType to use for "Indexed" queries.
2323
/// </summary>
2424
public enum QueryType
2525
{
@@ -58,8 +58,8 @@ private static string ConvertEnumAlgorithmToString(EncryptionAlgorithm encryptio
5858
/// <param name="algorithm">The encryption algorithm.</param>
5959
/// <param name="alternateKeyName">The alternate key name.</param>
6060
/// <param name="keyId">The key Id.</param>
61-
/// <param name="contentionFactor">The contention factor.</param>
62-
/// <param name="queryType">The query type.</param>
61+
/// <param name="contentionFactor">[Beta] The contention factor.</param>
62+
/// <param name="queryType">[Beta] The query type.</param>
6363
public EncryptOptions(
6464
string algorithm,
6565
Optional<string> alternateKeyName = default,
@@ -90,8 +90,8 @@ public EncryptOptions(
9090
/// <param name="algorithm">The encryption algorithm.</param>
9191
/// <param name="alternateKeyName">The alternate key name.</param>
9292
/// <param name="keyId">The key Id.</param>
93-
/// <param name="contentionFactor">The contention factor.</param>
94-
/// <param name="queryType">The query type.</param>
93+
/// <param name="contentionFactor">[Beta] The contention factor.</param>
94+
/// <param name="queryType">[Beta] The query type.</param>
9595
public EncryptOptions(
9696
EncryptionAlgorithm algorithm,
9797
Optional<string> alternateKeyName = default,
@@ -125,7 +125,7 @@ public EncryptOptions(
125125
public string AlternateKeyName => _alternateKeyName;
126126

127127
/// <summary>
128-
/// Gets the contention factor.
128+
/// [Beta] Gets the contention factor.
129129
/// </summary>
130130
/// <value>
131131
/// The contention factor.
@@ -141,7 +141,7 @@ public EncryptOptions(
141141
public Guid? KeyId => _keyId;
142142

143143
/// <summary>
144-
/// Gets the query type.
144+
/// [Beta] Gets the query type.
145145
/// </summary>
146146
/// <value>
147147
/// The query type.
@@ -154,8 +154,8 @@ public EncryptOptions(
154154
/// <param name="algorithm">The encryption algorithm.</param>
155155
/// <param name="alternateKeyName">The alternate key name.</param>
156156
/// <param name="keyId">The keyId.</param>
157-
/// <param name="contentionFactor">The contention factor.</param>
158-
/// <param name="queryType">The query type.</param>
157+
/// <param name="contentionFactor">[Beta] The contention factor.</param>
158+
/// <param name="queryType">[Beta] The query type.</param>
159159
/// <returns>A new EncryptOptions instance.</returns>
160160
public EncryptOptions With(
161161
Optional<string> algorithm = default,

src/MongoDB.Driver/Encryption/EncryptionAlgorithm.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ public enum EncryptionAlgorithm
2929
/// </summary>
3030
AEAD_AES_256_CBC_HMAC_SHA_512_Random,
3131
/// <summary>
32-
/// Indexed algorithm.
32+
/// [Beta] Indexed algorithm.
3333
/// </summary>
34+
/// <remarks>
35+
/// To insert or query with an "Indexed" encrypted payload, use a MongoClient configured with AutoEncryptionOptions.
36+
/// AutoEncryptionOptions.BypassQueryAnalysis may be true. AutoEncryptionOptions.BypassAutoEncryption must be false.
37+
/// </remarks>
3438
Indexed,
3539
/// <summary>
36-
/// Unindexed algorithm.
40+
/// [Beta] Unindexed algorithm.
3741
/// </summary>
3842
Unindexed
3943
}

0 commit comments

Comments
 (0)