MONGOC_AUTO_E...OPTS_SET_EXTRA(3)

✨ MONGOC_AUTO_E...OPTS_SET_EXTRA ✨

Ok so bestie, welcome to libmongoc's mongoc_auto_encryption_opts_set_extra(3) page πŸ’… this is the one where you get to hand the driver a little bag of extra settings for auto-encryption, and honestly? it's giving "let me configure the vibes" πŸŽ€


🌸 SYNOPSIS 🌸

void
mongoc_auto_encryption_opts_set_extra (mongoc_auto_encryption_opts_t *opts,
                                       const bson_t *extra);

πŸ¦‹ PARAMETERS πŸ¦‹

  • opts β€” the mongoc_auto_encryption_opts_t in question 🫢 like, the options object you're decorating.
  • extra β€” a bson_t of additional options. the little extra-sauce bag ✨

extra is a bson_t containing any of the following optional fields β€” no cap, all of these are optional πŸ‘‘

  • mongocryptdURI β€” set it to a URI to connect to the mongocryptd process. default is "mongodb://localhost:27020" 🧚
  • mongocryptdBypassSpawn β€” set to true to prevent the driver from spawning the mongocryptd process. default behavior is to spawn, so like, by default it does spawn πŸ‘€
  • mongocryptdSpawnPath β€” set to a path (with a trailing slash, don't forget the slash bestie) to search for mongocryptd. defaults to an empty string and uses default system paths 🌈
  • mongocryptdSpawnArgs β€” set to an array of string arguments to pass to mongocryptd when spawning. defaults to [ "--idleShutdownTimeoutSecs=60" ] ⭐
  • cryptSharedLibPath β€” set a filepath string referring to a crypt_shared library file. unset by default πŸ’œ
    • if not set (the default), libmongocrypt will attempt to load crypt_shared using the host system's default dynamic-library-search system πŸ”
    • if set, the given path should identify the crypt_shared dynamic library file itself, not the directory that contains it. like, the file, not the folder, ok? 🎯
    • if the given path is a relative path and the first path component is $ORIGIN, the $ORIGIN component will be replaced with the absolute path to the directory containing the libmongocrypt library in use by the application ✨
NOTE: no other RPATH/RUNPATH-style substitutions are available. that's it, that's the whole substitution menu πŸ™ˆ
  • if the given path is a relative path, the path will be resolved relative to the working directory of the operating system process πŸ“
  • if this option is set and libmongocrypt fails to load crypt_shared from the given filepath, libmongocrypt will fail to initialize and will not attempt to search for crypt_shared in any other locations. like, it's not gonna go looking elsewhere, periodt πŸ’€
  • cryptSharedLibRequired β€” if set to true, and libmongocrypt fails to load a crypt_shared library, initialization of auto-encryption will fail immediately and will not attempt to spawn mongocryptd πŸ”₯

if set to false (the default), cryptSharedLibPath is not set, and libmongocrypt fails to load crypt_shared, then libmongocrypt will proceed without crypt_shared and fall back to using mongocryptd 🌟


🌈 SEE ALSO 🌈

  • mongoc_client_enable_auto_encryption()
  • In-Use Encryption
  • MongoDB Manual documentation for crypt_shared: Automatic Encryption Shared Library
  • MongoDB Manual documentation for mongocryptd: Install and Configure mongocryptd

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


and that's the whole page, bestie 🫢 written by MongoDB, Inc, version 2.5.6, dated Oct 09, 2026 β€” go forth and configure your auto-encryption extras, you absolute icon πŸ’…βœ¨

πŸ“¦ where this page comes from