@@ -223,17 +223,19 @@ export interface AutoEncryptionOptions {
223
223
/** Configuration options that are used by specific KMS providers during key generation, encryption, and decryption. */
224
224
kmsProviders ?: {
225
225
/** Configuration options for using 'aws' as your KMS provider */
226
- aws ?: {
227
- /** The access key used for the AWS KMS provider */
228
- accessKeyId : string ;
229
- /** The secret access key used for the AWS KMS provider */
230
- secretAccessKey : string ;
231
- /**
232
- * An optional AWS session token that will be used as the
233
- * X-Amz-Security-Token header for AWS requests.
234
- */
235
- sessionToken ?: string ;
236
- } ;
226
+ aws ?:
227
+ | {
228
+ /** The access key used for the AWS KMS provider */
229
+ accessKeyId : string ;
230
+ /** The secret access key used for the AWS KMS provider */
231
+ secretAccessKey : string ;
232
+ /**
233
+ * An optional AWS session token that will be used as the
234
+ * X-Amz-Security-Token header for AWS requests.
235
+ */
236
+ sessionToken ?: string ;
237
+ }
238
+ | Record < string , never > ;
237
239
/** Configuration options for using 'local' as your KMS provider */
238
240
local ?: {
239
241
/**
@@ -243,33 +245,48 @@ export interface AutoEncryptionOptions {
243
245
key : Buffer | string ;
244
246
} ;
245
247
/** Configuration options for using 'azure' as your KMS provider */
246
- azure ?: {
247
- /** The tenant ID identifies the organization for the account */
248
- tenantId : string ;
249
- /** The client ID to authenticate a registered application */
250
- clientId : string ;
251
- /** The client secret to authenticate a registered application */
252
- clientSecret : string ;
253
- /**
254
- * If present, a host with optional port. E.g. "example.com" or "example.com:443".
255
- * This is optional, and only needed if customer is using a non-commercial Azure instance
256
- * (e.g. a government or China account, which use different URLs).
257
- * Defaults to "login.microsoftonline.com"
258
- */
259
- identityPlatformEndpoint ?: string | undefined ;
260
- } ;
248
+ azure ?:
249
+ | {
250
+ /** The tenant ID identifies the organization for the account */
251
+ tenantId : string ;
252
+ /** The client ID to authenticate a registered application */
253
+ clientId : string ;
254
+ /** The client secret to authenticate a registered application */
255
+ clientSecret : string ;
256
+ /**
257
+ * If present, a host with optional port. E.g. "example.com" or "example.com:443".
258
+ * This is optional, and only needed if customer is using a non-commercial Azure instance
259
+ * (e.g. a government or China account, which use different URLs).
260
+ * Defaults to "login.microsoftonline.com"
261
+ */
262
+ identityPlatformEndpoint ?: string | undefined ;
263
+ }
264
+ | {
265
+ /**
266
+ * If present, an access token to authenticate with Azure.
267
+ */
268
+ accessToken : string ;
269
+ } ;
261
270
/** Configuration options for using 'gcp' as your KMS provider */
262
- gcp ?: {
263
- /** The service account email to authenticate */
264
- email : string ;
265
- /** A PKCS#8 encrypted key. This can either be a base64 string or a binary representation */
266
- privateKey : string | Buffer ;
267
- /**
268
- * If present, a host with optional port. E.g. "example.com" or "example.com:443".
269
- * Defaults to "oauth2.googleapis.com"
270
- */
271
- endpoint ?: string | undefined ;
272
- } ;
271
+ gcp ?:
272
+ | {
273
+ /** The service account email to authenticate */
274
+ email : string ;
275
+ /** A PKCS#8 encrypted key. This can either be a base64 string or a binary representation */
276
+ privateKey : string | Buffer ;
277
+ /**
278
+ * If present, a host with optional port. E.g. "example.com" or "example.com:443".
279
+ * Defaults to "oauth2.googleapis.com"
280
+ */
281
+ endpoint ?: string | undefined ;
282
+ }
283
+ | {
284
+ /**
285
+ * If present, an access token to authenticate with GCP.
286
+ */
287
+ accessToken : string ;
288
+ }
289
+ | Record < string , never > ;
273
290
/**
274
291
* Configuration options for using 'kmip' as your KMS provider
275
292
*/
0 commit comments