diff --git a/.gitignore b/.gitignore index 428ce8209ec..bacaafa8b3b 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,6 @@ source/includes/toc/ source/includes/table/ source/includes/steps/ source/includes/generated/includes-overview.rst -source/includes/generated/ source/includes/option/ source/includes/changelogs/*.rst !source/includes/changelogs/releases/*.rst diff --git a/config/redirects b/config/redirects index 5f80a921a1b..6865ae18e0c 100644 --- a/config/redirects +++ b/config/redirects @@ -1,10 +1,12 @@ define: prefix docs define: base https://www.mongodb.com/${prefix} define: versions v2.2 v2.4 v2.6 v3.0 v3.2 v3.4 v3.6 v4.0 v4.2 v4.4 v5.0 v5.1 v5.2 v5.3 v6.0 master -symlink: manual -> v5.0 -symlink: stable -> v5.0 -symlink: rapid -> v5.2 -symlink: upcoming -> master +symlink: master -> v6.0 +symlink: stable -> v6.0 +symlink: rapid -> v6.0 +symlink: current -> v6.0 +symlink: upcoming -> v6.0 +symlink: manual -> v6.0 [v2.2]: ${prefix}/${version}/core/read-operations-introduction -> ${base}/${version}/core/read-operations/ [v2.2]: ${prefix}/${version}/core/write-operations-introduction -> ${base}/${version}/core/write-operations/ diff --git a/snooty.toml b/snooty.toml index 0c424d20480..6d14a6f2dac 100644 --- a/snooty.toml +++ b/snooty.toml @@ -102,6 +102,7 @@ toc_landing_pages = [ "/mongo", "/reference/aggregation", "/reference/bson-types", + "/reference/change-events", "/reference/collation", "/reference/command", "/reference/command/nav-administration", @@ -148,7 +149,7 @@ toc_landing_pages = [ "/reference/operator/query-logical", "/reference/operator/query-miscellaneous", "/reference/operator/query-modifiers", - "/reference/operator/query-projection", + "/reference/operator/projection", "/reference/operator/query", "/reference/operator/update-array", "/reference/operator/update-bitwise", @@ -262,9 +263,9 @@ kmip-hover = ":abbr:`KMIP (Key Management Interoperability Protocol)`" kmip-kms-no-hover = "KMIP-compliant Key Management System" kmip-kms = "{+kmip-hover+}-compliant {+kms-abbr+}" csfle-code-snippets-gen-keys = "https://github.com/mongodb/docs/tree/master/source/includes/quick-start/generate-master-key" -libmongocrypt-version = "1.4" -sample-app-url-csfle = "https://github.com/mongodb/docs/tree/master/source/includes/sample_apps/csfle/build/" -sample-app-url-qe = "https://github.com/mongodb/docs/tree/master/source/includes/sample_apps/csfle/build/" +libmongocrypt-version = "1.5" +sample-app-url-csfle = "https://github.com/mongodb-university/docs-in-use-encryption-examples/tree/main/csfle" +sample-app-url-qe = "https://github.com/mongodb-university/docs-in-use-encryption-examples/tree/main/queryable-encryption" qe = "Queryable Encryption" qe-abbr = ":abbr:`QE (Queryable Encryption)`" enc-fields-map = "encrypted fields map" diff --git a/source/changeStreams.txt b/source/changeStreams.txt index a6a921d9708..61841041ec9 100644 --- a/source/changeStreams.txt +++ b/source/changeStreams.txt @@ -508,6 +508,7 @@ upper-right to set the language of the examples on this page. See :ref:`change-stream-output` for more information on the change stream response document format. +.. _change-streams-updateLookup: Lookup Full Document for Update Operations ------------------------------------------ @@ -1064,30 +1065,6 @@ Change Streams with Document Pre- and Post-Images For complete examples with the change stream output, see :ref:`db.collection.watch-change-streams-pre-and-post-images-example`. -.. _change-streams-expanded-events: - -Expanded Events ---------------- - -.. versionadded:: 6.0 - -Starting in MongoDB 6.0, change streams support change notifications for DDL -events, like the :ref:`createIndexes ` and -:ref:`dropIndexes `. To include expanded -events in a change stream, create the change stream cursor using the -``showExpandedEvents`` option. - -For example: - -.. code-block:: javascript - - let cur = db.names.aggregate( [ - $changeStream: { - showExpandedEvents: true - } - ] ) - - cur.next() .. toctree:: :titlesonly: diff --git a/source/core/auditing.txt b/source/core/auditing.txt index afab20bce93..980cbc86ff1 100644 --- a/source/core/auditing.txt +++ b/source/core/auditing.txt @@ -82,12 +82,18 @@ including the entry for the operation. These auditing guarantees require that MongoDB run with :setting:`journaling ` enabled. -.. warning:: MongoDB may lose events **if** the server terminates - before it commits the events to the audit log. The client may - receive confirmation of the event before MongoDB commits to the - audit log. For example, while auditing an aggregation operation, the - server might crash after returning the result but before the audit - log flushes. +.. warning:: + + MongoDB may lose events **if** the server terminates before it + commits the events to the audit log. The client may receive + confirmation of the event before MongoDB commits to the audit log. + For example, while auditing an aggregation operation, the server + might terminate after returning the result but before the audit log + flushes. + + In addition, if the server cannot write to the audit log at the + :option:`audit destination `, the server + will terminate. .. [#filter] Audit configuration can include a :ref:`filter ` to limit events to audit. diff --git a/source/core/csfle/fundamentals/manage-keys.txt b/source/core/csfle/fundamentals/manage-keys.txt index e26e9492514..ef1870c691f 100644 --- a/source/core/csfle/fundamentals/manage-keys.txt +++ b/source/core/csfle/fundamentals/manage-keys.txt @@ -235,7 +235,6 @@ alternate name ``my-alt-name``. Dynamically Assign Keys at Runtime `````````````````````````````````` - You can use alternate key names to dynamically set the {+dek-long+} for a field at runtime. Use this functionality to encrypt individual documents with different {+dek-long+}s using the same encryption schema. @@ -267,67 +266,6 @@ uniquely encrypted using {+dek-long+}s specific to the individual document. The keys are assigned dynamically at runtime. .. _csfle_fundamentals_rotate_keys: - -Rotate Encryption Keys ----------------------- - -Key rotation is the process of retiring an existing encryption key and replacing -it with a new one. Regularly rotating encryption keys is considered a best practice. - -Rotate a {+cmk-long+} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To rotate a {+cmk-long+} (CMK), you must perform the following actions: - -#. Decrypt all data using the {+dek-long+}s encrypted with your - previous CMK. - To learn more about decrypting your data, see :ref:`csfle-fundamentals-manual-encryption-manual-decryption`. -#. Create a new CMK. -#. Create new {+dek-long+}s using the new CMK. -#. Encrypt your data with the new {+dek-long+}s that were created with your - new CMK. - -.. warning:: Don't Delete Keys Until the Rotation is Complete - - Ensure you keep both your previous and new CMKs and - {+dek-long+}s until the rotation is complete. If you delete your - previous CMK before the rotation is complete, you will lose - all data with {+dek-long+}s that are still encrypted with your previous CMK. - If you delete a previous {+dek-long+} before your rotation is complete, - you risk losing data still encrypted with that {+dek-long+}. - -.. warning:: Switching from locally-managed master key to a remote KMS - - Before you switch from a locally-managed master key to a remote KMS, - you must decrypt all documents containing field-encrypted data. - Your existing data encryption keys can only be decrypted with the original - locally-managed master key and not the CMK that the KMS generates. - - Failure to decrypt all data at this stage may cause permanent and - unrecoverable data loss. - -``mongosh`` provides a helper method to rotate your CMKs. To learn more, see -:ref:`csfle-rotate-keys-mongo-shell`. - -Rotate a {+dek-long+} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To rotate a {+dek-long+} (DEK), you must perform the following actions: - -#. Decrypt all data encrypted with that DEK. - To learn more about decrypting your data, see :ref:`csfle-fundamentals-manual-encryption-manual-decryption`. -#. Create a new DEK. -#. Encrypt your decrypted data with the new DEK. - -.. warning:: Don't Delete Keys Until the Rotation is Complete - - Ensure you keep both your previous and new DEK until the rotation - is complete. If you delete your previous DEK before the rotation - is complete, you will lose all data still encrypted with that DEK. - -``mongosh`` provides a helper method to rotate your DEKs. To learn more, see -:ref:`csfle-rotate-keys-mongo-shell`. - .. _csfle-rotate-keys-mongo-shell: Procedure: Rotate Encryption Keys Using Mongo Shell diff --git a/source/core/csfle/quick-start.txt b/source/core/csfle/quick-start.txt index 8efa1820686..9073cb69ab6 100644 --- a/source/core/csfle/quick-start.txt +++ b/source/core/csfle/quick-start.txt @@ -58,27 +58,27 @@ Before You Get Started .. tab:: Java :tabid: java-sync - `Complete Java Application <{+sample-app-url-csfle+}java/local/reader/>`__ + `Complete Java Application <{+sample-app-url-csfle+}/java/local/reader/>`__ .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-csfle+}node/local/reader/>`__ + `Complete Node.js Application <{+sample-app-url-csfle+}/node/local/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-csfle+}python/local/reader/>`__ + `Complete Python Application <{+sample-app-url-csfle+}/python/local/reader/>`__ .. tab:: C# :tabid: csharp - `Complete C# Application <{+sample-app-url-csfle+}dotnet/local/reader/CSFLE/>`__ + `Complete C# Application <{+sample-app-url-csfle+}/dotnet/local/reader/CSFLE/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-csfle+}go/local/reader/>`__ + `Complete Go Application <{+sample-app-url-csfle+}/go/local/reader/>`__ .. tabs-selector:: drivers @@ -112,31 +112,31 @@ Procedure :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}node/local/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/local/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}python/local/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/local/reader/make_data_key.py>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}dotnet/local/reader/CSFLE/MakeDataKey.cs>`__. + `our Github repository <{+sample-app-url-csfle+}/dotnet/local/reader/CSFLE/MakeDataKey.cs>`__. .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}go/local/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/local/reader/make-data-key.go>`__. .. step:: Configure the MongoClient @@ -154,31 +154,31 @@ Procedure :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/local/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/local/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/local/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/local/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/local/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/local/reader/insert-encrypted-document.go>`__. .. step:: Retrieve Your Encrypted Document @@ -192,31 +192,31 @@ Procedure :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/local/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/local/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/local/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/local/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/local/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/local/reader/insert-encrypted-document.go>`__. Learn More diff --git a/source/core/csfle/reference/compatibility.txt b/source/core/csfle/reference/compatibility.txt index e84e8a5db0e..0a01b76e0ef 100644 --- a/source/core/csfle/reference/compatibility.txt +++ b/source/core/csfle/reference/compatibility.txt @@ -78,5 +78,24 @@ versions or later: - ``2.12.1+`` - `Ruby Driver Quickstart `__ +.. _csfle-reference-compatability-key-rotation: + +.. important:: Key Rotation Support + + To use the key rotation API of {+csfle-abbrev+}, such as the + ``rewrapManyDateKey`` method, you must use specific versions + of either your driver's binding package or ``libmongocrypt``. + + The following list details each driver's key rotation API + dependencies: + + - Node.js Driver: Use ``mongodb-client-encryption`` + version 2.2.0-alpha.6 or later. + - Java Driver: Use ``mongodb-crypt`` version 1.5.2 or later. + - pymongo: Use ``pymongocrypt`` version 1.3.1 or later. + - Go Driver: Use ``libmongocrypt`` version 1.5.2 or later. + - C#/.NET Driver: Use the MongoDB C#/.NET Driver version 2.17.1 or later. + Please refer to the driver reference documentation for syntax and implementation examples. + diff --git a/source/core/csfle/tutorials.txt b/source/core/csfle/tutorials.txt index 3a0c74c5b80..b2471b81a3b 100644 --- a/source/core/csfle/tutorials.txt +++ b/source/core/csfle/tutorials.txt @@ -38,29 +38,29 @@ access to all sample applications. - Code Samples for Specific {+kms-long+} Providers * - Python - - `AWS <{+sample-app-url-csfle+}python/aws/reader/>`__ - | `Azure <{+sample-app-url-csfle+}python/azure/reader/>`__ - | `GCP <{+sample-app-url-csfle+}python/gcp/reader/>`__ + - `AWS <{+sample-app-url-csfle+}/python/aws/reader/>`__ + | `Azure <{+sample-app-url-csfle+}/python/azure/reader/>`__ + | `GCP <{+sample-app-url-csfle+}/python/gcp/reader/>`__ * - Node - - `AWS <{+sample-app-url-csfle+}node/aws/reader/>`__ - | `Azure <{+sample-app-url-csfle+}node/azure/reader/>`__ - | `GCP <{+sample-app-url-csfle+}node/gcp/reader/>`__ + - `AWS <{+sample-app-url-csfle+}/node/aws/reader/>`__ + | `Azure <{+sample-app-url-csfle+}/node/azure/reader/>`__ + | `GCP <{+sample-app-url-csfle+}/node/gcp/reader/>`__ * - Java - - `AWS <{+sample-app-url-csfle+}java/aws/reader/>`__ - | `Azure <{+sample-app-url-csfle+}java/azure/reader/>`__ - | `GCP <{+sample-app-url-csfle+}java/gcp/reader/>`__ + - `AWS <{+sample-app-url-csfle+}/java/aws/reader/>`__ + | `Azure <{+sample-app-url-csfle+}/java/azure/reader/>`__ + | `GCP <{+sample-app-url-csfle+}/java/gcp/reader/>`__ * - Go - - `AWS <{+sample-app-url-csfle+}go/aws/reader/>`__ - | `Azure <{+sample-app-url-csfle+}go/azure/reader/>`__ - | `GCP <{+sample-app-url-csfle+}go/gcp/reader/>`__ + - `AWS <{+sample-app-url-csfle+}/go/aws/reader/>`__ + | `Azure <{+sample-app-url-csfle+}/go/azure/reader/>`__ + | `GCP <{+sample-app-url-csfle+}/go/gcp/reader/>`__ * - Dotnet - - `AWS <{+sample-app-url-csfle+}dotnet/aws/reader/>`__ - | `Azure <{+sample-app-url-csfle+}dotnet/azure/reader/>`__ - | `GCP <{+sample-app-url-csfle+}dotnet/gcp/reader/>`__ + - `AWS <{+sample-app-url-csfle+}/dotnet/aws/reader/>`__ + | `Azure <{+sample-app-url-csfle+}/dotnet/azure/reader/>`__ + | `GCP <{+sample-app-url-csfle+}/dotnet/gcp/reader/>`__ .. toctree:: :titlesonly: diff --git a/source/core/csfle/tutorials/aws/aws-automatic.txt b/source/core/csfle/tutorials/aws/aws-automatic.txt index 9119f422e72..34512e779d9 100644 --- a/source/core/csfle/tutorials/aws/aws-automatic.txt +++ b/source/core/csfle/tutorials/aws/aws-automatic.txt @@ -44,27 +44,27 @@ Before You Get Started .. tab:: Java :tabid: java-sync - `Complete Java Application <{+sample-app-url-csfle+}java/aws/reader/>`__ + `Complete Java Application <{+sample-app-url-csfle+}/java/aws/reader/>`__ .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-csfle+}node/aws/reader/>`__ + `Complete Node.js Application <{+sample-app-url-csfle+}/node/aws/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-csfle+}python/aws/reader/>`__ + `Complete Python Application <{+sample-app-url-csfle+}/python/aws/reader/>`__ .. tab:: C# :tabid: csharp - `Complete C# Application <{+sample-app-url-csfle+}dotnet/aws/reader/CSFLE/>`__ + `Complete C# Application <{+sample-app-url-csfle+}/dotnet/aws/reader/CSFLE/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-csfle+}go/aws/reader/>`__ + `Complete Go Application <{+sample-app-url-csfle+}/go/aws/reader/>`__ .. tabs-selector:: drivers @@ -107,31 +107,31 @@ Create the Application :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}node/aws/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/aws/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}python/aws/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/aws/reader/make_data_key.py>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}dotnet/aws/reader/CSFLE/MakeDataKey.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/aws/reader/CSFLE/MakeDataKey.cs>`__ .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}go/aws/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/aws/reader/make-data-key.go>`__. .. step:: Configure the MongoClient @@ -149,31 +149,31 @@ Create the Application :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/aws/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/aws/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/aws/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/aws/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/aws/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/aws/reader/insert-encrypted-document.go>`__. .. step:: Retrieve Your Encrypted Document @@ -187,31 +187,31 @@ Create the Application :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/aws/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/aws/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/aws/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/aws/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/aws/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/aws/reader/insert-encrypted-document.go>`__. Learn More diff --git a/source/core/csfle/tutorials/azure/azure-automatic.txt b/source/core/csfle/tutorials/azure/azure-automatic.txt index ed749dbcfb6..5c34d248947 100644 --- a/source/core/csfle/tutorials/azure/azure-automatic.txt +++ b/source/core/csfle/tutorials/azure/azure-automatic.txt @@ -43,27 +43,27 @@ Before You Get Started .. tab:: Java :tabid: java-sync - `Complete Java Application <{+sample-app-url-csfle+}java/azure/reader/>`__ + `Complete Java Application <{+sample-app-url-csfle+}/java/azure/reader/>`__ .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-csfle+}node/azure/reader/>`__ + `Complete Node.js Application <{+sample-app-url-csfle+}/node/azure/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-csfle+}python/azure/reader/>`__ + `Complete Python Application <{+sample-app-url-csfle+}/python/azure/reader/>`__ .. tab:: C# :tabid: csharp - `Complete C# Application <{+sample-app-url-csfle+}dotnet/azure/reader/CSFLE/>`__ + `Complete C# Application <{+sample-app-url-csfle+}/dotnet/azure/reader/CSFLE/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-csfle+}go/azure/reader/>`__ + `Complete Go Application <{+sample-app-url-csfle+}/go/azure/reader/>`__ .. tabs-selector:: drivers @@ -105,31 +105,31 @@ Create the Application :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}node/azure/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/azure/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}python/azure/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/azure/reader/make_data_key.py>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}dotnet/azure/reader/CSFLE/MakeDataKey.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/azure/reader/CSFLE/MakeDataKey.cs>`__ .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}go/azure/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/azure/reader/make-data-key.go>`__. .. step:: Configure the MongoClient @@ -147,31 +147,31 @@ Create the Application :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/azure/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/azure/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/azure/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/azure/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/azure/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/azure/reader/insert-encrypted-document.go>`__. .. step:: Retrieve Your Encrypted Document @@ -185,31 +185,31 @@ Create the Application :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/azure/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/azure/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/azure/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/azure/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/azure/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/azure/reader/insert-encrypted-document.go>`__. Learn More diff --git a/source/core/csfle/tutorials/gcp/gcp-automatic.txt b/source/core/csfle/tutorials/gcp/gcp-automatic.txt index f78b39dfe33..6c3ef5a475f 100644 --- a/source/core/csfle/tutorials/gcp/gcp-automatic.txt +++ b/source/core/csfle/tutorials/gcp/gcp-automatic.txt @@ -42,27 +42,27 @@ Before You Get Started .. tab:: Java :tabid: java-sync - `Complete Java Application <{+sample-app-url-csfle+}java/gcp/reader/>`__ + `Complete Java Application <{+sample-app-url-csfle+}/java/gcp/reader/>`__ .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-csfle+}node/gcp/reader/>`__ + `Complete Node.js Application <{+sample-app-url-csfle+}/node/gcp/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-csfle+}python/gcp/reader/>`__ + `Complete Python Application <{+sample-app-url-csfle+}/python/gcp/reader/>`__ .. tab:: C# :tabid: csharp - `Complete C# Application <{+sample-app-url-csfle+}dotnet/gcp/reader/CSFLE/>`__ + `Complete C# Application <{+sample-app-url-csfle+}/dotnet/gcp/reader/CSFLE/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-csfle+}go/gcp/reader/>`__ + `Complete Go Application <{+sample-app-url-csfle+}/go/gcp/reader/>`__ .. tabs-selector:: drivers @@ -108,31 +108,31 @@ your application to see relevant code samples. :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}node/gcp/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/gcp/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}python/gcp/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/gcp/reader/make_data_key.py>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}dotnet/gcp/reader/CSFLE/MakeDataKey.cs>`__. + `our Github repository <{+sample-app-url-csfle+}/dotnet/gcp/reader/CSFLE/MakeDataKey.cs>`__. .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-csfle+}go/gcp/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/gcp/reader/make-data-key.go>`__. .. step:: Configure the MongoClient @@ -150,31 +150,31 @@ your application to see relevant code samples. :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/gcp/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/gcp/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/gcp/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/gcp/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/gcp/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/gcp/reader/insert-encrypted-document.go>`__. .. step:: Retrieve Your Encrypted Document @@ -188,31 +188,31 @@ your application to see relevant code samples. :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-csfle+}/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}node/gcp/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-csfle+}/node/gcp/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}python/gcp/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-csfle+}/python/gcp/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs>`__ + `our Github repository <{+sample-app-url-csfle+}/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs>`__ .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-csfle+}go/gcp/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-csfle+}/go/gcp/reader/insert-encrypted-document.go>`__. Learn More diff --git a/source/core/index-hidden.txt b/source/core/index-hidden.txt index fc8f13df4f3..0556a28167d 100644 --- a/source/core/index-hidden.txt +++ b/source/core/index-hidden.txt @@ -121,6 +121,8 @@ The operation returns the following information: The index option ``hidden`` is only returned if the value is ``true``. +.. _hide-existing-index: + Hide an Existing Index ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/core/index-sparse.txt b/source/core/index-sparse.txt index 5fec3593fde..a82378b28a7 100644 --- a/source/core/index-sparse.txt +++ b/source/core/index-sparse.txt @@ -234,10 +234,9 @@ index permits the following :doc:`insert operations .. code-block:: javascript db.scores.insertMany( [ - { "userid": "AAAAAAA", "score": 43 }, - { "userid": "BBBBBBB", "score": 34 }, - { "userid": "CCCCCCC" }, - { "userid": "DDDDDDD" } + { "userid": "newbie", "score": 43 }, + { "userid": "abby", "score": 34 }, + { "userid": "nina" } ] ) However, the index *would not permit* the addition of the following @@ -247,8 +246,8 @@ and ``90``: .. code-block:: javascript db.scores.insertMany( [ - { "userid": "AAAAAAA", "score": 82 }, - { "userid": "BBBBBBB", "score": 90 } + { "userid": "newbie", "score": 82 }, + { "userid": "abby", "score": 90 } ] ) .. _sparse-and-non-sparse_example: diff --git a/source/core/queryable-encryption/quick-start.txt b/source/core/queryable-encryption/quick-start.txt index bb7adc73db3..60994567e27 100644 --- a/source/core/queryable-encryption/quick-start.txt +++ b/source/core/queryable-encryption/quick-start.txt @@ -57,27 +57,27 @@ Before You Get Started .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-qe+}node-fle-2/local/reader/>`__ + `Complete Node.js Application <{+sample-app-url-qe+}/node/local/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-qe+}python-fle-2/local/reader/>`__ + `Complete Python Application <{+sample-app-url-qe+}/python/local/reader/>`__ .. tab:: Java :tabid: java - `Complete Java Application <{+sample-app-url-qe+}java-fle-2/local/reader/>`__ + `Complete Java Application <{+sample-app-url-qe+}/java/local/reader/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-qe+}go-fle-2/local/reader/>`__ + `Complete Go Application <{+sample-app-url-qe+}/go/local/reader/>`__ .. tab:: C# :tabid: csharp - `Complete C# Application <{+sample-app-url-qe+}dotnet-fle-2/local/reader/>`__ + `Complete C# Application <{+sample-app-url-qe+}/dotnet/local/reader/>`__ .. tabs-selector:: drivers @@ -108,31 +108,31 @@ Procedure :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/local/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/local/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/local/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/local/reader/make_data_key.py>`__. .. tab:: :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/local/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/local/reader/make-data-key.go>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/local/reader/QueryableEncryption/MakeDataKey.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/local/reader/QueryableEncryption/MakeDataKey.cs>`__. .. step:: Configure your MongoClient for Encrypted Reads and Writes @@ -151,31 +151,31 @@ Procedure :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/local/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/local/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/local/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/local/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/local/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/local/reader/insert-encrypted-document.go>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. .. step:: Retrieve Your Encrypted Document @@ -190,31 +190,31 @@ Procedure :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/local/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/local/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/local/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/local/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/local/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/local/reader/insert-encrypted-document.go>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. Learn More diff --git a/source/core/queryable-encryption/reference/compatibility.txt b/source/core/queryable-encryption/reference/compatibility.txt index cb3b605aee7..b27555b7f39 100644 --- a/source/core/queryable-encryption/reference/compatibility.txt +++ b/source/core/queryable-encryption/reference/compatibility.txt @@ -36,17 +36,25 @@ versions or later: - Encryption Library * - :driver:`Node.js ` version ``4.7.0`` or later. - - `mongodb-client-encryption `__ version ``2.2.0-alpha.3`` or later + - `mongodb-client-encryption `__ version ``2.2.0-alpha.6`` or later - * - :driver:`C# .NET ` version ``2.16.0`` or later. + * - :driver:`C#/.NET ` version ``2.17.1`` or later. - No additional dependency - * - :driver:`Java (Synchronous) ` version ``4.7.0-beta0`` or later. - - `MongoCrypt `__ version ``1.5.0-rc2`` or later + * - :driver:`Java (Synchronous) ` version ``4.7.1`` or later. + - `MongoCrypt `__ version ``1.5.2`` or later * - :driver:`Pymongo ` version ``4.1.1`` or later. - - `pymongocrypt `__ version ``1.2.0`` or later + - `pymongocrypt `__ version ``1.3.1`` or later * - :driver:`Go ` version ``1.10.0-beta1`` or later. + - :ref:`libmongocrypt ` version ``1.5.2`` or later + + * - :driver:`C ` version ``1.22.0`` or later. + - :ref:`libmongocrypt ` version ``1.5.2`` or later + + * - :driver:`PHP ` version ``1.14.0beta1`` or later. - No additional dependency + * - :driver:`Ruby ` version ``2.18.0.beta1`` or later. + - :ref:`libmongocrypt ` version ``1.5.2`` or later diff --git a/source/core/queryable-encryption/tutorials/aws/aws-automatic.txt b/source/core/queryable-encryption/tutorials/aws/aws-automatic.txt index acdb1eb380a..11730ae2766 100644 --- a/source/core/queryable-encryption/tutorials/aws/aws-automatic.txt +++ b/source/core/queryable-encryption/tutorials/aws/aws-automatic.txt @@ -40,27 +40,27 @@ Before You Get Started .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-qe+}node-fle-2/aws/reader/>`__ + `Complete Node.js Application <{+sample-app-url-qe+}/node/aws/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-qe+}python-fle-2/aws/reader/>`__ + `Complete Python Application <{+sample-app-url-qe+}/python/aws/reader/>`__ .. tab:: Java :tabid: java-sync - `Complete Java Application <{+sample-app-url-qe+}java-fle-2/aws/reader/>`__ + `Complete Java Application <{+sample-app-url-qe+}/java/aws/reader/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-qe+}go-fle-2/aws/reader/>`__ + `Complete Go Application <{+sample-app-url-qe+}/go/aws/reader/>`__ .. tab:: C# :tabid: csharp - `Complete C# Application <{+sample-app-url-qe+}dotnet-fle-2/aws/reader/>`__ + `Complete C# Application <{+sample-app-url-qe+}/dotnet/aws/reader/>`__ .. tabs-selector:: drivers @@ -102,31 +102,31 @@ Create the Application :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/aws/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/aws/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/aws/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/aws/reader/make_data_key.py>`__. .. tab:: :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/aws/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/aws/reader/make-data-key.go>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs>`__. .. step:: Configure your MongoClient for Encrypted Reads and Writes @@ -145,31 +145,31 @@ Create the Application :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/aws/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/aws/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/aws/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/aws/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/aws/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/aws/reader/insert-encrypted-document.go>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. .. step:: Retrieve Your Encrypted Document @@ -184,31 +184,31 @@ Create the Application :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/aws/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/aws/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/aws/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/aws/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/aws/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/aws/reader/insert-encrypted-document.go>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. diff --git a/source/core/queryable-encryption/tutorials/azure/azure-automatic.txt b/source/core/queryable-encryption/tutorials/azure/azure-automatic.txt index 75e63c5dacc..5ddcfac7886 100644 --- a/source/core/queryable-encryption/tutorials/azure/azure-automatic.txt +++ b/source/core/queryable-encryption/tutorials/azure/azure-automatic.txt @@ -40,27 +40,27 @@ Before You Get Started .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-qe+}node-fle-2/azure/reader/>`__ + `Complete Node.js Application <{+sample-app-url-qe+}/node/azure/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-qe+}python-fle-2/azure/reader/>`__ + `Complete Python Application <{+sample-app-url-qe+}/python/azure/reader/>`__ .. tab:: Java :tabid: java-sync - `Complete Java Application <{+sample-app-url-qe+}java-fle-2/azure/reader/>`__ + `Complete Java Application <{+sample-app-url-qe+}/java/azure/reader/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-qe+}go-fle-2/azure/reader/>`__ + `Complete Go Application <{+sample-app-url-qe+}/go/azure/reader/>`__ .. tab:: C# :tabid: csharp - `Complete C# Application <{+sample-app-url-qe+}dotnet-fle-2/azure/reader/>`__ + `Complete C# Application <{+sample-app-url-qe+}/dotnet/azure/reader/>`__ .. tabs-selector:: drivers @@ -101,31 +101,31 @@ Create the Application :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/azure/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/azure/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/azure/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/azure/reader/make_data_key.py>`__. .. tab:: :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/azure/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/azure/reader/make-data-key.go>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs>`__. .. step:: Configure your MongoClient for Encrypted Reads and Writes @@ -144,31 +144,31 @@ Create the Application :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/azure/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/azure/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/azure/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/azure/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/azure/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/azure/reader/insert-encrypted-document.go>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. .. step:: Retrieve Your Encrypted Document @@ -183,31 +183,31 @@ Create the Application :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/azure/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/azure/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/azure/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/azure/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/azure/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/azure/reader/insert-encrypted-document.go>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. Learn More diff --git a/source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt b/source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt index eac35d3b37f..f285d6e3995 100644 --- a/source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt +++ b/source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt @@ -39,27 +39,27 @@ Before You Get Started .. tab:: Node.js :tabid: nodejs - `Complete Node.js Application <{+sample-app-url-qe+}node-fle-2/gcp/reader/>`__ + `Complete Node.js Application <{+sample-app-url-qe+}/node/gcp/reader/>`__ .. tab:: Python :tabid: python - `Complete Python Application <{+sample-app-url-qe+}python-fle-2/gcp/reader/>`__ + `Complete Python Application <{+sample-app-url-qe+}/python/gcp/reader/>`__ .. tab:: Java :tabid: java-sync - `Complete Java Application <{+sample-app-url-qe+}java-fle-2/gcp/reader/>`__ + `Complete Java Application <{+sample-app-url-qe+}/java/gcp/reader/>`__ .. tab:: Go :tabid: go - `Complete Go Application <{+sample-app-url-qe+}go-fle-2/gcp/reader/>`__ + `Complete Go Application <{+sample-app-url-qe+}/go/gcp/reader/>`__ .. tab:: C# :tabid: csharp - `Complete Go Application <{+sample-app-url-qe+}dotnet-fle-2/gcp/reader/>`__ + `Complete Go Application <{+sample-app-url-qe+}/dotnet/gcp/reader/>`__ .. tabs-selector:: drivers @@ -104,31 +104,31 @@ your application to see relevant code samples. :tabid: nodejs To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/gcp/reader/make_data_key.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/gcp/reader/make_data_key.js>`__. .. tab:: :tabid: python To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/gcp/reader/make_data_key.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/gcp/reader/make_data_key.py>`__. .. tab:: :tabid: java-sync To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java>`__. .. tab:: :tabid: go To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/gcp/reader/make-data-key.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/gcp/reader/make-data-key.go>`__. .. tab:: :tabid: csharp To view the complete code for making a {+dek-long+}, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs>`__. .. step:: Configure your MongoClient for Encrypted Reads and Writes @@ -147,31 +147,31 @@ your application to see relevant code samples. :tabid: nodejs To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/gcp/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/gcp/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/gcp/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/gcp/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/gcp/reader/insert-encrypted-document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/gcp/reader/insert-encrypted-document.go>`__. .. tab:: :tabid: csharp To view the complete code for inserting an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. .. step:: Retrieve Your Encrypted Document @@ -186,31 +186,31 @@ your application to see relevant code samples. :tabid: nodejs To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}node-fle-2/gcp/reader/insert_encrypted_document.js>`__. + `our Github repository <{+sample-app-url-qe+}/node/gcp/reader/insert_encrypted_document.js>`__. .. tab:: :tabid: python To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}python-fle-2/gcp/reader/insert_encrypted_document.py>`__. + `our Github repository <{+sample-app-url-qe+}/python/gcp/reader/insert_encrypted_document.py>`__. .. tab:: :tabid: java-sync To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. + `our Github repository <{+sample-app-url-qe+}/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java>`__. .. tab:: :tabid: go To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}go-fle-2/gcp/reader/insert_encrypted_document.go>`__. + `our Github repository <{+sample-app-url-qe+}/go/gcp/reader/insert_encrypted_document.go>`__. .. tab:: :tabid: csharp To view the complete code for finding an encrypted document, see - `our Github repository <{+sample-app-url-qe+}dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. + `our Github repository <{+sample-app-url-qe+}/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs>`__. Learn More diff --git a/source/core/read-preference-tags.txt b/source/core/read-preference-tags.txt index 0968c21a00f..4bb591f3eeb 100644 --- a/source/core/read-preference-tags.txt +++ b/source/core/read-preference-tags.txt @@ -2,9 +2,9 @@ .. _replica-set-read-preference-tag-sets: -======================== -Read Preference Tag Sets -======================== +============================= +Read Preference Tag Set Lists +============================= .. default-domain:: mongodb @@ -15,8 +15,8 @@ Read Preference Tag Sets :class: singlecol If a replica set member or members are associated with -:rsconf:`~members[n].tags`, you can specify a tag set (array of tag -specification documents) in the read preference to target those members. +:rsconf:`~members[n].tags`, you can specify a tag set list (array of tag +sets) in the read preference to target those members. To :ref:`configure ` a member with tags, set :rsconf:`members[n].tags` to a document that contains the tag @@ -27,9 +27,9 @@ name and value pairs. The value of the tags must be a string. { "": "", "": "",... } -Then, you can include a tag set in the read preference to target tagged -members. A tag set is an array of tag specification documents, where -each tag specification document contains one or more tag/value pairs. +Then, you can include a tag set list in the read preference to target +tagged members. A tag set list is an array of tag sets, where each +tag set contains one or more tag/value pairs. .. code-block:: javascript :copyable: false @@ -46,8 +46,8 @@ For example, if a secondary member has the following { "region": "South", "datacenter": "A" } -Then, the following tags sets can direct read operations to the aforementioned -secondary (or other members with the same tags): +Then, the following tag set lists can direct read operations to the +aforementioned secondary (or other members with the same tags): .. code-block:: javascript :copyable: false @@ -65,21 +65,20 @@ secondary (or other members with the same tags): Order of Tag Matching --------------------- -If the tag set lists multiple documents, MongoDB tries each document in -succession until a match is found. Once a match is found, that tag -specification document is used to find all eligible matching members, -and the remaining tag specification documents are ignored. If no -members match any of the tag specification documents, the read -operation returns with an error. +If the tag set list contains multiple documents, MongoDB tries each +document in succession until a match is found. Once a match is found, +that tag set is used to find all eligible matching members, and the +remaining tag sets are ignored. If no members match any of the tag +sets, the read operation returns with an error. .. tip:: To avoid an error if no members match any of the tag specifications, you can add an empty document ``{ }`` as the last element of the tag - set to read from any eligible member. + set list to read from any eligible member. -For example, consider the following tag set with three tag -specification documents: +For example, consider the following tag set list with three tag +sets: .. code-block:: javascript :copyable: false @@ -95,9 +94,8 @@ First, MongoDB tries to find members tagged with both ``"region": { "region": "South", "datacenter": "A" } -- If a member is found, the remaining tag specification documents are - not considered. Instead, MongoDB uses this tag specification document - to find all eligible members. +- If a member is found, the remaining tag sets are not considered. + Instead, MongoDB uses this tag set to find all eligible members. - Else, MongoDB tries to find members with the tags specified in the second document @@ -107,9 +105,8 @@ First, MongoDB tries to find members tagged with both ``"region": { "rack": "rack-1" } - - If a member is found tagged, the remaining tag specification - document is not considered. Instead, MongoDB uses this tag - specification document to find all eligible members. + - If a member is found tagged, the remaining tag set is not considered. + Instead, MongoDB uses this tag set to find all eligible members. - Else, the third document is considered. @@ -120,13 +117,13 @@ First, MongoDB tries to find members tagged with both ``"region": The empty document matches any eligible member. -Tag Set and Read Preference Modes ---------------------------------- +Tag Set List and Read Preference Modes +-------------------------------------- Tags are not compatible with mode :readmode:`primary`, and in general, only apply when :ref:`selecting ` a :term:`secondary` member of a set for a read operation. However, the -:readmode:`nearest` read mode, when combined with a tag set, selects +:readmode:`nearest` read mode, when combined with a tag set list, selects the matching member with the lowest network latency. This member may be a primary or secondary. @@ -138,22 +135,22 @@ primary or secondary. - Notes * - :readmode:`primaryPreferred` - - Specified tag set only applies if selecting eligible secondaries. + - Specified tag set list only applies if selecting eligible secondaries. * - :readmode:`secondary` - - Specified tag set always applies. + - Specified tag set list always applies. * - :readmode:`secondaryPreferred` - - Specified tag set only applies if selecting eligible secondaries. + - Specified tag set list only applies if selecting eligible secondaries. * - :readmode:`nearest` - - Specified tag set applies whether selecting either primary or eligible secondaries. + - Specified tag set list applies whether selecting either primary or eligible secondaries. For information on the interaction between the :ref:`modes -` and tag sets, refer to the +` and tag set lists, refer to the :ref:`specific read preference mode documentation `. -For information on configuring tag sets, see the +For information on configuring tag set lists, see the :doc:`/tutorial/configure-replica-set-tag-sets` tutorial. diff --git a/source/core/read-preference.txt b/source/core/read-preference.txt index 25318862d49..eb69d583504 100644 --- a/source/core/read-preference.txt +++ b/source/core/read-preference.txt @@ -19,7 +19,7 @@ Read Preference .. include:: /includes/introduction-read-preference.rst Read preference consists of the :ref:`read preference mode -` and optionally, a :ref:`tag set +` and optionally, a :ref:`tag set list `, the :ref:`maxStalenessSeconds ` option, and the :ref:`hedged read ` option. :ref:`Hedged read @@ -85,10 +85,10 @@ Read Preference Modes error or throw an exception. The :readmode:`primary` read preference mode is not compatible with - read preference modes that use :ref:`tag sets + read preference modes that use :ref:`tag set lists ` or :ref:`maxStalenessSeconds `. - If you specify tag sets or a ``maxStalenessSeconds`` value + If you specify tag set lists or a ``maxStalenessSeconds`` value with :readmode:`primary`, the driver will produce an error. .. include:: /includes/extracts/transactions-read-pref.rst @@ -99,7 +99,7 @@ Read Preference Modes of the set. However, if the primary is unavailable, as is the case during :term:`failover` situations, operations read from :term:`secondary` members that satisfy the read preference's ``maxStalenessSeconds`` and - tag sets. + tag set lists. .. include:: /includes/extracts/maxStaleness-primaryPreferred.rst @@ -181,9 +181,9 @@ Read Preference Modes :ref:`acceptable latency window `. - If you specify a :ref:`tag set + If you specify a :ref:`tag set list `, the client attempts to - find a replica set member that matches the specified tag sets and + find a replica set member that matches the specified tag set lists and directs reads to an arbitrary member from among the :ref:`nearest group `. diff --git a/source/core/sharding-reshard-a-collection.txt b/source/core/sharding-reshard-a-collection.txt index c056f1c10a9..45eb8aabe46 100644 --- a/source/core/sharding-reshard-a-collection.txt +++ b/source/core/sharding-reshard-a-collection.txt @@ -61,8 +61,18 @@ requirements: If your application has time periods with less traffic, reshard your collection during that time if possible. -- You have rewritten your application code to update your queries to use - **both** the current shard key and the new shard key. +- You must perform one of these tasks: + + - rewrite your application's queries to use **both** the current shard + key and the new shard key + + - stop your application and then: + + - rewrite your application's queries to use the new shard key + - wait until the resharding of the collection completes (to monitor + the :ref:`resharding process `, use a + :pipeline:`$currentOp` pipeline stage) + - deploy your rewritten application The following queries return an error if the query filter does not include **both** the current shard key or a unique field (like diff --git a/source/core/timeseries/timeseries-limitations.txt b/source/core/timeseries/timeseries-limitations.txt index 8df6cb72e75..a9c906a689c 100644 --- a/source/core/timeseries/timeseries-limitations.txt +++ b/source/core/timeseries/timeseries-limitations.txt @@ -31,13 +31,9 @@ The following features are not supported for * :realm:`GraphQL API ` * :realm:`Realm Sync ` * :dbcommand:`reIndex` +* :dbcommand:`renameCollection` * :doc:`Schema validation rules ` -Constraints -~~~~~~~~~~~ - -The maximum size of a measurement document is 4 MB. - Aggregation $out and $merge ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -86,32 +82,52 @@ To remove all documents from a collection, use the Time Series Secondary Indexes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can add :term:`secondary indexes ` on the fields -specified as the ``timeField`` and the ``metaField``. If the field value -for the ``metaField`` field is a document, you can also create secondary -indexes on fields inside that document. +Time Series Secondary Indexes with MongoDB 6.0 and Later +```````````````````````````````````````````````````````` -In MongoDB 5.1, the ``metaField`` doesn't support :doc:`text -` indexes. +Starting in MongoDB 6.0, you can add a :term:`secondary index ` to any field. -In MongoDB 5.0, the ``metaField`` doesn't support the following index -types: +These index types aren't supported: +- :doc:`Text ` - :doc:`2d ` -- :doc:`2dsphere ` -- :doc:`text ` -Secondary indexes don't support the following index properties: +These index properties aren't supported: -- :doc:`TTL ` +- :doc:`TTL `. For TTL deletion, use + :ref:`expireAfterSeconds `. - :doc:`Unique ` -- :doc:`Partial ` + +The :doc:`multikey index ` type is allowed on the +``metaField`` only. + +These index properties are partially supported: + +- :doc:`Partial indexes ` are allowed on all fields + except the ``metaField`` and ``timeField``. +- :doc:`Sparse indexes ` are allowed on the + ``metaField`` only. For improvements to time series secondary indexes available starting in MongoDB 6.0, see :ref:`timeseries-add-secondary-index-mongodb-6.0`. .. include:: /includes/time-series-secondary-indexes-downgrade-FCV.rst +Time Series Secondary Indexes with MongoDB 5.0 and Earlier +`````````````````````````````````````````````````````````` + +In MongoDB 5.0 and earlier: + +- Secondary indexes can only be defined on the ``metaField`` or the + ``timeField``. +- If the ``metaField`` is a document, you can add secondary indexes on + fields inside that document. + +.. seealso:: + + :ref:`indexes` + Capped Collections ~~~~~~~~~~~~~~~~~~ @@ -197,3 +213,10 @@ You can't write to :ref:`time series collections .. note:: Reads from time series collections are supported in transactions. + +View Limitations +~~~~~~~~~~~~~~~~ + +.. include:: /includes/time-series/fact-view-limitation.rst + +For more information, see :ref:`View Behavior `. diff --git a/source/core/timeseries/timeseries-secondary-index.txt b/source/core/timeseries/timeseries-secondary-index.txt index 4ce9080fde6..3eb356cf59b 100644 --- a/source/core/timeseries/timeseries-secondary-index.txt +++ b/source/core/timeseries/timeseries-secondary-index.txt @@ -37,7 +37,7 @@ fields: .. code-block:: javascript - db.weather24h.createIndex({ "metadata.sensorId": 1, "timestamp": 1 }) + db.weather24h.createIndex( { "metadata.sensorId": 1, "timestamp": 1 } ) .. see:: @@ -54,11 +54,9 @@ the ``timeField`` and the ``metaField``. For example, the following ``sensorData`` collection contains measurements from weather sensors: - .. code-block:: javascript - - db.sensorData.insertMany([{ + db.sensorData.insertMany( [ { "metadata": { "sensorId": 5578, "location": { @@ -129,11 +127,11 @@ index to improve performance: db.sensorData.find().sort( { "timestamp": 1 } ) To confirm that the sort operation used the clustered index, run the -operation again with the ``.explain("executionStats")`` option: +operation again with the ``.explain( "executionStats" )`` option: .. code-block:: javascript - db.sensorData.find().sort( { "timestamp": 1 } ).explain(“executionStats”) + db.sensorData.find().sort( { "timestamp": 1 } ).explain( "executionStats" ) The ``winningPlan.queryPlan.inputStage.stage`` is ``COLLSCAN`` and an ``_internalBoundedSort`` stage is present in the explain plan output. @@ -167,27 +165,27 @@ Create a secondary index on the ``timestamp`` field: .. code-block:: javascript - db.sensorData.createIndex({ "timestamp": 1 }) + db.sensorData.createIndex( { "timestamp": 1 } ) The following sort operation on the ``timestamp`` field uses the Secondary Index to improve performance: .. code-block:: javascript - db.sensorData.aggregate([ + db.sensorData.aggregate( [ { $match: { "timestamp" : { $gte: ISODate("2022-01-15T00:00:00.000Z") } } }, { $sort: { "timestamp": 1 } } - ]) + ] ) To confirm that the sort operation used the Secondary Index, run the -operation again with the ``.explain("executionStats")`` option: +operation again with the ``.explain( "executionStats" )`` option: .. code-block:: javascript - db.sensorData.explain(“executionStats”).aggregate([ - { $match: { "timestamp" : { $gte: ISODate("2022-01-15T00:00:00.000Z") } } }, - { $sort: {"timestamp": 1 } } - ]) + db.sensorData.explain( "executionStats" ).aggregate( [ + { $match: { "timestamp": { $gte: ISODate("2022-01-15T00:00:00.000Z") } } }, + { $sort: { "timestamp": 1 } } + ] ) "Last Point" Queries on Time Series Collections @@ -237,19 +235,19 @@ compound secondary index created above: ] ) To confirm that the last point query used the secondary index, run the operation -again using ``.explain("executionStats")``: +again using ``.explain( "executionStats" )``: .. code-block:: javascript - db.getCollection('sensorData').explain("executionStats").aggregate( [ + db.getCollection( 'sensorData' ).explain( "executionStats" ).aggregate( [ { $sort: { "metadata.sensorId": 1, "timestamp": -1 } }, { $group: { _id: "$metadata.sensorId", - ts: {$first: "$timestamp"}, - temperatureF: {$first: "$currentConditions.tempF" } + ts: { $first: "$timestamp" }, + temperatureF: { $first: "$currentConditions.tempF" } } } ] ) @@ -281,18 +279,21 @@ a collection, use the :method:`db.collection.getIndexes()` method. Time Series Secondary Indexes in MongoDB 6.0 -------------------------------------------- -Starting in MongoDB 6.0: +Starting in MongoDB 6.0, you can: + +- Add a :doc:`compound index ` on the + ``timeField``, ``metaField``, or measurement fields. + +- Use the :query:`$or`, :query:`$in`, and :query:`$geoWithin` operators + with :doc:`partial indexes ` on a time series + collection. -- You can add a :doc:`compound index ` on time, - metadata, or measurement fields. +- Add :doc:`partial ` on the ``metaField``. -- You can use the :query:`$or`, :query:`$in`, and :query:`$geoWithin` - operators with :doc:`partial indexes ` on a time - series collection. +- Add a :term:`secondary index ` to any field or + subfield. -- You can add :doc:`partial ` and :doc:`2dsphere - ` indexes on any field in a :ref:`time series - collection `. +- Use the ``metaField`` with :doc:`2dsphere ` indexes. .. note:: diff --git a/source/core/views.txt b/source/core/views.txt index b3d8dc3fcee..28ab38359ee 100644 --- a/source/core/views.txt +++ b/source/core/views.txt @@ -85,6 +85,14 @@ Views are considered sharded if their underlying collection is sharded. You cannot specify a sharded view for the ``from`` field in :pipeline:`$lookup` and :pipeline:`$graphLookup` operations. +Time Series Collections +~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/time-series/fact-view-limitation.rst + +For more information, see +:ref:`Time Series Collection Limitations `. + Access Control -------------- diff --git a/source/includes/aggregation-pipeline-introduction.rst b/source/includes/aggregation-pipeline-introduction.rst index 958b107d523..bcf88a30328 100644 --- a/source/includes/aggregation-pipeline-introduction.rst +++ b/source/includes/aggregation-pipeline-introduction.rst @@ -11,6 +11,13 @@ An aggregation pipeline consists of one or more :ref:`stages - An aggregation pipeline can return results for groups of documents. For example, return the total, average, maximum, and minimum values. -Starting in MongoDB 4.2, you can also update documents with an -aggregation pipeline. See +Starting in MongoDB 4.2, you can update documents with an aggregation +pipeline if you use the stages shown in :doc:`/tutorial/update-documents-with-aggregation-pipeline`. + +.. note:: + + Aggregation pipelines run with the + :method:`db.collection.aggregate()` method do not modify documents in + a collection, unless the pipeline contains a :pipeline:`$merge` or + :pipeline:`$out` stage. diff --git a/source/includes/change-stream-pre-and-post-images-change-events.rst b/source/includes/change-stream-pre-and-post-images-change-events.rst index 44881e1a4cb..1c267d73a5f 100644 --- a/source/includes/change-stream-pre-and-post-images-change-events.rst +++ b/source/includes/change-stream-pre-and-post-images-change-events.rst @@ -12,7 +12,7 @@ if you perform these steps: Example ``fullDocumentBeforeChange`` document in the change stream output: -.. code-block:: javascript +.. code-block:: json :copyable: false "fullDocumentBeforeChange" : { diff --git a/source/includes/change-stream/clusterTime.rst b/source/includes/change-stream/clusterTime.rst new file mode 100644 index 00000000000..55c08b9ae0b --- /dev/null +++ b/source/includes/change-stream/clusterTime.rst @@ -0,0 +1,18 @@ +.. _|idref|-clusterTime: + +The timestamp from the oplog entry associated with the event. + +Change stream event notifications associated with a +:doc:`multi-document transaction ` +all have the same ``clusterTime`` value: the time when the transaction +was committed. + +On sharded clusters, events with the same ``clusterTime`` may not all +relate to the same transaction. Some events don't relate to a +transaction at all. + +To identify events for a single transaction, you can use the +combination of ``lsid`` and ``txnNumber`` in the change stream +event document. + +.. versionadded:: 4.0 diff --git a/source/includes/change-stream/collectionUUID.rst b/source/includes/change-stream/collectionUUID.rst new file mode 100644 index 00000000000..bcb05b2c051 --- /dev/null +++ b/source/includes/change-stream/collectionUUID.rst @@ -0,0 +1,6 @@ +.. _|idref|-colectionUUID: + +:abbr:`UUID (Universally Unique Identifier)` identifying the collection +where the change occurred. + +.. versionadded:: 6.0 diff --git a/source/includes/change-stream/documentKey.rst b/source/includes/change-stream/documentKey.rst new file mode 100644 index 00000000000..e36d0ecef9d --- /dev/null +++ b/source/includes/change-stream/documentKey.rst @@ -0,0 +1,10 @@ +.. _|idref|-documentKey: + +Document that contains the ``_id`` value of the document created or +modified by the :ref:`CRUD ` operation. + +For sharded collections, this field also displays the full shard key +for the document. The ``_id`` field is not repeated if it is already a +part of the shard key. + + diff --git a/source/includes/change-stream/fullDocument-postimage.rst b/source/includes/change-stream/fullDocument-postimage.rst new file mode 100644 index 00000000000..bb66585f86e --- /dev/null +++ b/source/includes/change-stream/fullDocument-postimage.rst @@ -0,0 +1,8 @@ +.. versionchanged:: 6.0 + +Starting in MongoDB 6.0, if you set the ``changeStreamPreAndPostImages`` option +using :method:`db.createCollection()`, :dbcommand:`create`, or +:dbcommand:`collMod`, then the ``fullDocument`` field shows the document after +it was inserted, replaced, or updated (the document post-image). +``fullDocument`` is always included for ``insert`` events. + diff --git a/source/includes/change-stream/fullDocument-update.rst b/source/includes/change-stream/fullDocument-update.rst new file mode 100644 index 00000000000..aaa575c7321 --- /dev/null +++ b/source/includes/change-stream/fullDocument-update.rst @@ -0,0 +1,13 @@ + +This field only appears if you configured the change stream with +``fullDocument`` set to ``updateLookup``. When you configure the change stream +with ``updateLookup``, the field represents the current +majority-committed version of the document modified by the update operation. +The document may differ from the changes described in +:ref:`updateDescription <|idref|-updateDescription>` if any other +majority-committed operations have modified the document between the original +update operation and the full document lookup. + +For more information, see :ref:`Lookup Full Document for Update Operations +`. + diff --git a/source/includes/change-stream/fullDocument.rst b/source/includes/change-stream/fullDocument.rst new file mode 100644 index 00000000000..5c5f2e3ffdb --- /dev/null +++ b/source/includes/change-stream/fullDocument.rst @@ -0,0 +1,3 @@ +.. _|idref|-fullDocument: + +The document created or modified by a :term:`CRUD` operation. diff --git a/source/includes/change-stream/fullDocumentBeforeChange.rst b/source/includes/change-stream/fullDocumentBeforeChange.rst new file mode 100644 index 00000000000..cab90ddb3eb --- /dev/null +++ b/source/includes/change-stream/fullDocumentBeforeChange.rst @@ -0,0 +1,10 @@ +.. _|idref|-fullDocumentBeforeChange: + +The document before changes were applied by the operation. +That is, the document pre-image. + +This field is available when you enable the ``changeStreamPreAndPostImages`` +field for a collection using :method:`db.createCollection()` method or the +:dbcommand:`create` or :dbcommand:`collMod` commands. + +.. versionadded:: 6.0 diff --git a/source/includes/change-stream/id.rst b/source/includes/change-stream/id.rst new file mode 100644 index 00000000000..3145ce55bc7 --- /dev/null +++ b/source/includes/change-stream/id.rst @@ -0,0 +1,22 @@ +.. _|idref|-id: + +A :term:`BSON` object which serves as an identifier for the +change stream event. This value is used as the ``resumeToken`` +for the ``resumeAfter`` parameter when resuming a change stream. +The ``_id`` object has the following form: + +.. code-block:: none + + { + "_data" : + } + +The ``_data`` type depends on the MongoDB versions +and, in some cases, the :ref:`feature compatibility version (FCV) +` at the time of the change stream's +opening or resumption. See :ref:`change-stream-resume-token` for the +full list of ``_data`` types. + +For an example of resuming a change stream by ``resumeToken``, see +:ref:`change-stream-resume`. + diff --git a/source/includes/change-stream/lsid.rst b/source/includes/change-stream/lsid.rst new file mode 100644 index 00000000000..337c26c8004 --- /dev/null +++ b/source/includes/change-stream/lsid.rst @@ -0,0 +1,9 @@ +.. _|idref|-lsid: + +The identifier for the session associated with the transaction. + +Only present if the operation is part of a :doc:`multi-document +transaction `. + +.. versionadded:: 4.0 + diff --git a/source/includes/change-stream/ns.coll.rst b/source/includes/change-stream/ns.coll.rst new file mode 100644 index 00000000000..10063934ecd --- /dev/null +++ b/source/includes/change-stream/ns.coll.rst @@ -0,0 +1,4 @@ +.. _|idref|-ns.coll: + +The name of the collection where the event occurred. + diff --git a/source/includes/change-stream/ns.db.rst b/source/includes/change-stream/ns.db.rst new file mode 100644 index 00000000000..95b7a4e4783 --- /dev/null +++ b/source/includes/change-stream/ns.db.rst @@ -0,0 +1,4 @@ +.. _|idref|-ns.db: + +The name of the database where the event occurred. + diff --git a/source/includes/change-stream/ns.rst b/source/includes/change-stream/ns.rst new file mode 100644 index 00000000000..3645741486c --- /dev/null +++ b/source/includes/change-stream/ns.rst @@ -0,0 +1,4 @@ +.. _|idref|-ns: + +The namespace (database and or collection) affected by the event. + diff --git a/source/includes/change-stream/od-dropTarget.rst b/source/includes/change-stream/od-dropTarget.rst new file mode 100644 index 00000000000..d6067ca06be --- /dev/null +++ b/source/includes/change-stream/od-dropTarget.rst @@ -0,0 +1,7 @@ +.. _|idref|-od-dropTarget: + +:abbr:`UUID (Universally Unique Identifier)` of the collection that was dropped +in the rename operation. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-idIndex.rst b/source/includes/change-stream/od-idIndex.rst new file mode 100644 index 00000000000..6822d733703 --- /dev/null +++ b/source/includes/change-stream/od-idIndex.rst @@ -0,0 +1,6 @@ +.. _|idref|-operationDescription.idIndex: + +The default ``_id`` index for a new collection. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-index.rst b/source/includes/change-stream/od-index.rst new file mode 100644 index 00000000000..66c057d4d65 --- /dev/null +++ b/source/includes/change-stream/od-index.rst @@ -0,0 +1,6 @@ +.. _|idref|-od-index: + +The index that was modified. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-numInitialChunks.rst b/source/includes/change-stream/od-numInitialChunks.rst new file mode 100644 index 00000000000..242f887e2ad --- /dev/null +++ b/source/includes/change-stream/od-numInitialChunks.rst @@ -0,0 +1,7 @@ +.. _|idref|-od-numInitialChunks: + +Number of chunks created on each shard during a :dbcommand:`shardCollection` +operation. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-presplitHashedZones.rst b/source/includes/change-stream/od-presplitHashedZones.rst new file mode 100644 index 00000000000..95f5ea16ad9 --- /dev/null +++ b/source/includes/change-stream/od-presplitHashedZones.rst @@ -0,0 +1,8 @@ +.. _|idref|-od-presplitHashedZones: + +Indicates whether the shard chunks were :ref:`pre-split +` according to zones when the +collection becamed sharded. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-shardKey.rst b/source/includes/change-stream/od-shardKey.rst new file mode 100644 index 00000000000..5b6720b8717 --- /dev/null +++ b/source/includes/change-stream/od-shardKey.rst @@ -0,0 +1,6 @@ +.. _|idref|-od.shardKey: + +The :ref:`shard key ` for the collection where the change occurred. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-to-coll.rst b/source/includes/change-stream/od-to-coll.rst new file mode 100644 index 00000000000..bc513d39731 --- /dev/null +++ b/source/includes/change-stream/od-to-coll.rst @@ -0,0 +1,6 @@ +.. _|idref|-od.to.coll: + +The new name of the collection after the rename. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-to-db.rst b/source/includes/change-stream/od-to-db.rst new file mode 100644 index 00000000000..963c0e03a08 --- /dev/null +++ b/source/includes/change-stream/od-to-db.rst @@ -0,0 +1,6 @@ +.. _|idref|-od.to.db: + +The new name of the database after the rename. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-to.rst b/source/includes/change-stream/od-to.rst new file mode 100644 index 00000000000..fda8f097dc7 --- /dev/null +++ b/source/includes/change-stream/od-to.rst @@ -0,0 +1,6 @@ +.. _|idref|-od.to: + +The new namespace of the collection after the rename. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/od-unique.rst b/source/includes/change-stream/od-unique.rst new file mode 100644 index 00000000000..ea2215a6536 --- /dev/null +++ b/source/includes/change-stream/od-unique.rst @@ -0,0 +1,6 @@ +.. _|idref|-od-unique: + +This has a value of true if the collection was sharded with a unique shard key. + +.. versionadded:: 6.0 + diff --git a/source/includes/change-stream/operationDescription.rst b/source/includes/change-stream/operationDescription.rst new file mode 100644 index 00000000000..4b247eff9f3 --- /dev/null +++ b/source/includes/change-stream/operationDescription.rst @@ -0,0 +1,8 @@ +.. _|idref|-operationDescription: + +Additional information on the change operation. + +This document and its subfields only appears when the change stream uses +:ref:`expanded events `. + +.. versionadded:: 6.0 diff --git a/source/includes/change-stream/operationType.rst b/source/includes/change-stream/operationType.rst new file mode 100644 index 00000000000..9a49de0d855 --- /dev/null +++ b/source/includes/change-stream/operationType.rst @@ -0,0 +1,4 @@ +.. _|idref|-operationType: + +The type of operation that the change notification reports. + diff --git a/source/includes/change-stream/stateBeforeChange.collectionOptions.rst b/source/includes/change-stream/stateBeforeChange.collectionOptions.rst new file mode 100644 index 00000000000..876c3fc03b3 --- /dev/null +++ b/source/includes/change-stream/stateBeforeChange.collectionOptions.rst @@ -0,0 +1,3 @@ +.. _|idref|-sbc.collectionOptions: + +Document shows collection options before the operation changed them. diff --git a/source/includes/change-stream/stateBeforeChange.indexOptions.rst b/source/includes/change-stream/stateBeforeChange.indexOptions.rst new file mode 100644 index 00000000000..3e91a981f2f --- /dev/null +++ b/source/includes/change-stream/stateBeforeChange.indexOptions.rst @@ -0,0 +1,3 @@ +.. _|idref|-sbc.indexOptions: + +Document shows index options before the operation changed them. diff --git a/source/includes/change-stream/stateBeforeChange.rst b/source/includes/change-stream/stateBeforeChange.rst new file mode 100644 index 00000000000..aaf4570ef7a --- /dev/null +++ b/source/includes/change-stream/stateBeforeChange.rst @@ -0,0 +1,3 @@ +.. _|idref|-stateBeforeChange: + +Document shows collection and index options before the operation changed them. diff --git a/source/includes/change-stream/to.coll.rst b/source/includes/change-stream/to.coll.rst new file mode 100644 index 00000000000..6b75cd01d03 --- /dev/null +++ b/source/includes/change-stream/to.coll.rst @@ -0,0 +1,4 @@ +.. _|idref|-to.coll: + +The new name of the collection after the rename. + diff --git a/source/includes/change-stream/to.db.rst b/source/includes/change-stream/to.db.rst new file mode 100644 index 00000000000..b9a2e0bd71d --- /dev/null +++ b/source/includes/change-stream/to.db.rst @@ -0,0 +1,4 @@ +.. _|idref|-to.db: + +The new name of the database after the rename. + diff --git a/source/includes/change-stream/to.rst b/source/includes/change-stream/to.rst new file mode 100644 index 00000000000..c99d8e8e6ab --- /dev/null +++ b/source/includes/change-stream/to.rst @@ -0,0 +1,4 @@ +.. _|idref|-to: + +The new namespace of the collection after the rename. + diff --git a/source/includes/change-stream/txnNumber.rst b/source/includes/change-stream/txnNumber.rst new file mode 100644 index 00000000000..d1a6fb4b553 --- /dev/null +++ b/source/includes/change-stream/txnNumber.rst @@ -0,0 +1,10 @@ +.. _|idref|-txnNumber: + +Together with the :ref:`lsid <|idref|-lsid>`, a number that helps uniquely +identify a transction. + +Only present if the operation is part of a :doc:`multi-document +transaction `. + +.. versionadded:: 4.0 + diff --git a/source/includes/change-stream/ud-removedFields.rst b/source/includes/change-stream/ud-removedFields.rst new file mode 100644 index 00000000000..856dfc85853 --- /dev/null +++ b/source/includes/change-stream/ud-removedFields.rst @@ -0,0 +1,4 @@ +.. _|idref|-ud-removedFields: + +An array of fields that were removed by the update operation. + diff --git a/source/includes/change-stream/ud-ta-field.rst b/source/includes/change-stream/ud-ta-field.rst new file mode 100644 index 00000000000..58a525e8dc5 --- /dev/null +++ b/source/includes/change-stream/ud-ta-field.rst @@ -0,0 +1,4 @@ +.. _|idref|-ud-ta-field: + +The name of the truncated field. + diff --git a/source/includes/change-stream/ud-ta-newSize.rst b/source/includes/change-stream/ud-ta-newSize.rst new file mode 100644 index 00000000000..ae69f74c94b --- /dev/null +++ b/source/includes/change-stream/ud-ta-newSize.rst @@ -0,0 +1,4 @@ +.. _|idref|-ud-ta-newSize: + +The number of elements in the truncated array. + diff --git a/source/includes/change-stream/ud-truncatedArrays.rst b/source/includes/change-stream/ud-truncatedArrays.rst new file mode 100644 index 00000000000..f13a6460042 --- /dev/null +++ b/source/includes/change-stream/ud-truncatedArrays.rst @@ -0,0 +1,17 @@ +.. _|idref|-ud-truncatedArrays: + +An array of documents which record array truncations performed +with pipeline-based updates using one or more of the following +stages: + +* :pipeline:`$addFields` +* :pipeline:`$set` +* :pipeline:`$replaceRoot` +* :pipeline:`$replaceWith` + +.. note:: + + If the entire array is replaced, the truncations will be + reported under :ref:`updateDescription.updatedFields + <|idref|-ud-updatedFields>`. + diff --git a/source/includes/change-stream/ud-updatedFields.rst b/source/includes/change-stream/ud-updatedFields.rst new file mode 100644 index 00000000000..4dbdb343c8f --- /dev/null +++ b/source/includes/change-stream/ud-updatedFields.rst @@ -0,0 +1,7 @@ +.. _|idref|-ud-updatedFields: + +A document whose keys correspond to the fields that were modified by the +update operation. The value of each field corresponds to the new +value of those fields, rather than the operation that resulted in the +new value. + diff --git a/source/includes/change-stream/updateDescription.rst b/source/includes/change-stream/updateDescription.rst new file mode 100644 index 00000000000..88ead553cce --- /dev/null +++ b/source/includes/change-stream/updateDescription.rst @@ -0,0 +1,5 @@ +.. _|idref|-updateDescription: + +A document describing the fields that were updated or removed +by the update operation. + diff --git a/source/includes/change-stream/wallTime.rst b/source/includes/change-stream/wallTime.rst new file mode 100644 index 00000000000..50eb98d5817 --- /dev/null +++ b/source/includes/change-stream/wallTime.rst @@ -0,0 +1,9 @@ +.. _|idref|-wallTime: + +The server date and time of the database operation. ``wallTime`` +differs from ``clusterTime`` in that ``clusterTime`` is a timestamp +taken from the oplog entry associated with the database operation +event. + +.. versionadded:: 6.0 + diff --git a/source/includes/changelogs/releases/4.2.22.rst b/source/includes/changelogs/releases/4.2.22.rst new file mode 100644 index 00000000000..70c7318c32f --- /dev/null +++ b/source/includes/changelogs/releases/4.2.22.rst @@ -0,0 +1,37 @@ +.. _4.2.22-changelog: + +4.2.22 Changelog +---------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-58747` The ShardServerCatalogCacheLoader doesn't interrupt ongoing operations on step up +- :issue:`SERVER-62272` Adding schema validation to a collection can prevent chunk migrations of failing documents +- :issue:`SERVER-62656` Decouple mongos-to-config-server connection pool sizing from mongos-to-shard-server connection pool sizing + +Build and Packaging +~~~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-61894` Support the 'showRawUpdateDescription' option in change stream specs +- :issue:`SERVER-63159` Implement the $_internalApplyOplogUpdate aggregation stage + +Internals +~~~~~~~~~ + +- :issue:`SERVER-55173` Segmentation fault in WiredTigerSession::releaseCursor +- :issue:`SERVER-59658` Improve logging to reflect that sharding metadata refresh waiting on replication +- :issue:`SERVER-60334` Avoid caching the cursor and session in WiredTigerSizeStorer +- :issue:`SERVER-60607` improve handling of large/NaN values for geo index version +- :issue:`SERVER-61321` Improve handling of large/NaN values for text index version +- :issue:`SERVER-64403` Find queries with SORT_MERGE collation-encode the missing sort attribute +- :issue:`SERVER-66418` Bad projection created during dependency analysis due to string order assumption +- :issue:`SERVER-66461` Run notarization earlier in the build process +- :issue:`SERVER-66556` Prevent potential race when releasing cursors during shutdown +- :issue:`SERVER-67993` fix 4.4 pylinters errors +- :issue:`SERVER-68130` AutoSplitVector could generate response bigger than BSONObjMaxUserSize +- :issue:`SERVER-68199` An active index build on the existing target collection of a renameCollection command can fail the mongod +- :issue:`SERVER-68359` [4.4] Prevent TTLMonitor from processing index if expireAfterSeconds is NaN +- :issue:`SERVER-68487` add BSONElement method to check for NaN field values +- :issue:`SERVER-68574` Switch to the new logkeeper cluster + diff --git a/source/includes/changelogs/releases/5.0.10.rst b/source/includes/changelogs/releases/5.0.10.rst new file mode 100644 index 00000000000..616f4cc5979 --- /dev/null +++ b/source/includes/changelogs/releases/5.0.10.rst @@ -0,0 +1,91 @@ +.. _5.0.10-changelog: + +5.0.10 Changelog +---------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-57519` Make ARS use causally consistent ShardRegistry::getShard() function +- :issue:`SERVER-62272` Adding schema validation to a collection can prevent chunk migrations of failing documents +- :issue:`SERVER-62432` Ensure safe access to ShardingDDLCoordinator instance state documents +- :issue:`SERVER-62656` Decouple mongos-to-config-server connection pool sizing from mongos-to-shard-server connection pool sizing +- :issue:`SERVER-63243` Range deleter must not clean up orphan ranges in a round-robin fashion +- :issue:`SERVER-64433` A new topology time could be gossiped without being majority committed +- :issue:`SERVER-65027` Resharding commands permit extra options without returning an error +- :issue:`SERVER-65821` Deadlock during setFCV when there are prepared transactions that have not persisted commit/abort decision +- :issue:`SERVER-65925` shardsvrCommitReshardCollection should check for transient errors when joining +- :issue:`SERVER-65930` DDL coordinators and rename participant initial checkpoint may incur in DuplicateKey error +- :issue:`SERVER-66046` Resharding coordinator won't automatically abort the resharding operation when a recipient shard errors during its applying phase +- :issue:`SERVER-66618` Ensure ReshardingCoordinator has aborted in resharding_coordinator_recovers_abort_decision.js +- :issue:`SERVER-66866` The range deleter waits between batches while holding the collection IX lock +- :issue:`SERVER-67457` Resharding operation aborted in the midst of contacting participants may stall on config server primary indefinitely + +JavaScript +~~~~~~~~~~ + +:issue:`SERVER-61234` JS object-based types are not properly auto-serialized when directly returned by server-side JS functions + +Build and Packaging +~~~~~~~~~~~~~~~~~~~ + +:issue:`SERVER-66627` Backport the install-devcore target + +Internals +~~~~~~~~~ + +- :issue:`SERVER-57938` Skip polygon validation for stored GeoJSON when query has $geoIntersect and a 2dsphere index +- :issue:`SERVER-58257` Add better diagnostics to predictive_connpool.js +- :issue:`SERVER-59658` Improve logging to reflect that sharding metadata refresh waiting on replication +- :issue:`SERVER-61856` Upgrade libunwind to 1.6.2+ +- :issue:`SERVER-62386` Coverity analysis defect 121298: Parse warning +- :issue:`SERVER-62716` Handle spurious finishWaitingForOneOpTime in WaitForMajorityServiceTest +- :issue:`SERVER-63271` serverStatus can fail the server +- :issue:`SERVER-63493` update-shard-key tests failing due to transaction lock timeouts +- :issue:`SERVER-63971` Change server parameter to default to read-your-writes behavior after 2PC transaction +- :issue:`SERVER-64215` Interrupt OplogBufferMock::waitForData on shutdown +- :issue:`SERVER-64244` RunDBCheckInBackground should be resilient to interrupts +- :issue:`SERVER-64509` Fix ShardRegistry threadpool shutdown order +- :issue:`SERVER-64627` Need general method to handle in-memory state after initial sync +- :issue:`SERVER-64628` More testing of adding nodes to sharded sets +- :issue:`SERVER-64659` Report in serverStatus number of file descriptors used during index builds +- :issue:`SERVER-64725` Make ShardRegistry::periodicReloader interruptible +- :issue:`SERVER-64797` Use WT's new numerical timestamp API +- :issue:`SERVER-65100` Increase memory block size for BSONColumn +- :issue:`SERVER-65131` Disable opportunistic read targeting (except for hedged reads) +- :issue:`SERVER-65313` Use BatchedCollectionCatalogWriter during startup recovery +- :issue:`SERVER-65371` MigrationSourceManager running on secondary node may trip invariant +- :issue:`SERVER-65399` 'commitIndexBuild' oplog entry is a no-op for unfinished index builds not restarted +- :issue:`SERVER-65723` Add tunable parameter to improve batching on secondaries +- :issue:`SERVER-65777` "revokePrivilegesFromRole" param.ns missing user object in audit log +- :issue:`SERVER-65797` Remove invalid index specs in memory before parsing for listIndexes +- :issue:`SERVER-66087` Call curl_global_init before threading enabled +- :issue:`SERVER-66111` Curl implementation of HTTPClient should respect default timeouts +- :issue:`SERVER-66319` dbcheck_no_history_on_secondary.js disables dbCheck failpoint too early +- :issue:`SERVER-66379` $or to $in conversion flawed +- :issue:`SERVER-66384` Enable command line customization of NINJA_BUILDDIR +- :issue:`SERVER-66418` Bad projection created during dependency analysis due to string order assumption +- :issue:`SERVER-66433` Backport deadline waiting for overlapping range deletion to finish to pre-v5.1 versions +- :issue:`SERVER-66461` Run notarization earlier in the build process +- :issue:`SERVER-66520` add index build UUID to BackgroundOperationInProgress error messages +- :issue:`SERVER-66556` Prevent potential race when releasing cursors during shutdown +- :issue:`SERVER-66559` Expand the internalQueryMaxAddToSetBytes param from 32 to 64 bits +- :issue:`SERVER-66658` Shard registry might be accessed before initialization +- :issue:`SERVER-66727` Time-series bucket can be created that violates max time-span +- :issue:`SERVER-66769` Update spawnhost setup script to support Windows hosts via cygwin +- :issue:`SERVER-66799` Fix getParameterWithDetails.js failure on ephemeralForTest +- :issue:`SERVER-66843` Use defensive programming in DeadlineFuture destructor +- :issue:`SERVER-66860` FSM tests should not reuse same database names +- :issue:`SERVER-66902` Multiversion setup is consistently failing on the mongodb-mongo-v5.0 Evergreen project +- :issue:`SERVER-66955` Remove JSON.send usage in perf projects +- :issue:`SERVER-67014` Say that "the client driver may require an upgrade" in warning message for deprecated op codes in 5.0 +- :issue:`SERVER-67106` The _flushRoutingTableCacheUpdates() command should be able to also serve requests referencing collection views. +- :issue:`SERVER-67167` DIsable or_to_in.js from running in the parallel suite +- :issue:`SERVER-67220` [5.0] set_fcv_prepared_transaction.js is not resilient to StaleConfig errors +- :issue:`SERVER-67405` Handle empty string for is_patch evergreen expansion +- :issue:`SERVER-67513` Disable or_to_in for jsCore_compatibility for v5.0 +- :issue:`WT-8425` Push updates with the same commit timestamps in the out_of_order_ts_updates vector in hs_rec.c. +- :issue:`WT-8669` Assert that the timestamps are not OOO in __hs_insert_record +- :issue:`WT-9249` Compare and fix the start durable timestamp if it is greater than ooo timestamp +- :issue:`WT-9251` Perform log flush before the metadata checkpoint + diff --git a/source/includes/diagnostic-backtrace-generation.rst b/source/includes/diagnostic-backtrace-generation.rst new file mode 100644 index 00000000000..7934dfe6787 --- /dev/null +++ b/source/includes/diagnostic-backtrace-generation.rst @@ -0,0 +1,13 @@ +Starting in MongoDB 4.4 running on Linux: + +- When the :binary:`~bin.mongod` and :binary:`~bin.mongos` processes + receive a ``SIGUSR2`` signal, backtrace details are added to the logs + for each process thread. + +- Backtrace details show the function calls for the process, which can + be used for diagnostics and provided to MongoDB Support if required. + +The backtrace functionality is available for these architectures: + +- ``x86_64`` +- ``arm64`` (starting in MongoDB 4.4.15, 5.0.10, and 6.0) diff --git a/source/includes/driver-examples/driver-example-modify-index-tabs.rst b/source/includes/driver-examples/driver-example-modify-index-tabs.rst index a5961650f4b..bad0dd288be 100644 --- a/source/includes/driver-examples/driver-example-modify-index-tabs.rst +++ b/source/includes/driver-examples/driver-example-modify-index-tabs.rst @@ -3,8 +3,8 @@ tabs: - id: shell content: | - To modify an existing index, you need to drop and recreate the - index. The exception to this rule is + To modify an existing index in the MongoDB Shell, you need to + drop and recreate the index. The exception to this rule is :doc:`TTL indexes `, which can be modified via the :dbcommand:`collMod` command in conjunction with the :collflag:`index` collection flag. @@ -12,4 +12,4 @@ - id: compass content: | To modify an existing index in |compass|, you need to drop and - recreate the index. \ No newline at end of file + recreate the index. diff --git a/source/includes/driver-remove-indexes-tabs.rst b/source/includes/driver-remove-indexes-tabs.rst index 4216d233d71..6d5e1b97404 100644 --- a/source/includes/driver-remove-indexes-tabs.rst +++ b/source/includes/driver-remove-indexes-tabs.rst @@ -3,13 +3,13 @@ tabs: - id: shell content: | - MongoDB provides two methods for removing indexes from a collection: + + When removing indexes in the MongoDB Shell, you can either: - - :method:`db.collection.dropIndex()` and + - Remove a specific index. - - :method:`db.collection.dropIndexes()` + - Remove all indexes from the collection. - Remove Specific Index ~~~~~~~~~~~~~~~~~~~~~ @@ -67,20 +67,15 @@ - id: compass content: | + To remove an index from a collection in |compass|: - 1. Navigate to the collection on which the target - index exists. + 1. Navigate to the collection containing the target index. 2. Click the :guilabel:`Indexes` tab. - 3. Click the :guilabel:`trash can` icon in the - :guilabel:`Drop` column for the index you wish to delete. + 3. In the :guilabel:`Drop` column for the target index, click + the trash icon. .. figure:: /images/compass-delete-index.png :alt: Delete an index in Compass - - .. seealso:: - - - :ref:`MongoDB Compass Documentation ` - - :compass:`Compass Documentation for Indexes ` diff --git a/source/includes/extracts-agg-stages.yaml b/source/includes/extracts-agg-stages.yaml index d2021f24c02..a2d883303ad 100644 --- a/source/includes/extracts-agg-stages.yaml +++ b/source/includes/extracts-agg-stages.yaml @@ -31,6 +31,12 @@ content: | to evenly distribute the documents into the specified number of buckets. + * - :pipeline:`$changeStream` + + - Returns a :ref:`Change Stream ` cursor for the + collection. This stage can only occur once in an aggregation + pipeline and it must occur as the first stage. + * - :pipeline:`$collStats` - Returns statistics regarding a collection or view. @@ -280,6 +286,12 @@ content: | * - Stage - Description + * - :pipeline:`$changeStream` + + - Returns a :ref:`Change Stream ` cursor for the + collection. This stage can only occur once in an aggregation + pipeline and it must occur as the first stage. + * - :pipeline:`$currentOp` - Returns information on active and/or dormant operations for diff --git a/source/includes/extracts-dbcommands.yaml b/source/includes/extracts-dbcommands.yaml index b5777c3d114..36c9b88f501 100644 --- a/source/includes/extracts-dbcommands.yaml +++ b/source/includes/extracts-dbcommands.yaml @@ -1,8 +1,10 @@ ref: comment-content content: | - Optional. A user-provided comment to attach to this command. - Once set, this comment appears alongside records of this command - in the following locations: + Optional. + + A user-provided comment to attach to this command. Once set, this + comment appears alongside records of this command in the following + locations: - :ref:`mongod log messages `, in the ``attr.command.cursor.comment`` field. diff --git a/source/includes/extracts-geospatial-long-lat.yaml b/source/includes/extracts-geospatial-long-lat.yaml index 05d2c42e888..a5beafd7f6c 100644 --- a/source/includes/extracts-geospatial-long-lat.yaml +++ b/source/includes/extracts-geospatial-long-lat.yaml @@ -10,10 +10,12 @@ content: | --- ref: geospatial-long-lat-values content: | - If specifying latitude and longitude coordinates, list the - **longitude** first and then **latitude**: + .. important:: - .. include:: /includes/extracts/geospatial-valid-long-lat-values.rst + If specifying latitude and longitude coordinates, list the + **longitude** first, and then **latitude**. + + .. include:: /includes/extracts/geospatial-valid-long-lat-values.rst --- ref: geospatial-valid-long-lat-values content: | diff --git a/source/includes/extracts-parent-fact-covered-query-sharded-collection.yaml b/source/includes/extracts-parent-fact-covered-query-sharded-collection.yaml index d15ffcf5666..8accf6e6c59 100644 --- a/source/includes/extracts-parent-fact-covered-query-sharded-collection.yaml +++ b/source/includes/extracts-parent-fact-covered-query-sharded-collection.yaml @@ -8,12 +8,7 @@ content: | Starting in MongoDB 3.0, an index cannot {{cover}} a query on a :term:`sharded ` collection when run against a - :binary:`~bin.mongos` if the index does not contain the shard key, - with the following exception for the ``_id`` index: If a query on a - sharded collection only specifies a condition on the ``_id`` field - and returns only the ``_id`` field, the ``_id`` index can cover the - query when run against a :binary:`~bin.mongos` even if the ``_id`` - field is not the shard key. + :binary:`~bin.mongos` if the index does not contain the shard key. In previous versions, an index cannot :ref:`cover ` a query on a :term:`sharded ` collection when run against a diff --git a/source/includes/extracts-read-preference-modes.yaml b/source/includes/extracts-read-preference-modes.yaml index 9b8bac23b44..48cc241110b 100644 --- a/source/includes/extracts-read-preference-modes.yaml +++ b/source/includes/extracts-read-preference-modes.yaml @@ -46,10 +46,10 @@ replacement: --- ref: _tagSets content: | - When the read preference includes a :ref:`tag set (i.e. a list of tag - specifications) `{{noPrimary}}, + When the read preference includes a :ref:`tag set list (an array of tag + sets) `{{noPrimary}}, the client attempts to find secondary members with matching tags - (trying the tag specifications in order until a match is found). If + (trying the tag sets in order until a match is found). If matching secondaries are found, the client selects a random secondary from the :ref:`nearest group ` of matching @@ -82,7 +82,7 @@ replacement: ref: _maxStaleness-and-tagSets content: | When the read preference includes a ``maxStalenessSeconds`` value - **and** a tag set, the client filters by staleness first and + **and** a tag set list, the client filters by staleness first and then by the specified tags. {{nearestBehavior}} --- ref: maxStaleness-and-tagSets-general diff --git a/source/includes/fact-mongodb-intro.rst b/source/includes/fact-mongodb-intro.rst index 798797465a6..aae4b95731a 100644 --- a/source/includes/fact-mongodb-intro.rst +++ b/source/includes/fact-mongodb-intro.rst @@ -7,5 +7,3 @@ The manual describes key concepts in MongoDB such as: - The query API - Operational and administrative references - Tutorials and procedures - -.. include:: /includes/rc-available.rst diff --git a/source/includes/fact-ttl-collection-background-timing.rst b/source/includes/fact-ttl-collection-background-timing.rst index cd7ea9a1644..dafa1e2279f 100644 --- a/source/includes/fact-ttl-collection-background-timing.rst +++ b/source/includes/fact-ttl-collection-background-timing.rst @@ -1,12 +1,13 @@ The TTL index does not guarantee that expired data will be deleted -immediately upon expiration. There may be a delay between the time a +immediately upon expiration. There may be a delay between the time that a document expires and the time that MongoDB removes the document from the database. The background task that removes expired documents runs *every 60 seconds*. As a result, documents may remain in a collection during the period between the expiration of the document and the running of the -background task. +background task. MongoDB starts deleting documents 0 to 60 seconds after +the index completes. Because the duration of the removal operation depends on the workload of your :binary:`~bin.mongod` instance, expired data may exist for some diff --git a/source/includes/fundamentals/manage-keys/key-alt-names.java b/source/includes/fundamentals/manage-keys/key-alt-names.java index 7db46cf9eea..00fffcc66c1 100644 --- a/source/includes/fundamentals/manage-keys/key-alt-names.java +++ b/source/includes/fundamentals/manage-keys/key-alt-names.java @@ -6,9 +6,11 @@ .kmsProviders(kmsProviders) .build(); ClientEncryption clientEncryption = ClientEncryptions.create(clientEncryptionSettings); + BsonDocument masterKeyProperties = new BsonDocument(); masterKeyProperties.put("provider", new BsonString("")); masterKeyProperties.put("", new BsonString("")); List keyAltNames = new ArrayList(); keyAltNames.add(""); + BsonBinary dataKeyId = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions().masterKey(masterKeyProperties).keyAltNames(keyAltNames)); diff --git a/source/includes/fundamentals/manual-encryption/example/clientEnc.rst b/source/includes/fundamentals/manual-encryption/example/clientEnc.rst index 1020bfc2644..a9cae91860f 100644 --- a/source/includes/fundamentals/manual-encryption/example/clientEnc.rst +++ b/source/includes/fundamentals/manual-encryption/example/clientEnc.rst @@ -8,6 +8,7 @@ instance: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.java :language: java + :dedent: :start-after: start_client_enc :end-before: end_client_enc @@ -16,6 +17,7 @@ instance: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.js :language: javascript + :dedent: :start-after: start_client_enc :end-before: end_client_enc @@ -24,6 +26,7 @@ instance: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.py :language: python + :dedent: :start-after: start_client_enc :end-before: end_client_enc diff --git a/source/includes/fundamentals/manual-encryption/example/decFields.rst b/source/includes/fundamentals/manual-encryption/example/decFields.rst index a21ef2e07c9..bfd33348a4e 100644 --- a/source/includes/fundamentals/manual-encryption/example/decFields.rst +++ b/source/includes/fundamentals/manual-encryption/example/decFields.rst @@ -8,6 +8,7 @@ and manually decrypt the encrypted fields: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.java :language: java + :dedent: :start-after: start_find_decrypt :end-before: end_find_decrypt @@ -16,6 +17,7 @@ and manually decrypt the encrypted fields: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.js :language: javascript + :dedent: :start-after: start_find_decrypt :end-before: end_find_decrypt @@ -24,6 +26,7 @@ and manually decrypt the encrypted fields: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.py :language: python + :dedent: :start-after: start_find_decrypt :end-before: end_find_decrypt diff --git a/source/includes/fundamentals/manual-encryption/example/encFields.rst b/source/includes/fundamentals/manual-encryption/example/encFields.rst index 830a1283a7c..52a937514be 100644 --- a/source/includes/fundamentals/manual-encryption/example/encFields.rst +++ b/source/includes/fundamentals/manual-encryption/example/encFields.rst @@ -15,6 +15,7 @@ your document and insert your document into MongoDB: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.java :language: java + :dedent: :start-after: start_enc_and_insert :end-before: end_enc_and_insert @@ -25,6 +26,7 @@ your document and insert your document into MongoDB: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.js :language: javascript + :dedent: :start-after: start_enc_and_insert :end-before: end_enc_and_insert @@ -35,6 +37,7 @@ your document and insert your document into MongoDB: .. literalinclude:: /includes/fundamentals/manual-encryption/manual-enc.py :language: python + :dedent: :start-after: start_enc_and_insert :end-before: end_enc_and_insert diff --git a/source/includes/sample_apps/csfle/dotnet-fle-2/.gitignore b/source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/.gitignore similarity index 100% rename from source/includes/sample_apps/csfle/dotnet-fle-2/.gitignore rename to source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/.gitignore diff --git a/source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/CSFLE.csproj b/source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/CSFLE.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/CSFLE.csproj rename to source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/CSFLE.csproj diff --git a/source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/MakeDataKey.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/Program.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/Program.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/Program.cs diff --git a/source/includes/sample_apps/csfle/dotnet/.gitignore b/source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/.gitignore similarity index 100% rename from source/includes/sample_apps/csfle/dotnet/.gitignore rename to source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/.gitignore diff --git a/source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/CSFLE.csproj b/source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/CSFLE.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/CSFLE.csproj rename to source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/CSFLE.csproj diff --git a/source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/MakeDataKey.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/Program.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/Program.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/Program.cs diff --git a/source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/.gitignore b/source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/.gitignore new file mode 100644 index 00000000000..8a30d258ed9 --- /dev/null +++ b/source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/CSFLE.csproj b/source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/CSFLE.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/CSFLE.csproj rename to source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/CSFLE.csproj diff --git a/source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/MakeDataKey.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/Program.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/Program.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/Program.cs diff --git a/source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/.gitignore b/source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/.gitignore new file mode 100644 index 00000000000..8a30d258ed9 --- /dev/null +++ b/source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/CSFLE.csproj b/source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/CSFLE.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/CSFLE.csproj rename to source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/CSFLE.csproj diff --git a/source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/MakeDataKey.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/Program.cs b/source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/Program.cs rename to source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/Program.cs diff --git a/source/includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go/aws/reader/make-data-key.go b/source/includes/generated/in-use-encryption/csfle/go/aws/reader/make-data-key.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/aws/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/csfle/go/aws/reader/make-data-key.go diff --git a/source/includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go/azure/reader/make-data-key.go b/source/includes/generated/in-use-encryption/csfle/go/azure/reader/make-data-key.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/azure/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/csfle/go/azure/reader/make-data-key.go diff --git a/source/includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go/gcp/reader/make-data-key.go b/source/includes/generated/in-use-encryption/csfle/go/gcp/reader/make-data-key.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/gcp/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/csfle/go/gcp/reader/make-data-key.go diff --git a/source/includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go/local/reader/make-data-key.go b/source/includes/generated/in-use-encryption/csfle/go/local/reader/make-data-key.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go/local/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/csfle/go/local/reader/make-data-key.go diff --git a/source/includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java similarity index 99% rename from source/includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java index b59c0185684..cd429e4bfaf 100644 --- a/source/includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java @@ -87,6 +87,7 @@ public static void main(String[] args) throws Exception { new Document().append("policyNumber", new Document().append("encrypt", new Document() .append("bsonType", "int") .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic")))))); + HashMap schemaMap = new HashMap(); schemaMap.put("medicalRecords.patients", BsonDocument.parse(jsonSchema.toJson())); // end-schema @@ -136,6 +137,7 @@ public static void main(String[] args) throws Exception { System.out.println("Finding a document with regular (non-encrypted) client."); Document docRegular = mongoClientRegular.getDatabase(recordsDb).getCollection(recordsColl).find(eq("name", "Jon Doe")).first(); System.out.println(docRegular.toJson()); + System.out.println("Finding a document with encrypted client, searching on an encrypted field"); Document docSecure = mongoClientSecure.getDatabase(recordsDb).getCollection(recordsColl).find(eq("ssn", 241014209)).first(); System.out.println(docSecure.toJson()); diff --git a/source/includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java similarity index 99% rename from source/includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java index 845975ce34f..1d763b60602 100644 --- a/source/includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java @@ -88,6 +88,7 @@ public static void main(String[] args) throws Exception { new Document().append("policyNumber", new Document().append("encrypt", new Document() .append("bsonType", "int") .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic")))))); + HashMap schemaMap = new HashMap(); schemaMap.put("medicalRecords.patients", BsonDocument.parse(jsonSchema.toJson())); // end-schema @@ -137,6 +138,7 @@ public static void main(String[] args) throws Exception { System.out.println("Finding a document with regular (non-encrypted) client."); Document docRegular = mongoClientRegular.getDatabase(recordsDb).getCollection(recordsColl).find(eq("name", "Jon Doe")).first(); System.out.println(docRegular.toJson()); + System.out.println("Finding a document with encrypted client, searching on an encrypted field"); Document docSecure = mongoClientSecure.getDatabase(recordsDb).getCollection(recordsColl).find(eq("ssn", 241014209)).first(); System.out.println(docSecure.toJson()); diff --git a/source/includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java similarity index 99% rename from source/includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java index fdf43b405f8..10148f92396 100644 --- a/source/includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java @@ -87,6 +87,7 @@ public static void main(String[] args) throws Exception { new Document().append("policyNumber", new Document().append("encrypt", new Document() .append("bsonType", "int") .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic")))))); + HashMap schemaMap = new HashMap(); schemaMap.put("medicalRecords.patients", BsonDocument.parse(jsonSchema.toJson())); // end-schema @@ -136,6 +137,7 @@ public static void main(String[] args) throws Exception { System.out.println("Finding a document with regular (non-encrypted) client."); Document docRegular = mongoClientRegular.getDatabase(recordsDb).getCollection(recordsColl).find(eq("name", "Jon Doe")).first(); System.out.println(docRegular.toJson()); + System.out.println("Finding a document with encrypted client, searching on an encrypted field"); Document docSecure = mongoClientSecure.getDatabase(recordsDb).getCollection(recordsColl).find(eq("ssn", 241014209)).first(); System.out.println(docSecure.toJson()); diff --git a/source/includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java similarity index 99% rename from source/includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java index 25fc3cedf77..984b2994da8 100644 --- a/source/includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java @@ -99,6 +99,7 @@ public static void main(String[] args) throws Exception { new Document().append("policyNumber", new Document().append("encrypt", new Document() .append("bsonType", "int") .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic")))))); + HashMap schemaMap = new HashMap(); schemaMap.put("medicalRecords.patients", BsonDocument.parse(jsonSchema.toJson())); // end-schema @@ -148,6 +149,7 @@ public static void main(String[] args) throws Exception { System.out.println("Finding a document with regular (non-encrypted) client."); Document docRegular = mongoClientRegular.getDatabase(recordsDb).getCollection(recordsColl).find(eq("name", "Jon Doe")).first(); System.out.println(docRegular.toJson()); + System.out.println("Finding a document with encrypted client, searching on an encrypted field"); Document docSecure = mongoClientSecure.getDatabase(recordsDb).getCollection(recordsColl).find(eq("ssn", 241014209)).first(); System.out.println(docSecure.toJson()); diff --git a/source/includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node/aws/reader/make_data_key.js b/source/includes/generated/in-use-encryption/csfle/node/aws/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/aws/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/csfle/node/aws/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node/azure/reader/make_data_key.js b/source/includes/generated/in-use-encryption/csfle/node/azure/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/azure/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/csfle/node/azure/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node/gcp/reader/make_data_key.js b/source/includes/generated/in-use-encryption/csfle/node/gcp/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/gcp/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/csfle/node/gcp/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node/local/reader/make_data_key.js b/source/includes/generated/in-use-encryption/csfle/node/local/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node/local/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/csfle/node/local/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python/aws/reader/make_data_key.py b/source/includes/generated/in-use-encryption/csfle/python/aws/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/aws/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/csfle/python/aws/reader/make_data_key.py diff --git a/source/includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python/azure/reader/make_data_key.py b/source/includes/generated/in-use-encryption/csfle/python/azure/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/azure/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/csfle/python/azure/reader/make_data_key.py diff --git a/source/includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python/gcp/reader/make_data_key.py b/source/includes/generated/in-use-encryption/csfle/python/gcp/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/gcp/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/csfle/python/gcp/reader/make_data_key.py diff --git a/source/includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python/local/reader/make_data_key.py b/source/includes/generated/in-use-encryption/csfle/python/local/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python/local/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/csfle/python/local/reader/make_data_key.py diff --git a/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/.gitignore b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/.gitignore new file mode 100644 index 00000000000..8a30d258ed9 --- /dev/null +++ b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/Program.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/Program.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/Program.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/QueryableEncryption.csproj b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/QueryableEncryption.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/QueryableEncryption.csproj rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/QueryableEncryption.csproj diff --git a/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/.gitignore b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/.gitignore new file mode 100644 index 00000000000..8a30d258ed9 --- /dev/null +++ b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/Program.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/Program.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/Program.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/QueryableEncryption.csproj b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/QueryableEncryption.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/QueryableEncryption.csproj rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/QueryableEncryption.csproj diff --git a/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/.gitignore b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/.gitignore new file mode 100644 index 00000000000..8a30d258ed9 --- /dev/null +++ b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/Program.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/Program.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/Program.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/QueryableEncryption.csproj b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/QueryableEncryption.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/QueryableEncryption.csproj rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/QueryableEncryption.csproj diff --git a/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/.gitignore b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/.gitignore new file mode 100644 index 00000000000..8a30d258ed9 --- /dev/null +++ b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/MakeDataKey.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/MakeDataKey.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/MakeDataKey.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/MakeDataKey.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/Program.cs b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/Program.cs similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/Program.cs rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/Program.cs diff --git a/source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/QueryableEncryption.csproj b/source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/QueryableEncryption.csproj similarity index 100% rename from source/includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/QueryableEncryption.csproj rename to source/includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/QueryableEncryption.csproj diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/make-data-key.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/make-data-key.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/make-data-key.go diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/make-data-key.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/make-data-key.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/make-data-key.go diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/make-data-key.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/make-data-key.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/make-data-key.go diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go similarity index 100% rename from source/includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/make-data-key.go b/source/includes/generated/in-use-encryption/queryable-encryption/go/local/reader/make-data-key.go similarity index 99% rename from source/includes/sample_apps/csfle/build/go-fle-2/local/reader/make-data-key.go rename to source/includes/generated/in-use-encryption/queryable-encryption/go/local/reader/make-data-key.go index 122211dcb3b..c536aa664a8 100644 --- a/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/make-data-key.go +++ b/source/includes/generated/in-use-encryption/queryable-encryption/go/local/reader/make-data-key.go @@ -5,14 +5,16 @@ import ( "fmt" "log" - "crypto/rand" - "io/ioutil" - "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" ) +import ( + "crypto/rand" + "io/ioutil" +) + func localMasterKey() []byte { key := make([]byte, 96) if _, err := rand.Read(key); err != nil { diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java similarity index 98% rename from source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java index 712df1882f2..744a08b3844 100644 --- a/source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java @@ -150,7 +150,7 @@ public static void main(String[] args) throws Exception { Document docRegular = regularClient.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); System.out.println(docRegular.toJson()); System.out.println("Finding a document with encrypted client, searching on an encrypted field"); - Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); + Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("patientRecord.ssn", "987-65-4320")).first(); System.out.println(docSecure.toJson()); // end-find diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java similarity index 98% rename from source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java index 9300c372530..d657be9072d 100644 --- a/source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java @@ -151,7 +151,7 @@ public static void main(String[] args) throws Exception { Document docRegular = regularClient.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); System.out.println(docRegular.toJson()); System.out.println("Finding a document with encrypted client, searching on an encrypted field"); - Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); + Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("patientRecord.ssn", "987-65-4320")).first(); System.out.println(docSecure.toJson()); // end-find diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java similarity index 98% rename from source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java index 1af7f172c1d..fe0816d1a40 100644 --- a/source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java @@ -150,7 +150,7 @@ public static void main(String[] args) throws Exception { Document docRegular = regularClient.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); System.out.println(docRegular.toJson()); System.out.println("Finding a document with encrypted client, searching on an encrypted field"); - Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); + Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("patientRecord.ssn", "987-65-4320")).first(); System.out.println(docSecure.toJson()); // end-find diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java similarity index 98% rename from source/includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java index 9185e10c5fa..53c7da753f3 100644 --- a/source/includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ b/source/includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java @@ -159,7 +159,7 @@ public static void main(String[] args) throws Exception { Document docRegular = regularClient.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); System.out.println(docRegular.toJson()); System.out.println("Finding a document with encrypted client, searching on an encrypted field"); - Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); + Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("patientRecord.ssn", "987-65-4320")).first(); System.out.println(docSecure.toJson()); // end-find diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/makeDataKey.java similarity index 100% rename from source/includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java rename to source/includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/makeDataKey.java diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/aws/reader/make_data_key.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/aws/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/azure/reader/make_data_key.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/azure/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/gcp/reader/make_data_key.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/gcp/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/local/reader/make_data_key.js b/source/includes/generated/in-use-encryption/queryable-encryption/node/local/reader/make_data_key.js similarity index 100% rename from source/includes/sample_apps/csfle/build/node-fle-2/local/reader/make_data_key.js rename to source/includes/generated/in-use-encryption/queryable-encryption/node/local/reader/make_data_key.js diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/aws/reader/make_data_key.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/aws/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/make_data_key.py diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/azure/reader/make_data_key.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/azure/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/make_data_key.py diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/gcp/reader/make_data_key.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/gcp/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/make_data_key.py diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/local/reader/make_data_key.py b/source/includes/generated/in-use-encryption/queryable-encryption/python/local/reader/make_data_key.py similarity index 100% rename from source/includes/sample_apps/csfle/build/python-fle-2/local/reader/make_data_key.py rename to source/includes/generated/in-use-encryption/queryable-encryption/python/local/reader/make_data_key.py diff --git a/source/includes/important-hostnames.rst b/source/includes/important-hostnames.rst index 73ab3c8195d..9dde5ed597d 100644 --- a/source/includes/important-hostnames.rst +++ b/source/includes/important-hostnames.rst @@ -6,7 +6,7 @@ set members or sharded cluster members. Use hostnames instead of IP addresses to configure clusters across a - split network horizon. Starting in MongDB 5.0, nodes that are only + split network horizon. Starting in MongoDB 5.0, nodes that are only configured with an IP address will fail startup validation and will not start. diff --git a/source/includes/in-use-encryption/admonition-csfle-key-rotation.txt b/source/includes/in-use-encryption/admonition-csfle-key-rotation.txt new file mode 100644 index 00000000000..aadfd26e3e2 --- /dev/null +++ b/source/includes/in-use-encryption/admonition-csfle-key-rotation.txt @@ -0,0 +1,4 @@ +.. important:: Key Rotation Support + + To view your driver's dependencies for the key rotation API, see + :ref:`Compatibility `. diff --git a/source/includes/install-mongodb-apt-get-commands.rst b/source/includes/install-mongodb-apt-get-commands.rst new file mode 100644 index 00000000000..9dcb680ce7b --- /dev/null +++ b/source/includes/install-mongodb-apt-get-commands.rst @@ -0,0 +1,45 @@ +You can also install the MongoDB Shell that uses the system's OpenSSL. +You must have already installed OpenSSL on your system before +installing this version of the MongoDB Shell. + +You can install all of the MongoDB Enterprise packages and the +MongoDB Shell that uses the system's OpenSSL without removing the +MongoDB Shell first. For example: + +.. code-block:: sh + + sudo apt-get install -y mongodb-enterprise mongodb-mongosh-shared-openssl11 + +The following example removes the MongoDB Shell and then installs the +MongoDB Shell that uses the system's OpenSSL 1.1: + +.. code-block:: sh + + sudo apt-get remove -y mongodb-mongosh && sudo apt-get install -y + mongodb-mongosh-shared-openssl11 + +The following example removes the MongoDB Shell and then installs the +MongoDB Shell that uses the system's OpenSSL 3: + +.. code-block:: sh + + sudo apt-get remove -y mongodb-mongosh && sudo apt-get install -y + mongodb-mongosh-shared-openssl3 + +You can also choose the MongoDB packages to install. + +The following example installs MongoDB Enterprise and tools, and the +MongoDB Shell that uses the system's OpenSSL 1.1: + +.. code-block:: sh + + sudo apt-get install -y mongodb-enterprise-database + mongodb-enterprise-tools mongodb-mongosh-shared-openssl11 + +The following example installs MongoDB Enterprise and tools, and the +MongoDB Shell that uses the system's OpenSSL 3: + +.. code-block:: sh + + sudo apt-get install -y mongodb-enterprise-database + mongodb-enterprise-tools mongodb-mongosh-shared-openssl3 diff --git a/source/includes/install-mongodb-shell-tarball.rst b/source/includes/install-mongodb-shell-tarball.rst new file mode 100644 index 00000000000..aac343ee2e6 --- /dev/null +++ b/source/includes/install-mongodb-shell-tarball.rst @@ -0,0 +1,2 @@ +Download the package for the version of ``mongosh`` you need from the +|mdb-download-link| and uncompress the package. diff --git a/source/includes/install-mongodb-yum-commands.rst b/source/includes/install-mongodb-yum-commands.rst new file mode 100644 index 00000000000..46b221f738c --- /dev/null +++ b/source/includes/install-mongodb-yum-commands.rst @@ -0,0 +1,45 @@ +You can also install the MongoDB Shell that uses the system's OpenSSL. +You must have already installed OpenSSL on your system before +installing this version of the MongoDB Shell. + +You can install all of the MongoDB Enterprise packages and the +MongoDB Shell that uses the system's OpenSSL without removing the +MongoDB Shell first. For example: + +.. code-block:: sh + + sudo yum install -y mongodb-enterprise mongodb-mongosh-shared-openssl11 + +The following example removes the MongoDB Shell and then installs the +MongoDB Shell that uses the system's OpenSSL 1.1: + +.. code-block:: sh + + sudo yum remove -y mongodb-mongosh && sudo yum install -y + mongodb-mongosh-shared-openssl11 + +The following example removes the MongoDB Shell and then installs the +MongoDB Shell that uses the system's OpenSSL 3: + +.. code-block:: sh + + sudo yum remove -y mongodb-mongosh && sudo yum install -y + mongodb-mongosh-shared-openssl3 + +You can also choose the MongoDB packages to install. + +The following example installs MongoDB Enterprise and tools, and the +MongoDB Shell that uses the system's OpenSSL 1.1: + +.. code-block:: sh + + sudo yum install -y mongodb-enterprise-database + mongodb-enterprise-tools mongodb-mongosh-shared-openssl11 + +The following example installs MongoDB Enterprise and tools, and the +MongoDB Shell that uses the system's OpenSSL 3: + +.. code-block:: sh + + sudo yum install -y mongodb-enterprise-database + mongodb-enterprise-tools mongodb-mongosh-shared-openssl3 diff --git a/source/includes/list-mongodb-enterprise-packages.rst b/source/includes/list-mongodb-enterprise-packages.rst index 55c85e4cad3..4fdb5ecc782 100644 --- a/source/includes/list-mongodb-enterprise-packages.rst +++ b/source/includes/list-mongodb-enterprise-packages.rst @@ -36,7 +36,11 @@ repository, and contains the following officially-supported packages: * - ``{+package-name+}-mongosh`` - Contains the MongoDB Shell (:binary:`~bin.mongosh`). - + + * - ``{+package-name+}-shared-openssl*`` + - Contains the MongoDB Shell that uses the OpenSSL version already + installed on your computer (:binary:`~bin.mongosh`). + * - ``{+package-name-enterprise+}-tools`` - A ``metapackage`` that automatically installs the component packages listed below: diff --git a/source/includes/operationDescription.indexes.rst b/source/includes/operationDescription.indexes.rst new file mode 100644 index 00000000000..52fa75b655c --- /dev/null +++ b/source/includes/operationDescription.indexes.rst @@ -0,0 +1,6 @@ +.. _|idref|-operationDescription.indexes: + +An array of documents listing the indexes that were created or dropped +by the operation. + +.. versionadded:: 6.0 diff --git a/source/includes/queryable-encryption/quick-start/client.rst b/source/includes/queryable-encryption/quick-start/client.rst index 1469effe0d8..4455a6afc99 100644 --- a/source/includes/queryable-encryption/quick-start/client.rst +++ b/source/includes/queryable-encryption/quick-start/client.rst @@ -13,7 +13,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -23,7 +23,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -33,7 +33,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -43,7 +43,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -53,7 +53,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -69,7 +69,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -79,7 +79,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -89,7 +89,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -99,7 +99,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -109,7 +109,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -125,7 +125,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -135,7 +135,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -145,7 +145,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -155,7 +155,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -165,7 +165,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -181,7 +181,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -191,7 +191,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -201,7 +201,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -211,7 +211,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -221,7 +221,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -240,7 +240,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -250,7 +250,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -260,7 +260,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -270,7 +270,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go @@ -280,7 +280,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp diff --git a/source/includes/queryable-encryption/quick-start/dek.rst b/source/includes/queryable-encryption/quick-start/dek.rst index b48ebec9768..e4a98c90eda 100644 --- a/source/includes/queryable-encryption/quick-start/dek.rst +++ b/source/includes/queryable-encryption/quick-start/dek.rst @@ -20,7 +20,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :caption: make_data_key.js @@ -30,7 +30,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -40,7 +40,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -50,7 +50,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -60,7 +60,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -88,7 +88,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -98,7 +98,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -108,7 +108,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -118,7 +118,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go @@ -128,7 +128,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp @@ -145,7 +145,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/make_data_key.js :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: javascript @@ -155,7 +155,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/make_data_key.py :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: python @@ -165,7 +165,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: java @@ -175,7 +175,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/make-data-key.go :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: go @@ -185,7 +185,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: csharp diff --git a/source/includes/queryable-encryption/quick-start/find.rst b/source/includes/queryable-encryption/quick-start/find.rst index 4291a589701..1972648e5a0 100644 --- a/source/includes/queryable-encryption/quick-start/find.rst +++ b/source/includes/queryable-encryption/quick-start/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :caption: insert_encrypted_document.js @@ -21,7 +21,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -31,7 +31,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -41,7 +41,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go @@ -51,7 +51,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp diff --git a/source/includes/queryable-encryption/quick-start/insert.rst b/source/includes/queryable-encryption/quick-start/insert.rst index 6f79a765d87..a4ec2c1fbcb 100644 --- a/source/includes/queryable-encryption/quick-start/insert.rst +++ b/source/includes/queryable-encryption/quick-start/insert.rst @@ -10,7 +10,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -20,7 +20,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -30,7 +30,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -40,7 +40,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go @@ -50,7 +50,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp diff --git a/source/includes/queryable-encryption/quick-start/key-vault-index.rst b/source/includes/queryable-encryption/quick-start/key-vault-index.rst index 0631e638138..a73bf8f7a2a 100644 --- a/source/includes/queryable-encryption/quick-start/key-vault-index.rst +++ b/source/includes/queryable-encryption/quick-start/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/local/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/local/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/local/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/local/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/local/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/local/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/local/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/local/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/local/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/sample_apps/csfle/dotnet/CSFLE/mongocryptd.pid b/source/includes/queryable-encryption/tp-version.rst similarity index 100% rename from source/includes/sample_apps/csfle/dotnet/CSFLE/mongocryptd.pid rename to source/includes/queryable-encryption/tp-version.rst diff --git a/source/includes/queryable-encryption/tutorials/automatic/aws/client.rst b/source/includes/queryable-encryption/tutorials/automatic/aws/client.rst index 1417fb64524..99cea3fce6b 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/aws/client.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/aws/client.rst @@ -11,7 +11,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -21,7 +21,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -31,7 +31,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -41,7 +41,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -51,7 +51,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -70,7 +70,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -80,7 +80,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -90,7 +90,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -100,7 +100,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -110,7 +110,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -124,7 +124,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -134,7 +134,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -144,7 +144,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -154,7 +154,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -164,7 +164,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -178,7 +178,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -188,7 +188,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -198,7 +198,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -208,7 +208,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -218,7 +218,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -237,7 +237,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -247,7 +247,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -257,7 +257,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -267,7 +267,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go @@ -277,7 +277,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst b/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst index 5b9cd20aed1..70d5bb84f16 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst @@ -15,7 +15,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -25,7 +25,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -35,7 +35,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -45,7 +45,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -55,7 +55,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -82,7 +82,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/make_data_key.js :start-after: start-datakeyopts :end-before: end-datakeyopts :language: javascript @@ -92,7 +92,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/make_data_key.py :start-after: start-datakeyopts :end-before: end-datakeyopts :language: python @@ -102,7 +102,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-datakeyopts :end-before: end-datakeyopts :language: java @@ -112,7 +112,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/make-data-key.go :start-after: start-datakeyopts :end-before: end-datakeyopts :language: go @@ -122,7 +122,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-datakeyopts :end-before: end-datakeyopts :language: csharp @@ -148,7 +148,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -158,7 +158,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -168,7 +168,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -178,7 +178,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go @@ -188,7 +188,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp @@ -205,7 +205,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/make_data_key.js :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: javascript @@ -215,7 +215,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/make_data_key.py :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: python @@ -225,7 +225,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: java @@ -235,7 +235,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/make-data-key.go :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: go @@ -245,7 +245,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/aws/find.rst b/source/includes/queryable-encryption/tutorials/automatic/aws/find.rst index 970c8662d57..3bcdc551c71 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/aws/find.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/aws/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :caption: insert_encrypted_document.js @@ -21,7 +21,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -31,7 +31,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -41,7 +41,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go @@ -51,7 +51,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/aws/insert.rst b/source/includes/queryable-encryption/tutorials/automatic/aws/insert.rst index 5a35cc641e7..4a6b9ab3a17 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/aws/insert.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/aws/insert.rst @@ -10,7 +10,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -20,7 +20,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -30,7 +30,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -40,7 +40,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go @@ -50,7 +50,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/aws/key-vault-index.rst b/source/includes/queryable-encryption/tutorials/automatic/aws/key-vault-index.rst index 9a04fd4cb34..6a52cea9b83 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/aws/key-vault-index.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/aws/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/aws/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/aws/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/aws/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/aws/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/aws/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/aws/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/azure/client.rst b/source/includes/queryable-encryption/tutorials/automatic/azure/client.rst index b5cc66314fc..a209af3b717 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/azure/client.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/azure/client.rst @@ -11,7 +11,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -21,7 +21,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -31,7 +31,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -41,7 +41,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -51,7 +51,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -68,7 +68,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -78,7 +78,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -88,7 +88,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -98,7 +98,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -108,7 +108,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -122,7 +122,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -132,7 +132,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -142,7 +142,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -152,7 +152,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -162,7 +162,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -176,7 +176,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -186,7 +186,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -196,7 +196,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -206,7 +206,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -216,7 +216,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -235,7 +235,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -245,7 +245,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -255,7 +255,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -265,7 +265,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go @@ -275,7 +275,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst b/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst index 0b34b75a21c..0ae1f0c6e17 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst @@ -21,7 +21,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -31,7 +31,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -41,7 +41,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -51,7 +51,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -61,7 +61,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -89,7 +89,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/make_data_key.js :start-after: start-datakeyopts :end-before: end-datakeyopts :language: javascript @@ -99,7 +99,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/make_data_key.py :start-after: start-datakeyopts :end-before: end-datakeyopts :language: python @@ -109,7 +109,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-datakeyopts :end-before: end-datakeyopts :language: java @@ -119,7 +119,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/make-data-key.go :start-after: start-datakeyopts :end-before: end-datakeyopts :language: go @@ -129,7 +129,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-datakeyopts :end-before: end-datakeyopts :language: csharp @@ -155,7 +155,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -165,7 +165,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -175,7 +175,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -185,7 +185,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go @@ -195,7 +195,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp @@ -212,7 +212,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/make_data_key.js :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: javascript @@ -222,7 +222,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/make_data_key.py :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: python @@ -232,7 +232,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: java @@ -242,7 +242,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/make-data-key.go :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: go @@ -252,7 +252,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/azure/find.rst b/source/includes/queryable-encryption/tutorials/automatic/azure/find.rst index bb6267388a9..06d3b5b6ba8 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/azure/find.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/azure/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :caption: insert_encrypted_document.js @@ -21,7 +21,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -31,7 +31,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -41,7 +41,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go @@ -51,7 +51,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/azure/insert.rst b/source/includes/queryable-encryption/tutorials/automatic/azure/insert.rst index 082ef1accbd..510adff42da 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/azure/insert.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/azure/insert.rst @@ -10,7 +10,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -25,7 +25,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -35,7 +35,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -45,7 +45,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go @@ -55,7 +55,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/azure/key-vault-index.rst b/source/includes/queryable-encryption/tutorials/automatic/azure/key-vault-index.rst index 42978c4479f..088133c65f9 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/azure/key-vault-index.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/azure/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/azure/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/azure/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/azure/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/azure/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/azure/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/azure/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/gcp/client.rst b/source/includes/queryable-encryption/tutorials/automatic/gcp/client.rst index 594bd3ea0dd..15f31c1ac21 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/gcp/client.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/gcp/client.rst @@ -11,7 +11,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -21,7 +21,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -31,7 +31,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -41,7 +41,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -51,7 +51,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -67,7 +67,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -77,7 +77,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -87,7 +87,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -97,7 +97,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -107,7 +107,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -121,7 +121,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -131,7 +131,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -141,7 +141,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -151,7 +151,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -161,7 +161,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -175,7 +175,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -185,7 +185,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -195,7 +195,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -205,7 +205,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -215,7 +215,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -234,7 +234,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -244,7 +244,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -254,7 +254,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -264,7 +264,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go @@ -274,7 +274,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst b/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst index 7d5e13ca483..c72b8892819 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst @@ -15,7 +15,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -25,7 +25,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -35,7 +35,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -45,7 +45,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -55,7 +55,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -82,7 +82,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/make_data_key.js :start-after: start-datakeyopts :end-before: end-datakeyopts :language: javascript @@ -92,7 +92,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/make_data_key.py :start-after: start-datakeyopts :end-before: end-datakeyopts :language: python @@ -102,7 +102,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-datakeyopts :end-before: end-datakeyopts :language: java @@ -112,7 +112,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/make-data-key.go :start-after: start-datakeyopts :end-before: end-datakeyopts :language: go @@ -122,7 +122,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-datakeyopts :end-before: end-datakeyopts :language: csharp @@ -150,7 +150,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -160,7 +160,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -170,7 +170,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -180,7 +180,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go @@ -190,7 +190,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp @@ -207,7 +207,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/make_data_key.js :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: javascript @@ -217,7 +217,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/make_data_key.py :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: python @@ -227,7 +227,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: java @@ -237,7 +237,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/make-data-key.go :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: go @@ -247,7 +247,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-enc-collection :end-before: end-create-enc-collection :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/gcp/find.rst b/source/includes/queryable-encryption/tutorials/automatic/gcp/find.rst index 6584c0eb2de..0c5ca96f263 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/gcp/find.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/gcp/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :caption: insert_encrypted_document.js @@ -21,7 +21,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -31,7 +31,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -41,7 +41,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go @@ -51,7 +51,7 @@ a client that is not configured for automatic {+qe+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/gcp/insert.rst b/source/includes/queryable-encryption/tutorials/automatic/gcp/insert.rst index 59dac341364..c9412583f14 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/gcp/insert.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/gcp/insert.rst @@ -10,7 +10,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -20,7 +20,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -30,7 +30,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -40,7 +40,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go @@ -50,7 +50,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp diff --git a/source/includes/queryable-encryption/tutorials/automatic/gcp/key-vault-index.rst b/source/includes/queryable-encryption/tutorials/automatic/gcp/key-vault-index.rst index bf2617ef111..755e7021101 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/gcp/key-vault-index.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/gcp/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node-fle-2/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/node/gcp/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python-fle-2/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/python/gcp/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java-fle-2/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/java/gcp/reader/src/main/java/com/mongodb/qe/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go-fle-2/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/go/gcp/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet-fle-2/gcp/reader/QueryableEncryption/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/queryable-encryption/dotnet/gcp/reader/QueryableEncryption/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/quick-start/client.rst b/source/includes/quick-start/client.rst index 9a9237da536..277e210269e 100644 --- a/source/includes/quick-start/client.rst +++ b/source/includes/quick-start/client.rst @@ -13,7 +13,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -23,7 +23,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -33,7 +33,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -43,7 +43,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -53,7 +53,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -69,7 +69,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -79,7 +79,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -89,7 +89,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -99,7 +99,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -109,7 +109,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -132,7 +132,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -142,7 +142,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -152,7 +152,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -162,7 +162,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -172,7 +172,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -189,7 +189,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -210,7 +210,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -231,7 +231,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -257,7 +257,7 @@ If the ``mongocryptd.exe`` executable is not in the PATH, specify the spawn path. - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -275,7 +275,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -304,7 +304,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -314,7 +314,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -324,7 +324,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -334,7 +334,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp @@ -344,7 +344,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go diff --git a/source/includes/quick-start/dek.rst b/source/includes/quick-start/dek.rst index 603f130cf6d..086297d8a29 100644 --- a/source/includes/quick-start/dek.rst +++ b/source/includes/quick-start/dek.rst @@ -18,7 +18,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -28,7 +28,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :caption: make_data_key.js @@ -38,7 +38,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :caption: make_data_key.py @@ -48,7 +48,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -58,7 +58,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -86,7 +86,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go @@ -96,7 +96,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -106,7 +106,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -116,7 +116,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -127,7 +127,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp diff --git a/source/includes/quick-start/find.rst b/source/includes/quick-start/find.rst index 0074c72aae9..1cc197d2822 100644 --- a/source/includes/quick-start/find.rst +++ b/source/includes/quick-start/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -21,7 +21,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :language: javascript @@ -31,7 +31,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -41,7 +41,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp @@ -51,7 +51,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go diff --git a/source/includes/quick-start/insert.rst b/source/includes/quick-start/insert.rst index 73ea21009ba..0b4c2d7006a 100644 --- a/source/includes/quick-start/insert.rst +++ b/source/includes/quick-start/insert.rst @@ -10,7 +10,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -20,7 +20,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -30,7 +30,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -40,7 +40,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp @@ -50,7 +50,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go diff --git a/source/includes/quick-start/key-vault-index.rst b/source/includes/quick-start/key-vault-index.rst index c2716cdac5b..5d502834603 100644 --- a/source/includes/quick-start/key-vault-index.rst +++ b/source/includes/quick-start/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/local/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/local/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/local/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/local/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/local/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/local/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/local/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/read-preference-modes-table.rst b/source/includes/read-preference-modes-table.rst index c3018c01139..2246e3d2aef 100644 --- a/source/includes/read-preference-modes-table.rst +++ b/source/includes/read-preference-modes-table.rst @@ -44,7 +44,7 @@ - The :ref:`maxStalenessSeconds ` read preference option - - Any specified :doc:`tag sets + - Any specified :doc:`tag set lists ` Starting in version 4.4, :readmode:`nearest` supports diff --git a/source/includes/sample_apps/csfle/.gitignore b/source/includes/sample_apps/csfle/.gitignore deleted file mode 100644 index 5ca57ce9f75..00000000000 --- a/source/includes/sample_apps/csfle/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -**/obj/ -build/**/test/** -.envrc -**/master-key.txt -**/libmongocrypt/ -**/pymongocrypt/ diff --git a/source/includes/sample_apps/csfle/Pipfile b/source/includes/sample_apps/csfle/Pipfile deleted file mode 100644 index a162fa0955c..00000000000 --- a/source/includes/sample_apps/csfle/Pipfile +++ /dev/null @@ -1,13 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -pymongo = "*" -pymongocrypt = "*" - -[dev-packages] - -[requires] -python_version = "3.8" diff --git a/source/includes/sample_apps/csfle/README.md b/source/includes/sample_apps/csfle/README.md deleted file mode 100644 index ff8ebbc8278..00000000000 --- a/source/includes/sample_apps/csfle/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Sample CSFLE Applications - -1. Run `cp envrc_template .envrc` and then fill out your `.envrc` file. You can fill out the `.envrc` file by using - the DBX team's test credentials, or by creating accounts - on KMS each KMS provider and filling in the file. - -2. Use `direnv` to load the environment variables defined in your `.envrc` file into your environment. - -3. Install python packages by running `pip install -r requirements.txt` - -> **_NOTE:_** If you must test new QE/FLE fetures in python, run `source python-fle-2 requirements.sh` to build and install `pymongo` and `pymongo-crypt` from source. - -4. Install bluehawk by running `npm install -g bluehawk` - -5. Run `python build.py` to generate scripts to create a DEK and insert a sample document in all combinations of the following languages and KMS providers: - -- Local Key Provider -- AWS KMS -- GCP KMS -- Azure Key Vault - -- Dotnet -- Node -- Python -- Java -- Go - -Once you build the files, you should see a `build` directory with the following structure: - -``` -build -├── dotnet -│   ├── aws -│   │   ├── reader -│   │   └── test -│   ├── azure -│   │   ├── reader -│   │   └── test -│   ├── gcp -│   │   ├── reader -│   │   └── test -│   └── local -│   ├── reader -│   └── test -├── go -│   ├── aws -│   │   ├── reader -│   │   └── test -│   ├── azure -│   │   ├── reader -│   │   └── test -│   ├── gcp -│   │   ├── reader -│   │   └── test -│   └── local -│   ├── reader -│   └── test -├── java -│   ├── aws -│   │   ├── reader -│   │   └── test -│   ├── azure -│   │   ├── reader -│   │   └── test -│   ├── gcp -│   │   ├── reader -│   │   └── test -│   └── local -│   ├── reader -│   └── test -... -``` - -The `reader` directories contains the code to use in docs code snippets, and the `test` directories contains runnable examples for testing. - -6. Install the following languages and tools necessary - to run sample applications: - -- [JDK](https://dotnet.microsoft.com/en-us/download) and [Maven](https://maven.apache.org/download.cgi) -- [Dotnet SDK](https://dotnet.microsoft.com/en-us/download) -- [Node](https://nodejs.org/en/download/) -- [Go](https://go.dev/dl/) - -7. Run `python -m unittest test.py` to test the generated scripts using the KMS credentials in your `.envrc` file. diff --git a/source/includes/sample_apps/csfle/build.py b/source/includes/sample_apps/csfle/build.py deleted file mode 100644 index db5ce60e2d0..00000000000 --- a/source/includes/sample_apps/csfle/build.py +++ /dev/null @@ -1,132 +0,0 @@ -import os -import shutil -import click - -from const import * - - -def get_commands(project, get_file_name, state): - """Get list of commands to build project/state pair""" - file_path = os.path.join(project, get_file_name(project)) - output_file = os.path.join( - BUILD_DIR, - project, - *state.split(DIR_SEPERATOR), - os.path.dirname(get_file_name(project)), - ) - commands = [ - f"{BLUEHAWK} copy {file_path} --state {state} -o {output_file}" - ] - if GET_EXTRA_FILES(project): - for l in GET_EXTRA_FILES(project): - next_file_name = os.path.join(project, l) - next_output_file = os.path.join( - BUILD_DIR, project, *state.split(DIR_SEPERATOR), os.path.dirname(l) - ) - commands.append(f"{BLUEHAWK} copy {next_file_name} --state {state} -o {next_output_file}") - return commands - - -def build_projects(project, build_states, skip_format): - """Build sample apps for a project""" - - all_commands = [] - - for f in BUILD_FILES: - for s in build_states: - commands = get_commands(project, f, s) - for c in commands: - all_commands += commands - dedup_commands = list(set(all_commands)) - for c in dedup_commands: - os.system(c) - - # run formatter - if not skip_format: - if FILE_MAP[project].get(FORMAT_COMMAND): - print(f"\n\n$$$$ Formatting {project}:\n\n") - os.system(FILE_MAP[project][FORMAT_COMMAND]) - - -def check_bluehawk_installed(): - """Check that bluehawk is installed""" - - if shutil.which(BLUEHAWK) == None: - raise ImportError(BLUEHAWK_HELP) - - -@click.command() -@click.option("--project", default=None, help="What apps to build") -@click.option( - "--skip-format", - is_flag=True, - default=False, - help="Whether or not to skip the formatting step of building code. Useful for shortening build times.", -) -@click.option( - "--reader", - is_flag=True, - default=False, - help="Whether or not to only build reader directories", -) -@click.option( - "--test", - is_flag=True, - default=False, - help="Whether or not to only build test directories", -) -@click.option( - "--fle-1", - is_flag=True, - default=False, - help="Whether or not to only build FLE-1 apps", -) -@click.option( - "--fle-2", - is_flag=True, - default=False, - help="Whether or not to only build FLE-2 apps", -) -def build_apps(project, skip_format, reader, test, fle_1, fle_2): - """Get commmand line arguments and build sample applications""" - - check_bluehawk_installed() - - if os.path.exists(BUILD_DIR): - shutil.rmtree(BUILD_DIR) - - file_map = {} - build_states = [] - - if not project: - file_map = FILE_MAP - else: - project_to_build = [l.strip() for l in project.split(",")] - file_map = {l: FILE_MAP[l] for l in project_to_build} - - if reader and test: - raise ValueError("Cannot specify reader and test at the same time.") - - elif reader: - build_states = [s for s in BUILD_STATES if TEST not in s] - - elif test: - build_states = [s for s in BUILD_STATES if TEST in s] - - else: - build_states = BUILD_STATES - - if fle_1 and fle_2: - raise ValueError("Cannot specify FLE-1 and FLE-2 at the same time.") - - for proj in file_map.keys(): - if fle_2 and FLE_2 not in proj: - continue - elif fle_1 and FLE_2 in proj: - continue - - build_projects(proj, build_states, skip_format) - - -if __name__ == "__main__": - build_apps() diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/go.mod b/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/go.mod deleted file mode 100644 index 6d3979e8587..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.10.0-beta1 -) diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/main.go b/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/aws/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/go.mod b/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/go.mod deleted file mode 100644 index 6d3979e8587..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.10.0-beta1 -) diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/main.go b/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/azure/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/go.mod b/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/go.mod deleted file mode 100644 index 6d3979e8587..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.10.0-beta1 -) diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/main.go b/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/gcp/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/go.mod b/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/go.mod deleted file mode 100644 index 6d3979e8587..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.10.0-beta1 -) diff --git a/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/main.go b/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go-fle-2/local/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/go/aws/reader/go.mod b/source/includes/sample_apps/csfle/build/go/aws/reader/go.mod deleted file mode 100644 index b4e98411e42..00000000000 --- a/source/includes/sample_apps/csfle/build/go/aws/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.7.2 -) diff --git a/source/includes/sample_apps/csfle/build/go/aws/reader/main.go b/source/includes/sample_apps/csfle/build/go/aws/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go/aws/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/go/azure/reader/go.mod b/source/includes/sample_apps/csfle/build/go/azure/reader/go.mod deleted file mode 100644 index b4e98411e42..00000000000 --- a/source/includes/sample_apps/csfle/build/go/azure/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.7.2 -) diff --git a/source/includes/sample_apps/csfle/build/go/azure/reader/main.go b/source/includes/sample_apps/csfle/build/go/azure/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go/azure/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/go/gcp/reader/go.mod b/source/includes/sample_apps/csfle/build/go/gcp/reader/go.mod deleted file mode 100644 index b4e98411e42..00000000000 --- a/source/includes/sample_apps/csfle/build/go/gcp/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.7.2 -) diff --git a/source/includes/sample_apps/csfle/build/go/gcp/reader/main.go b/source/includes/sample_apps/csfle/build/go/gcp/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go/gcp/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/go/local/reader/go.mod b/source/includes/sample_apps/csfle/build/go/local/reader/go.mod deleted file mode 100644 index b4e98411e42..00000000000 --- a/source/includes/sample_apps/csfle/build/go/local/reader/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.7.2 -) diff --git a/source/includes/sample_apps/csfle/build/go/local/reader/main.go b/source/includes/sample_apps/csfle/build/go/local/reader/main.go deleted file mode 100644 index 9fc1b67bba5..00000000000 --- a/source/includes/sample_apps/csfle/build/go/local/reader/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/pom.xml b/source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/pom.xml deleted file mode 100644 index 0df50459024..00000000000 --- a/source/includes/sample_apps/csfle/build/java-fle-2/aws/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-QE-guide - Java-QE-guide-AWS - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.7.0-beta0 - - - - org.mongodb - mongodb-crypt - 1.5.0-rc1 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/pom.xml b/source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/pom.xml deleted file mode 100644 index 5582c137221..00000000000 --- a/source/includes/sample_apps/csfle/build/java-fle-2/azure/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-QE-guide - Java-QE-guide-Azure - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.7.0-beta0 - - - - org.mongodb - mongodb-crypt - 1.5.0-rc1 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/pom.xml b/source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/pom.xml deleted file mode 100644 index b76aeafecc9..00000000000 --- a/source/includes/sample_apps/csfle/build/java-fle-2/gcp/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-QE-guide - Java-QE-guide-GCP - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.7.0-beta0 - - - - org.mongodb - mongodb-crypt - 1.5.0-rc1 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/java-fle-2/local/reader/pom.xml b/source/includes/sample_apps/csfle/build/java-fle-2/local/reader/pom.xml deleted file mode 100644 index cbe36147903..00000000000 --- a/source/includes/sample_apps/csfle/build/java-fle-2/local/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-QE-guide - Java-QE-guide-Local - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.7.0-beta0 - - - - org.mongodb - mongodb-crypt - 1.5.0-rc1 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/java/aws/reader/pom.xml b/source/includes/sample_apps/csfle/build/java/aws/reader/pom.xml deleted file mode 100644 index 38ec497cfec..00000000000 --- a/source/includes/sample_apps/csfle/build/java/aws/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-CSFLE-guide - Java-CSFLE-guide-AWS - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.4.0 - - - - org.mongodb - mongodb-crypt - 1.4.0 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/java/azure/reader/pom.xml b/source/includes/sample_apps/csfle/build/java/azure/reader/pom.xml deleted file mode 100644 index 444f286674a..00000000000 --- a/source/includes/sample_apps/csfle/build/java/azure/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-CSFLE-guide - Java-CSFLE-guide-Azure - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.4.0 - - - - org.mongodb - mongodb-crypt - 1.4.0 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/java/gcp/reader/pom.xml b/source/includes/sample_apps/csfle/build/java/gcp/reader/pom.xml deleted file mode 100644 index 68ec1b40545..00000000000 --- a/source/includes/sample_apps/csfle/build/java/gcp/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-CSFLE-guide - Java-CSFLE-guide-GCP - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.4.0 - - - - org.mongodb - mongodb-crypt - 1.4.0 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/java/local/reader/pom.xml b/source/includes/sample_apps/csfle/build/java/local/reader/pom.xml deleted file mode 100644 index e0f774b3a9f..00000000000 --- a/source/includes/sample_apps/csfle/build/java/local/reader/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - Java-CSFLE-guide - Java-CSFLE-guide-Local - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.4.0 - - - - org.mongodb - mongodb-crypt - 1.4.0 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/aws/reader/package.json b/source/includes/sample_apps/csfle/build/node-fle-2/aws/reader/package.json deleted file mode 100644 index 73b43acca7e..00000000000 --- a/source/includes/sample_apps/csfle/build/node-fle-2/aws/reader/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "mongodb": "^4.6.0-alpha.0", - "mongodb-client-encryption": "^2.2.0-alpha.0" - } -} diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/azure/reader/package.json b/source/includes/sample_apps/csfle/build/node-fle-2/azure/reader/package.json deleted file mode 100644 index 73b43acca7e..00000000000 --- a/source/includes/sample_apps/csfle/build/node-fle-2/azure/reader/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "mongodb": "^4.6.0-alpha.0", - "mongodb-client-encryption": "^2.2.0-alpha.0" - } -} diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/gcp/reader/package.json b/source/includes/sample_apps/csfle/build/node-fle-2/gcp/reader/package.json deleted file mode 100644 index 73b43acca7e..00000000000 --- a/source/includes/sample_apps/csfle/build/node-fle-2/gcp/reader/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "mongodb": "^4.6.0-alpha.0", - "mongodb-client-encryption": "^2.2.0-alpha.0" - } -} diff --git a/source/includes/sample_apps/csfle/build/node-fle-2/local/reader/package.json b/source/includes/sample_apps/csfle/build/node-fle-2/local/reader/package.json deleted file mode 100644 index 73b43acca7e..00000000000 --- a/source/includes/sample_apps/csfle/build/node-fle-2/local/reader/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "mongodb": "^4.6.0-alpha.0", - "mongodb-client-encryption": "^2.2.0-alpha.0" - } -} diff --git a/source/includes/sample_apps/csfle/build/node/aws/reader/package.json b/source/includes/sample_apps/csfle/build/node/aws/reader/package.json deleted file mode 100644 index b00a56aff6d..00000000000 --- a/source/includes/sample_apps/csfle/build/node/aws/reader/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "csfle", - "version": "1.0.0", - "description": "A sample implementation of field level encryption in MongoDB, meant to accompany the CSFLE guide at https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide/", - "main": "clients.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mongodb-university/csfle-guides.git" - }, - "author": "Developer Education Team", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/mongodb-university/csfle-guides/issues" - }, - "homepage": "https://github.com/mongodb-university/csfle-guides#readme", - "dependencies": { - "dotenv": "^8.2.0", - "mongodb": "^4.1.1", - "mongodb-client-encryption": "1.2.6" - }, - "prettier": { - "semi": true - }, - "devDependencies": { - "eslint": "^7.15.0", - "prettier": "^2.2.1" - } -} diff --git a/source/includes/sample_apps/csfle/build/node/azure/reader/package.json b/source/includes/sample_apps/csfle/build/node/azure/reader/package.json deleted file mode 100644 index b00a56aff6d..00000000000 --- a/source/includes/sample_apps/csfle/build/node/azure/reader/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "csfle", - "version": "1.0.0", - "description": "A sample implementation of field level encryption in MongoDB, meant to accompany the CSFLE guide at https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide/", - "main": "clients.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mongodb-university/csfle-guides.git" - }, - "author": "Developer Education Team", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/mongodb-university/csfle-guides/issues" - }, - "homepage": "https://github.com/mongodb-university/csfle-guides#readme", - "dependencies": { - "dotenv": "^8.2.0", - "mongodb": "^4.1.1", - "mongodb-client-encryption": "1.2.6" - }, - "prettier": { - "semi": true - }, - "devDependencies": { - "eslint": "^7.15.0", - "prettier": "^2.2.1" - } -} diff --git a/source/includes/sample_apps/csfle/build/node/gcp/reader/package.json b/source/includes/sample_apps/csfle/build/node/gcp/reader/package.json deleted file mode 100644 index b00a56aff6d..00000000000 --- a/source/includes/sample_apps/csfle/build/node/gcp/reader/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "csfle", - "version": "1.0.0", - "description": "A sample implementation of field level encryption in MongoDB, meant to accompany the CSFLE guide at https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide/", - "main": "clients.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mongodb-university/csfle-guides.git" - }, - "author": "Developer Education Team", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/mongodb-university/csfle-guides/issues" - }, - "homepage": "https://github.com/mongodb-university/csfle-guides#readme", - "dependencies": { - "dotenv": "^8.2.0", - "mongodb": "^4.1.1", - "mongodb-client-encryption": "1.2.6" - }, - "prettier": { - "semi": true - }, - "devDependencies": { - "eslint": "^7.15.0", - "prettier": "^2.2.1" - } -} diff --git a/source/includes/sample_apps/csfle/build/node/local/reader/package.json b/source/includes/sample_apps/csfle/build/node/local/reader/package.json deleted file mode 100644 index b00a56aff6d..00000000000 --- a/source/includes/sample_apps/csfle/build/node/local/reader/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "csfle", - "version": "1.0.0", - "description": "A sample implementation of field level encryption in MongoDB, meant to accompany the CSFLE guide at https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide/", - "main": "clients.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mongodb-university/csfle-guides.git" - }, - "author": "Developer Education Team", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/mongodb-university/csfle-guides/issues" - }, - "homepage": "https://github.com/mongodb-university/csfle-guides#readme", - "dependencies": { - "dotenv": "^8.2.0", - "mongodb": "^4.1.1", - "mongodb-client-encryption": "1.2.6" - }, - "prettier": { - "semi": true - }, - "devDependencies": { - "eslint": "^7.15.0", - "prettier": "^2.2.1" - } -} diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/aws/reader/requirements.sh b/source/includes/sample_apps/csfle/build/python-fle-2/aws/reader/requirements.sh deleted file mode 100644 index e19197a4386..00000000000 --- a/source/includes/sample_apps/csfle/build/python-fle-2/aws/reader/requirements.sh +++ /dev/null @@ -1,3 +0,0 @@ -pip install -e git+https://github.com/mongodb/mongo-python-driver.git@master#egg=pymongo -git clone git@github.com:mongodb/libmongocrypt.git -python -m pip install ./libmongocrypt/bindings/python diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/azure/reader/requirements.sh b/source/includes/sample_apps/csfle/build/python-fle-2/azure/reader/requirements.sh deleted file mode 100644 index e19197a4386..00000000000 --- a/source/includes/sample_apps/csfle/build/python-fle-2/azure/reader/requirements.sh +++ /dev/null @@ -1,3 +0,0 @@ -pip install -e git+https://github.com/mongodb/mongo-python-driver.git@master#egg=pymongo -git clone git@github.com:mongodb/libmongocrypt.git -python -m pip install ./libmongocrypt/bindings/python diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/gcp/reader/requirements.sh b/source/includes/sample_apps/csfle/build/python-fle-2/gcp/reader/requirements.sh deleted file mode 100644 index e19197a4386..00000000000 --- a/source/includes/sample_apps/csfle/build/python-fle-2/gcp/reader/requirements.sh +++ /dev/null @@ -1,3 +0,0 @@ -pip install -e git+https://github.com/mongodb/mongo-python-driver.git@master#egg=pymongo -git clone git@github.com:mongodb/libmongocrypt.git -python -m pip install ./libmongocrypt/bindings/python diff --git a/source/includes/sample_apps/csfle/build/python-fle-2/local/reader/requirements.sh b/source/includes/sample_apps/csfle/build/python-fle-2/local/reader/requirements.sh deleted file mode 100644 index e19197a4386..00000000000 --- a/source/includes/sample_apps/csfle/build/python-fle-2/local/reader/requirements.sh +++ /dev/null @@ -1,3 +0,0 @@ -pip install -e git+https://github.com/mongodb/mongo-python-driver.git@master#egg=pymongo -git clone git@github.com:mongodb/libmongocrypt.git -python -m pip install ./libmongocrypt/bindings/python diff --git a/source/includes/sample_apps/csfle/build/python/aws/reader/requirements.txt b/source/includes/sample_apps/csfle/build/python/aws/reader/requirements.txt deleted file mode 100644 index 7dd5868d73b..00000000000 --- a/source/includes/sample_apps/csfle/build/python/aws/reader/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pymongo -pymongocrypt diff --git a/source/includes/sample_apps/csfle/build/python/azure/reader/requirements.txt b/source/includes/sample_apps/csfle/build/python/azure/reader/requirements.txt deleted file mode 100644 index 7dd5868d73b..00000000000 --- a/source/includes/sample_apps/csfle/build/python/azure/reader/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pymongo -pymongocrypt diff --git a/source/includes/sample_apps/csfle/build/python/gcp/reader/requirements.txt b/source/includes/sample_apps/csfle/build/python/gcp/reader/requirements.txt deleted file mode 100644 index 7dd5868d73b..00000000000 --- a/source/includes/sample_apps/csfle/build/python/gcp/reader/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pymongo -pymongocrypt diff --git a/source/includes/sample_apps/csfle/build/python/local/reader/requirements.txt b/source/includes/sample_apps/csfle/build/python/local/reader/requirements.txt deleted file mode 100644 index 7dd5868d73b..00000000000 --- a/source/includes/sample_apps/csfle/build/python/local/reader/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pymongo -pymongocrypt diff --git a/source/includes/sample_apps/csfle/const.py b/source/includes/sample_apps/csfle/const.py deleted file mode 100644 index 8d0a1c25a00..00000000000 --- a/source/includes/sample_apps/csfle/const.py +++ /dev/null @@ -1,139 +0,0 @@ -import os - -FLE_2 = "-fle-2" -BUILD_DIR = "build" -PYTHON = "python" -PYTHON_FLE_2 = f"python{FLE_2}" -JAVA = "java" -JAVA_FLE_2 = f"java{FLE_2}" -CSHARP = "dotnet" -CSHARP_FLE_2 = f"dotnet{FLE_2}" -NODE = "node" -NODE_FLE_2 = f"node{FLE_2}" -DEK = "dek" -GO = "go" -GO_FLE_2 = f"go{FLE_2}" -FLE_2_LANGS = [NODE_FLE_2, PYTHON_FLE_2, GO_FLE_2, JAVA_FLE_2, CSHARP_FLE_2] -FLE_1_LANGS = [NODE, PYTHON, GO, JAVA, CSHARP] - -INSERT = "insert" -EXTRA_FILES = "extra_files" -FORMAT_COMMAND = "format" -FILE_MAP = { - PYTHON: { - DEK: "make_data_key.py", - INSERT: "insert_encrypted_document.py", - EXTRA_FILES: ["requirements.txt"], - FORMAT_COMMAND: f"black {os.path.join(BUILD_DIR,'*','*','*','*.py')}", - }, - PYTHON_FLE_2: { - DEK: "make_data_key.py", - INSERT: "insert_encrypted_document.py", - EXTRA_FILES: ["requirements.sh"], - FORMAT_COMMAND: f"black {os.path.join(BUILD_DIR,'*','*','*','*.py')}", - }, - JAVA: { - DEK: os.path.join( - "src", "main", "java", "com", "mongodb", "csfle", "makeDataKey.java" - ), - INSERT: os.path.join( - "src", - "main", - "java", - "com", - "mongodb", - "csfle", - "insertEncryptedDocument.java", - ), - EXTRA_FILES: ["pom.xml"], - }, - JAVA_FLE_2: { - DEK: os.path.join( - "src", "main", "java", "com", "mongodb", "csfle", "makeDataKey.java" - ), - INSERT: os.path.join( - "src", - "main", - "java", - "com", - "mongodb", - "csfle", - "insertEncryptedDocument.java", - ), - EXTRA_FILES: ["pom.xml"], - }, - CSHARP: { - DEK: "CSFLE/MakeDataKey.cs", - INSERT: "CSFLE/InsertEncryptedDocument.cs", - EXTRA_FILES: ["CSFLE/CSFLE.csproj", "CSFLE/Program.cs"], - FORMAT_COMMAND: f'find ./{BUILD_DIR} -name "*.csproj" | xargs -n1 dotnet format', - }, - CSHARP_FLE_2: { - DEK: "QueryableEncryption/MakeDataKey.cs", - INSERT: "QueryableEncryption/InsertEncryptedDocument.cs", - EXTRA_FILES: [ - "QueryableEncryption/QueryableEncryption.csproj", - "QueryableEncryption/Program.cs", - ], - FORMAT_COMMAND: f'find ./{BUILD_DIR} -name "*.csproj" | xargs -n1 dotnet format', - }, - NODE: { - DEK: "make_data_key.js", - INSERT: "insert_encrypted_document.js", - EXTRA_FILES: ["package.json"], - FORMAT_COMMAND: f"prettier --write {BUILD_DIR}", - }, - NODE_FLE_2: { - DEK: "make_data_key.js", - INSERT: "insert_encrypted_document.js", - EXTRA_FILES: ["package.json"], - FORMAT_COMMAND: f"prettier --write {BUILD_DIR}", - }, - GO: { - DEK: "make-data-key.go", - INSERT: "insert-encrypted-document.go", - EXTRA_FILES: ["go.mod", "main.go"], - FORMAT_COMMAND: f"gofmt -l -w -s {BUILD_DIR}", - }, - GO_FLE_2: { - DEK: "make-data-key.go", - INSERT: "insert-encrypted-document.go", - EXTRA_FILES: ["go.mod", "main.go"], - FORMAT_COMMAND: f"gofmt -l -w -s {BUILD_DIR}", - }, -} - -DIR_SEPERATOR = "-" -PROD = f"{DIR_SEPERATOR}reader" -TEST = f"{DIR_SEPERATOR}test" -AWS_PROD = f"aws{PROD}" -AWS_TEST = f"aws{TEST}" -GCP_PROD = f"gcp{PROD}" -GCP_TEST = f"gcp{TEST}" -AZURE_PROD = f"azure{PROD}" -AZURE_TEST = f"azure{TEST}" -LOCAL_PROD = f"local{PROD}" -LOCAL_TEST = f"local{TEST}" -BUILD_STATES = [ - AWS_PROD, - AWS_TEST, - AZURE_PROD, - AZURE_TEST, - GCP_PROD, - GCP_TEST, - LOCAL_PROD, - LOCAL_TEST, -] - -MAKE_KEY = lambda project: FILE_MAP[project][DEK] -MAKE_INSERT = lambda project: FILE_MAP[project][INSERT] -GET_EXTRA_FILES = lambda project: FILE_MAP[project].get(EXTRA_FILES) -BUILD_FILES = (MAKE_KEY, MAKE_INSERT) - -BLUEHAWK = "bluehawk" -BLUEHAWK_HELP = f"""Unable to find {BLUEHAWK}. Run -the following command to install {BLUEHAWK}: - -npm install -g {BLUEHAWK} - -""" diff --git a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption.sln b/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption.sln deleted file mode 100644 index 9f072854715..00000000000 --- a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29424.173 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QueryableEncryption", "QueryableEncryption\QueryableEncryption.csproj", "{BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EBFBC79F-4FB9-4693-9777-1722F2A17939} - EndGlobalSection -EndGlobal diff --git a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/InsertEncryptedDocument.cs b/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/InsertEncryptedDocument.cs deleted file mode 100644 index 5ac2f3b63b6..00000000000 --- a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/InsertEncryptedDocument.cs +++ /dev/null @@ -1,250 +0,0 @@ -using System; -// :state-start: local-test local-reader -using System.IO; -// :state-end: -using System.Collections.Generic; -using MongoDB.Driver; -using MongoDB.Bson; -using MongoDB.Driver.Encryption; - -namespace QueryableEncryption -{ - internal static class InsertEncryptedDocument - { - public static void Insert() - { - // :state-start: local-reader azure-reader aws-reader gcp-reader - // :uncomment-start: - //var connectionString = ""; - // :uncomment-end: - // :state-end: - // :state-start: local-test azure-test aws-test gcp-test - var connectionString = Environment.GetEnvironmentVariable("MONGODB_URI"); - // :state-end: - // start-key-vault - var keyVaultNamespace = CollectionNamespace.FromFullName("encryption.__keyVault"); - // end-key-vault - - // start-kmsproviders - var kmsProviders = new Dictionary>(); - // :state-start: local-reader local-test - const string provider = "local"; - const string localMasterKeyPath = "master-key.txt"; - var localMasterKeyBase64Read = File.ReadAllText(localMasterKeyPath); - var localMasterKeyBytes = Convert.FromBase64String(localMasterKeyBase64Read); - var localOptions = new Dictionary - { - {"key", localMasterKeyBytes} - }; - kmsProviders.Add(provider, localOptions); - // :state-end: - // :state-uncomment-start: aws-reader - //const string provider = "aws"; - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", "" }, - // { "secretAccessKey", "" } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //const string provider = "aws"; - //var awsAccessKey = Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID"); - //var awsSecretAccessKey = Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY"); - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", awsAccessKey }, - // { "secretAccessKey", awsSecretAccessKey } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //const string provider = "azure"; - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", "" }, - // { "clientId", "" }, - // { "clientSecret", "" }, - //}; - //kmsProviders.Add(provider, azureKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //const string provider = "azure"; - //var azureTenantId = Environment.GetEnvironmentVariable("AZURE_TENANT_ID"); - //var azureClientId = Environment.GetEnvironmentVariable("AZURE_CLIENT_ID"); - //var azureClientSecret = Environment.GetEnvironmentVariable("AZURE_CLIENT_SECRET"); - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", azureTenantId }, - // { "clientId", azureClientId }, - // { "clientSecret", azureClientSecret }, - //}; - //kmsProviders.Add(provider, azureKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //const string provider = "gcp"; - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", "" }, - // { "email", "" }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //const string provider = "gcp"; - //var gcpPrivateKey = Environment.GetEnvironmentVariable("GCP_PRIVATE_KEY"); - //var gcpEmail = Environment.GetEnvironmentVariable("GCP_EMAIL"); - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", gcpPrivateKey }, - // { "email", gcpEmail }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // :state-uncomment-end: - // end-kmsproviders - - // start-schema - var regularClient = new MongoClient(connectionString); - var keyVaultCollection = regularClient.GetDatabase(keyVaultNamespace.DatabaseNamespace.DatabaseName) - .GetCollection(keyVaultNamespace.CollectionName); - - BsonBinaryData GetKeyId(string altName) - { - var filter = Builders.Filter.Eq("keyAltNames", altName); - return keyVaultCollection.Find(filter).First()["_id"].AsBsonBinaryData; - } - - var dataKeyId1 = GetKeyId("dataKey1"); - var dataKeyId2 = GetKeyId("dataKey2"); - var dataKeyId3 = GetKeyId("dataKey3"); - var dataKeyId4 = GetKeyId("dataKey4"); - - var encryptedCollectionNamespace = CollectionNamespace.FromFullName("medicalRecords.patients"); - var encryptedFieldsMap = new Dictionary - { - { - encryptedCollectionNamespace.FullName, new BsonDocument - { - { - "fields", new BsonArray - { - new BsonDocument - { - {"keyId", dataKeyId1}, - {"path", new BsonString("patientId")}, - {"bsonType", new BsonString("int")}, - { - "queries", new BsonDocument - { - {"queryType", new BsonString("equality")} - } - } - }, - new BsonDocument - { - {"keyId", dataKeyId2}, - {"path", new BsonString("medications")}, - {"bsonType", new BsonString("array")}, - }, - new BsonDocument - { - {"keyId", dataKeyId3}, - {"path", new BsonString("patientRecord.ssn")}, - {"bsonType", new BsonString("string")}, - { - "queries", new BsonDocument - { - {"queryType", new BsonString("equality")} - } - } - }, - new BsonDocument - { - {"keyId", dataKeyId4}, - {"path", new BsonString("patientRecord.billing")}, - {"bsonType", new BsonString("object")}, - }, - } - } - } - } - }; - // end-schema - - // start-extra-options - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //var extraOptions = new Dictionary() - //{ - // { "cryptSharedLibPath", "" }, - //}; - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - var extraOptions = new Dictionary() - { - {"cryptSharedLibPath", Environment.GetEnvironmentVariable("SHARED_LIB_PATH")}, - }; - // :state-end: - // end-extra-options - - // start-client - var clientSettings = MongoClientSettings.FromConnectionString(connectionString); - var autoEncryptionOptions = new AutoEncryptionOptions( - keyVaultNamespace, - kmsProviders, - encryptedFieldsMap: encryptedFieldsMap, - extraOptions: extraOptions); - clientSettings.AutoEncryptionOptions = autoEncryptionOptions; - var secureClient = new MongoClient(clientSettings); - // end-client - - // start-insert - var sampleDocument = new BsonDocument - { - {"firstName", "Jon"}, - {"lastName", "Doe"}, - {"patientId", 12345678}, - {"address", "157 Electric Ave."}, - { - "medications", new BsonArray - { - new BsonString("Atorvastatin"), - new BsonString("Levothyroxine") - } - }, - { - "patientRecord", new BsonDocument - { - {"ssn", new BsonString("987-65-4320")}, - { - "billing", new BsonDocument - { - {"type", new BsonString("Visa")}, - {"number", "4111111111111111"} - } - } - } - } - }; - - var secureCollection = secureClient.GetDatabase(encryptedCollectionNamespace.DatabaseNamespace.DatabaseName) - .GetCollection(encryptedCollectionNamespace.CollectionName); - secureCollection.InsertOne(sampleDocument); - // end-insert - - // start-find - Console.WriteLine("Finding a document with regular (non-encrypted) client."); - var filter = Builders.Filter.Eq("firstName", "Jon"); - var regularClientEncryptedCollection = regularClient.GetDatabase(encryptedCollectionNamespace.DatabaseNamespace.DatabaseName) - .GetCollection(encryptedCollectionNamespace.CollectionName); - var regularResult = regularClientEncryptedCollection.Find(filter).First(); - Console.WriteLine($"\n{regularResult}\n"); - Console.WriteLine("Finding a document with encrypted client, searching on an encrypted field"); - var encryptedFieldFilter = Builders.Filter.Eq("patientRecord.ssn", "987-65-4320"); - var secureResult = secureCollection.Find(encryptedFieldFilter).First(); - Console.WriteLine($"\n{secureResult}\n"); - // end-find - } - } -} diff --git a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/MakeDataKey.cs b/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/MakeDataKey.cs deleted file mode 100644 index 3548528aedd..00000000000 --- a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/MakeDataKey.cs +++ /dev/null @@ -1,328 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Threading; -using MongoDB.Driver; -using MongoDB.Bson; -using MongoDB.Driver.Encryption; - -namespace QueryableEncryption -{ - internal static class MakeDataKey - { - public static void MakeKey() - { - // :state-start: local-reader local-test - using (var randomNumberGenerator = System.Security.Cryptography.RandomNumberGenerator.Create()) - { - var bytes = new byte[96]; - randomNumberGenerator.GetBytes(bytes); - var localMasterKeyBase64Write = Convert.ToBase64String(bytes); - Console.WriteLine(localMasterKeyBase64Write); - File.WriteAllText("master-key.txt", localMasterKeyBase64Write); - } - // :state-end: - - // start-kmsproviders - var kmsProviders = new Dictionary>(); - // :state-start: local-reader local-test - const string provider = "local"; - var localMasterKeyBase64Read = File.ReadAllText("master-key.txt"); - var localMasterKeyBytes = Convert.FromBase64String(localMasterKeyBase64Read); - var localOptions = new Dictionary - { - {"key", localMasterKeyBytes} - }; - kmsProviders.Add(provider, localOptions); - // :state-end: - // :state-uncomment-start: aws-reader - //const string provider = "aws"; - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", "" }, - // { "secretAccessKey", "" } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //const string provider = "aws"; - //var awsAccessKey = Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID"); - //var awsSecretAccessKey = Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY"); - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", awsAccessKey }, - // { "secretAccessKey", awsSecretAccessKey } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //const string provider = "azure"; - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", "" }, - // { "clientId", "" }, - // { "clientSecret", "" }, - //}; - //kmsProviders.Add(provider, azureKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //const string provider = "azure"; - //var azureTenantId = Environment.GetEnvironmentVariable("AZURE_TENANT_ID"); - //var azureClientId = Environment.GetEnvironmentVariable("AZURE_CLIENT_ID"); - //var azureClientSecret = Environment.GetEnvironmentVariable("AZURE_CLIENT_SECRET"); - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", azureTenantId }, - // { "clientId", azureClientId }, - // { "clientSecret", azureClientSecret }, - //}; - //kmsProviders.Add(provider, azureKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //const string provider = "gcp"; - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", "" }, - // { "email", "" }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //const string provider = "gcp"; - //var gcpPrivateKey = Environment.GetEnvironmentVariable("GCP_PRIVATE_KEY"); - //var gcpEmail = Environment.GetEnvironmentVariable("GCP_EMAIL"); - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", gcpPrivateKey }, - // { "email", gcpEmail }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // - //var gcpDataKeyProjectId = Environment.GetEnvironmentVariable("GCP_PROJECT_ID"); - //var gcpDataKeyLocation = Environment.GetEnvironmentVariable("GCP_LOCATION"); - //var gcpDataKeyKeyRing = Environment.GetEnvironmentVariable("GCP_KEY_RING"); - //var gcpDataKeyKeyName = Environment.GetEnvironmentVariable("GCP_KEY_NAME"); - // :state-uncomment-end: - // end-kmsproviders - - // :state-start: aws-reader aws-test gcp-reader gcp-test azure-reader azure-test - // start-datakeyopts - DataKeyOptions GetDataKeyOptions(List altNames) - { - var dataKeyOptions = new DataKeyOptions(); // :remove: - // :state-uncomment-start: aws-reader - //var dataKeyOptions = new DataKeyOptions( - // alternateKeyNames: altNames, - // masterKey: new BsonDocument - // { - // { "region", "" }, - // { "key", "" }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //var awsKeyARN = Environment.GetEnvironmentVariable("AWS_KEY_ARN"); // e.g. "arn:aws:kms:us-east-2:111122223333:alias/test-key" - //var awsKeyRegion = Environment.GetEnvironmentVariable("AWS_KEY_REGION"); - //var dataKeyOptions = new DataKeyOptions( - // alternateKeyNames: altNames, - // masterKey: new BsonDocument - // { - // { "region", awsKeyRegion }, - // { "key", awsKeyARN }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //kmsProviders.Add(provider, azureKmsOptions); - //var dataKeyOptions = new DataKeyOptions( - // alternateKeyNames: altNames, - // masterKey: new BsonDocument - // { - // { "keyName", "" }, - // { "keyVaultEndpoint", "" }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //var azureKeyName = Environment.GetEnvironmentVariable("AZURE_KEY_NAME"); - //var azureKeyVaultEndpoint = Environment.GetEnvironmentVariable("AZURE_KEY_VAULT_ENDPOINT"); // typically .vault.azure.net - //var dataKeyOptions = new DataKeyOptions( - // alternateKeyNames: altNames, - // masterKey: new BsonDocument - // { - // { "keyName", azureKeyName }, - // { "keyVaultEndpoint", azureKeyVaultEndpoint }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //var dataKeyOptions = new DataKeyOptions( - // alternateKeyNames: altNames, - // masterKey: new BsonDocument - // { - // { "projectId", "" }, - // { "location", "" } , - // { "keyRing", "" }, - // { "keyName", "" }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //var dataKeyOptions = new DataKeyOptions( - // alternateKeyNames: altNames, - // masterKey: new BsonDocument - // { - // { "projectId", gcpDataKeyProjectId }, - // { "location", gcpDataKeyLocation } , - // { "keyRing", gcpDataKeyKeyRing }, - // { "keyName", gcpDataKeyKeyName }, - // }); - // :state-uncomment-end: - return dataKeyOptions; - } - // end-datakeyopts - // :state-end: - - // start-create-index - // :state-start: local-reader azure-reader aws-reader gcp-reader - // :uncomment-start: - //var connectionString = ""; - // :uncomment-end: - // :state-end: - // :state-start: local-test azure-test aws-test gcp-test - var connectionString = Environment.GetEnvironmentVariable("MONGODB_URI"); - // :state-end: - // start-create-dek - var keyVaultNamespace = CollectionNamespace.FromFullName("encryption.__keyVault"); - var keyVaultClient = new MongoClient(connectionString); - var indexOptions = new CreateIndexOptions - { - Unique = true, - PartialFilterExpression = new BsonDocument - {{"keyAltNames", new BsonDocument {{"$exists", new BsonBoolean(true)}}}} - }; - var builder = Builders.IndexKeys; - var indexKeysDocument = builder.Ascending("keyAltNames"); - var indexModel = new CreateIndexModel(indexKeysDocument, indexOptions); - var keyVaultDatabase = keyVaultClient.GetDatabase(keyVaultNamespace.DatabaseNamespace.DatabaseName); - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - keyVaultDatabase.DropCollection(keyVaultNamespace.CollectionName); - var keyVaultCollection = keyVaultDatabase.GetCollection(keyVaultNamespace.CollectionName); - keyVaultCollection.Indexes.CreateOne(indexModel); - // end-create-index - - // start-create-dek - var clientEncryptionOptions = new ClientEncryptionOptions( - keyVaultClient, - keyVaultNamespace, - kmsProviders); - var clientEncryption = new ClientEncryption(clientEncryptionOptions); - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //var dataKeyOptions1 = GetDataKeyOptions(new List { "dataKey1" }); - //var dataKeyOptions2 = GetDataKeyOptions(new List { "dataKey2" }); - //var dataKeyOptions3 = GetDataKeyOptions(new List { "dataKey3" }); - //var dataKeyOptions4 = GetDataKeyOptions(new List { "dataKey4" }); - // :uncomment-end: - // :state-end: - // :state-start: local-test local-reader - var dataKeyOptions1 = new DataKeyOptions(alternateKeyNames : new List { "dataKey1" }); - var dataKeyOptions2 = new DataKeyOptions(alternateKeyNames : new List { "dataKey2" }); - var dataKeyOptions3 = new DataKeyOptions(alternateKeyNames : new List { "dataKey3" }); - var dataKeyOptions4 = new DataKeyOptions(alternateKeyNames : new List { "dataKey4" }); - // :state-end: - - - BsonBinaryData CreateKeyGetID(DataKeyOptions options){ - var dateKeyGuid = clientEncryption.CreateDataKey(provider, options, CancellationToken.None); - return new BsonBinaryData(dateKeyGuid, GuidRepresentation.Standard); - } - - var dataKeyId1 = CreateKeyGetID(dataKeyOptions1); - var dataKeyId2 = CreateKeyGetID(dataKeyOptions2); - var dataKeyId3 = CreateKeyGetID(dataKeyOptions3); - var dataKeyId4 = CreateKeyGetID(dataKeyOptions4); - // end-create-dek - - // start-create-enc-collection - var encryptedCollectionNamespace = CollectionNamespace.FromFullName("medicalRecords.patients"); - var encryptedFieldsMap = new Dictionary - { - { - encryptedCollectionNamespace.FullName, new BsonDocument - { - { - "fields", new BsonArray - { - new BsonDocument - { - {"keyId", dataKeyId1}, - {"path", new BsonString("patientId")}, - {"bsonType", new BsonString("int")}, - { - "queries", new BsonDocument - { - {"queryType", new BsonString("equality")} - } - } - }, - new BsonDocument - { - {"keyId", dataKeyId2}, - {"path", new BsonString("medications")}, - {"bsonType", new BsonString("array")}, - }, - new BsonDocument - { - {"keyId", dataKeyId3}, - {"path", new BsonString("patientRecord.ssn")}, - {"bsonType", new BsonString("string")}, - { - "queries", new BsonDocument - { - {"queryType", new BsonString("equality")} - } - } - }, - new BsonDocument - { - {"keyId", dataKeyId4}, - {"path", new BsonString("patientRecord.billing")}, - {"bsonType", new BsonString("object")}, - }, - } - } - } - } - }; - - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //var extraOptions = new Dictionary() - //{ - // { "cryptSharedLibPath", "" }, - //}; - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - var extraOptions = new Dictionary() - { - {"cryptSharedLibPath", Environment.GetEnvironmentVariable("SHARED_LIB_PATH")}, - }; - // :state-end: - - var autoEncryptionOptions = new AutoEncryptionOptions( - keyVaultNamespace, - kmsProviders, - encryptedFieldsMap: encryptedFieldsMap, - extraOptions: extraOptions); - - var clientSettings = MongoClientSettings.FromConnectionString(connectionString); - clientSettings.AutoEncryptionOptions = autoEncryptionOptions; - var secureClient = new MongoClient(clientSettings); - var encryptedDatabase = secureClient.GetDatabase(encryptedCollectionNamespace.DatabaseNamespace.DatabaseName); - // Drop the encrypted collection in case you created this collection - // in a previous run of this application. - encryptedDatabase.DropCollection(encryptedCollectionNamespace.CollectionName); - encryptedDatabase.CreateCollection(encryptedCollectionNamespace.CollectionName); - Console.WriteLine("Created encrypted collection!"); - // end-create-enc-collection - } - } -} diff --git a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/Program.cs b/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/Program.cs deleted file mode 100644 index 8c4032cf705..00000000000 --- a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/Program.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace QueryableEncryption -{ - internal static class Run - { - private static void Main(string[] args) - { - MakeDataKey.MakeKey(); - InsertEncryptedDocument.Insert(); - } - } -} \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/QueryableEncryption.csproj b/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/QueryableEncryption.csproj deleted file mode 100644 index b1715731179..00000000000 --- a/source/includes/sample_apps/csfle/dotnet-fle-2/QueryableEncryption/QueryableEncryption.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - netcoreapp6.0 - - - - - - - diff --git a/source/includes/sample_apps/csfle/dotnet-fle-2/README.md b/source/includes/sample_apps/csfle/dotnet-fle-2/README.md deleted file mode 100644 index ad8ac203cf8..00000000000 --- a/source/includes/sample_apps/csfle/dotnet-fle-2/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Dotnet sample -applications that use QE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Dotnet applications, run the following command from the parent of this directory: - - python build.py --project dotnet-fle-2 - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestDotNetFLE2 diff --git a/source/includes/sample_apps/csfle/dotnet/CSFLE.sln b/source/includes/sample_apps/csfle/dotnet/CSFLE.sln deleted file mode 100644 index b206ee0a0a6..00000000000 --- a/source/includes/sample_apps/csfle/dotnet/CSFLE.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29424.173 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSFLE", "CSFLE\CSFLE.csproj", "{BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB3F45A1-2591-4E9A-AAB4-CD4B2DE1D665}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EBFBC79F-4FB9-4693-9777-1722F2A17939} - EndGlobalSection -EndGlobal diff --git a/source/includes/sample_apps/csfle/dotnet/CSFLE/CSFLE.csproj b/source/includes/sample_apps/csfle/dotnet/CSFLE/CSFLE.csproj deleted file mode 100644 index 968da5e893e..00000000000 --- a/source/includes/sample_apps/csfle/dotnet/CSFLE/CSFLE.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - netcoreapp6.0 - - - - - - - diff --git a/source/includes/sample_apps/csfle/dotnet/CSFLE/InsertEncryptedDocument.cs b/source/includes/sample_apps/csfle/dotnet/CSFLE/InsertEncryptedDocument.cs deleted file mode 100644 index d5ca4bce21b..00000000000 --- a/source/includes/sample_apps/csfle/dotnet/CSFLE/InsertEncryptedDocument.cs +++ /dev/null @@ -1,329 +0,0 @@ -using System; -// :state-start: local-test local-reader -using System.IO; -// :state-end: -using System.Collections.Generic; -using MongoDB.Driver; -using MongoDB.Bson; -using MongoDB.Driver.Encryption; - -namespace Insert -{ - - class InsertEncryptedDocument - { - - public static void Insert() - { - // :state-start: local-reader azure-reader aws-reader gcp-reader - // :uncomment-start: - //var connectionString = ""; - // :uncomment-end: - // :state-end: - // :state-start: local-test azure-test aws-test gcp-test - var connectionString = Environment.GetEnvironmentVariable("MONGODB_URI"); - // :state-end: - // start-key-vault - var keyVaultNamespace = CollectionNamespace.FromFullName("encryption.__keyVault"); - // end-key-vault - var coll = "patients"; - var db = "medicalRecords"; - var db_namespace = $"{db}.{coll}"; - - // start-kmsproviders - var kmsProviders = new Dictionary>(); - // :state-start: local-reader local-test - var provider = "local"; - var localMasterKeyPath = "master-key.txt"; - string localMasterKeyBase64Read = File.ReadAllText(localMasterKeyPath); - var localMasterKeyBytes = Convert.FromBase64String(localMasterKeyBase64Read); - var localOptions = new Dictionary - { - { "key", localMasterKeyBytes } - }; - kmsProviders.Add(provider, localOptions); - // :state-end: - // :state-uncomment-start: aws-reader - //var provider = "aws"; - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", "" }, - // { "secretAccessKey", "" } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //var provider = "aws"; - //var awsAccessKey = Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID"); - //var awsSecretAccessKey = Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY"); - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", awsAccessKey }, - // { "secretAccessKey", awsSecretAccessKey } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //var provider = "azure"; - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", "" }, - // { "clientId", "" }, - // { "clientSecret", "" }, - //}; - //kmsProviders.Add(provider, azureKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //var provider = "azure"; - //var azureTenantId = Environment.GetEnvironmentVariable("AZURE_TENANT_ID"); - //var azureClientId = Environment.GetEnvironmentVariable("AZURE_CLIENT_ID"); - //var azureClientSecret = Environment.GetEnvironmentVariable("AZURE_CLIENT_SECRET"); - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", azureTenantId }, - // { "clientId", azureClientId }, - // { "clientSecret", azureClientSecret }, - //}; - //kmsProviders.Add(provider, azureKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //var provider = "gcp"; - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", "" }, - // { "email", "" }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //var provider = "gcp"; - //var gcpPrivateKey = Environment.GetEnvironmentVariable("GCP_PRIVATE_KEY"); - //var gcpEmail = Environment.GetEnvironmentVariable("GCP_EMAIL"); - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", gcpPrivateKey }, - // { "email", gcpEmail }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // :state-uncomment-end: - // end-kmsproviders - - - // start-schema - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //var keyId = ""; - //var schema = new BsonDocument - //{ - // { "bsonType", "object" }, - // { - // "encryptMetadata", - // new BsonDocument("keyId", new BsonArray(new[] { new BsonBinaryData(Convert.FromBase64String(keyId), BsonBinarySubType.UuidStandard) })) - // }, - // { - // "properties", - // new BsonDocument - // { - // { - // "ssn", new BsonDocument - // { - // { - // "encrypt", new BsonDocument - // { - // { "bsonType", "int" }, - // { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" } - // } - // } - // } - // }, - // { - // "bloodType", new BsonDocument - // { - // { - // "encrypt", new BsonDocument - // { - // { "bsonType", "string" }, - // { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random" } - // } - // } - // } - // }, - // { - // "medicalRecords", new BsonDocument - // { - // { - // "encrypt", new BsonDocument - // { - // { "bsonType", "array" }, - // { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random" } - // } - // } - // } - // }, - // { - // "insurance", new BsonDocument - // { - // { "bsonType", "object" }, - // { - // "properties", new BsonDocument - // { - // { - // "policyNumber", new BsonDocument - // { - // { - // "encrypt", new BsonDocument - // { - // { "bsonType", "int" }, - // { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" } - // } - // } - // } - // } - // } - // } - // } - // } - // } - // } - //}; - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - var schema = new BsonDocument { - { "bsonType", "object" }, - { "encryptMetadata", new BsonDocument{ - { "keyId", "/key-id"} - } - }, - { "properties", new BsonDocument { - { "ssn", new BsonDocument { - { "encrypt", new BsonDocument { - { "bsonType", "int" }, - { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random"} - } - } - } - }, - { "bloodType", new BsonDocument { - { "encrypt" ,new BsonDocument { - { "bsonType", "string" }, - { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random"} - } - } - } - }, - { "medicalRecords", new BsonDocument { - {"encrypt", new BsonDocument { - { "bsonType", "array" }, - { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random"} - } - } - } - }, - { "insurance", new BsonDocument { - { "bsonType", "object" }, - { "properties", new BsonDocument { - { "policyNumber", new BsonDocument { - { "encrypt", new BsonDocument { - { "bsonType", "int" }, - { "algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random"} - } - } - } - } - } - } - } - } - } - } - }; - // :state-end: - var schemaMap = new Dictionary(); - schemaMap.Add(db_namespace, schema); - // end-schema - - // start-extra-options - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //var mongoBinariesPath = ""; - //var extraOptions = new Dictionary() - //{ - // { "mongocryptdSpawnPath", mongoBinariesPath }, - //}; - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - var extraOptions = new Dictionary() - { - { "mongocryptdSpawnPath", Environment.GetEnvironmentVariable("MONGCRYPTD_PATH")}, - }; - // :state-end: - // end-extra-options - - var regularClientSettings = MongoClientSettings.FromConnectionString(connectionString); - var regularClient = new MongoClient(regularClientSettings); - var regularCollection = regularClient.GetDatabase(db).GetCollection(coll); - - // start-client - var clientSettings = MongoClientSettings.FromConnectionString(connectionString); - var autoEncryptionOptions = new AutoEncryptionOptions( - keyVaultNamespace: keyVaultNamespace, - kmsProviders: kmsProviders, - schemaMap: schemaMap, - extraOptions: extraOptions); - clientSettings.AutoEncryptionOptions = autoEncryptionOptions; - var secureClient = new MongoClient(clientSettings); - // end-client - - // start-insert - var sampleDocFields = new BsonDocument - { - { "name", "Jon Doe" }, - { "ssn", 145014000 }, - // :state-start: local-test aws-test azure-test gcp-test - { "key-id", "demo-data-key"}, - // :state-end: - { "bloodType", "AB-" }, - { - "medicalRecords", new BsonArray - { - new BsonDocument("weight", 180), - new BsonDocument("bloodPressure", "120/80") - } - }, - { - "insurance", new BsonDocument - { - { "policyNumber", 123142 }, - { "provider", "MaestCare" } - } - } - }; - - // Construct an auto-encrypting client - var secureCollection = secureClient.GetDatabase(db).GetCollection(coll); - - // Insert a document into the collection - secureCollection.InsertOne(sampleDocFields); - // end-insert - // start-find - Console.WriteLine("Finding a document with regular (non-encrypted) client."); - var filter = Builders.Filter.Eq("name", "Jon Doe"); - var regularResult = regularCollection.Find(filter).Limit(1).ToList()[0]; - Console.WriteLine($"\n{regularResult}\n"); - Console.WriteLine("Finding a document with encrypted client, searching on an encrypted field"); - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //var ssnFilter = Builders.Filter.Eq("ssn", 145014000); - //var secureResult = secureCollection.Find(ssnFilter).Limit(1).ToList()[0]; - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - var secureResult = secureCollection.Find(filter).Limit(1).ToList()[0]; - // :state-end: - Console.WriteLine($"\n{secureResult}\n"); - // end-find - } - } -} diff --git a/source/includes/sample_apps/csfle/dotnet/CSFLE/MakeDataKey.cs b/source/includes/sample_apps/csfle/dotnet/CSFLE/MakeDataKey.cs deleted file mode 100644 index 2d6b947b14f..00000000000 --- a/source/includes/sample_apps/csfle/dotnet/CSFLE/MakeDataKey.cs +++ /dev/null @@ -1,224 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Threading; -using MongoDB.Driver; -using MongoDB.Bson; -using MongoDB.Driver.Encryption; - -namespace Key -{ - - class MakeDataKey - { - public static void MakeKey() - { - - // :state-start: local-reader local-test - using (var randomNumberGenerator = System.Security.Cryptography.RandomNumberGenerator.Create()) - { - var bytes = new byte[96]; - randomNumberGenerator.GetBytes(bytes); - var localMasterKeyBase64Write = Convert.ToBase64String(bytes); - Console.WriteLine(localMasterKeyBase64Write); - File.WriteAllText("master-key.txt", localMasterKeyBase64Write); - } - // :state-end: - - // start-kmsproviders - var kmsProviders = new Dictionary>(); - // :state-start: local-reader local-test - var provider = "local"; - string localMasterKeyBase64Read = File.ReadAllText("master-key.txt"); - var localMasterKeyBytes = Convert.FromBase64String(localMasterKeyBase64Read); - var localOptions = new Dictionary - { - { "key", localMasterKeyBytes } - }; - kmsProviders.Add("local", localOptions); - // :state-end: - // :state-uncomment-start: aws-reader - //var provider = "aws"; - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", "" }, - // { "secretAccessKey", "" } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //var provider = "aws"; - //var awsAccessKey = Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID"); - //var awsSecretAccessKey = Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY"); - //var awsKmsOptions = new Dictionary - //{ - // { "accessKeyId", awsAccessKey }, - // { "secretAccessKey", awsSecretAccessKey } - //}; - //kmsProviders.Add(provider, awsKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //var provider = "azure"; - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", "" }, - // { "clientId", "" }, - // { "clientSecret", "" }, - //}; - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //var provider = "azure"; - //var azureTenantId = Environment.GetEnvironmentVariable("AZURE_TENANT_ID"); - //var azureClientId = Environment.GetEnvironmentVariable("AZURE_CLIENT_ID"); - //var azureClientSecret = Environment.GetEnvironmentVariable("AZURE_CLIENT_SECRET"); - //var azureKmsOptions = new Dictionary - //{ - // { "tenantId", azureTenantId }, - // { "clientId", azureClientId }, - // { "clientSecret", azureClientSecret }, - //}; - //kmsProviders.Add("azure", azureKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //var provider = "gcp"; - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", "" }, - // { "email", "" }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //var provider = "gcp"; - //var gcpPrivateKey = Environment.GetEnvironmentVariable("GCP_PRIVATE_KEY"); - //var gcpEmail = Environment.GetEnvironmentVariable("GCP_EMAIL"); - //var gcpKmsOptions = new Dictionary - //{ - // { "privateKey", gcpPrivateKey }, - // { "email", gcpEmail }, - //}; - //kmsProviders.Add(provider, gcpKmsOptions); - // - //var gcpDataKeyProjectId = Environment.GetEnvironmentVariable("GCP_PROJECT_ID"); - //var gcpDataKeyLocation = Environment.GetEnvironmentVariable("GCP_LOCATION"); - //var gcpDataKeyKeyRing = Environment.GetEnvironmentVariable("GCP_KEY_RING"); - //var gcpDataKeyKeyName = Environment.GetEnvironmentVariable("GCP_KEY_NAME"); - // :state-uncomment-end: - // end-kmsproviders - - // start-datakeyopts - // :state-start: local-reader local-test - // :state-end: - // :state-uncomment-start: aws-reader - //var dataKeyOptions = new DataKeyOptions( - // masterKey: new BsonDocument - // { - // { "region", "" }, - // { "key", "" }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //var awsKeyARN = Environment.GetEnvironmentVariable("AWS_KEY_ARN"); // e.g. "arn:aws:kms:us-east-2:111122223333:alias/test-key" - //var awsKeyRegion = Environment.GetEnvironmentVariable("AWS_KEY_REGION"); - //var dataKeyOptions = new DataKeyOptions( - // masterKey: new BsonDocument - // { - // { "region", awsKeyRegion }, - // { "key", awsKeyARN }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //kmsProviders.Add(provider, azureKmsOptions); - //var dataKeyOptions = new DataKeyOptions( - //masterKey: new BsonDocument - //{ - // { "keyName", "" }, - // { "keyVaultEndpoint", "" }, - //}); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //var azureKeyName = Environment.GetEnvironmentVariable("AZURE_KEY_NAME"); - //var azureKeyVaultEndpoint = Environment.GetEnvironmentVariable("AZURE_KEY_VAULT_ENDPOINT"); // typically .vault.azure.net - //var dataKeyOptions = new DataKeyOptions( - // masterKey: new BsonDocument - // { - // { "keyName", azureKeyName }, - // { "keyVaultEndpoint", azureKeyVaultEndpoint }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //var dataKeyOptions = new DataKeyOptions( - // masterKey: new BsonDocument - // { - // { "projectId", "Your GCP Project ID" }, - // { "location", "Your GCP Key Location" } , - // { "keyRing", "" }, - // { "keyName", "" }, - // }); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //var dataKeyOptions = new DataKeyOptions( - // masterKey: new BsonDocument - // { - // { "projectId", gcpDataKeyProjectId }, - // { "location", gcpDataKeyLocation } , - // { "keyRing", gcpDataKeyKeyRing }, - // { "keyName", gcpDataKeyKeyName }, - // }); - // :state-uncomment-end: - // end-datakeyopts - - // start-create-index - // :state-start: local-reader azure-reader aws-reader gcp-reader - // :uncomment-start: - //var connectionString = ""; - // :uncomment-end: - // :state-end: - // :state-start: local-test azure-test aws-test gcp-test - var connectionString = Environment.GetEnvironmentVariable("MONGODB_URI"); - // :state-end: - // start-create-dek - var keyVaultNamespace = CollectionNamespace.FromFullName("encryption.__keyVault"); - var keyVaultClient = new MongoClient(connectionString); - var indexOptions = new CreateIndexOptions(); - indexOptions.Unique = true; - indexOptions.PartialFilterExpression = new BsonDocument{{"keyAltNames", new BsonDocument{{"$exists", new BsonBoolean(true) }}}}; - var builder = Builders.IndexKeys; - var indexKeysDocument = builder.Ascending("keyAltNames"); - var indexModel = new CreateIndexModel(indexKeysDocument, indexOptions); - var keyVaultDatabase = keyVaultClient.GetDatabase(keyVaultNamespace.DatabaseNamespace.ToString()); - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - keyVaultDatabase.DropCollection(keyVaultNamespace.CollectionName.ToString()); - // Drop the database storing your encrypted fields as all - // the DEKs encrypting those fields were deleted in the preceding line. - keyVaultClient.GetDatabase("medicalRecords").DropCollection("patients"); - var keyVaultCollection = keyVaultDatabase.GetCollection(keyVaultNamespace.CollectionName.ToString()); - keyVaultCollection.Indexes.CreateOne(indexModel); - // end-create-index - - // start-create-dek - var clientEncryptionOptions = new ClientEncryptionOptions( - keyVaultClient: keyVaultClient, - keyVaultNamespace: keyVaultNamespace, - kmsProviders: kmsProviders); - var clientEncryption = new ClientEncryption(clientEncryptionOptions); - // :state-start: local-test local-reader - var dataKeyOptions = new DataKeyOptions(); - // :state-end: - // :state-start: local-test azure-test gcp-test aws-test - List keyNames = new List(); - keyNames.Add("demo-data-key"); - var dataKeyId = clientEncryption.CreateDataKey(provider, dataKeyOptions.With(keyNames), CancellationToken.None); - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //var dataKeyId = clientEncryption.CreateDataKey(provider, dataKeyOptions, CancellationToken.None); - // :uncomment-end: - // :state-end: - var dataKeyIdBase64 = Convert.ToBase64String(GuidConverter.ToBytes(dataKeyId, GuidRepresentation.Standard)); - Console.WriteLine($"DataKeyId [base64]: {dataKeyIdBase64}"); - // end-create-dek - } - } -} diff --git a/source/includes/sample_apps/csfle/dotnet/CSFLE/Program.cs b/source/includes/sample_apps/csfle/dotnet/CSFLE/Program.cs deleted file mode 100644 index 1860d6df3e1..00000000000 --- a/source/includes/sample_apps/csfle/dotnet/CSFLE/Program.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Insert; -using Key; - -namespace Run -{ - class Run - { - static void Main(string[] args){ - MakeDataKey.MakeKey(); - InsertEncryptedDocument.Insert(); - } - } -} diff --git a/source/includes/sample_apps/csfle/dotnet/README.md b/source/includes/sample_apps/csfle/dotnet/README.md deleted file mode 100644 index d91ec605118..00000000000 --- a/source/includes/sample_apps/csfle/dotnet/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Dotnet sample -applications that use CSFLE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Dotnet applications, run the following command from the parent of this directory: - - python build.py --project dotnet - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestDotNet diff --git a/source/includes/sample_apps/csfle/envrc_template b/source/includes/sample_apps/csfle/envrc_template deleted file mode 100644 index fb2a642526c..00000000000 --- a/source/includes/sample_apps/csfle/envrc_template +++ /dev/null @@ -1,30 +0,0 @@ -export MONGODB_URI="" -export MONGCRYPTD_PATH="" -export SHARED_LIB_PATH="" - -# AWS Credentials - -export AWS_ACCESS_KEY_ID="" -export AWS_SECRET_ACCESS_KEY="" -export AWS_KEY_REGION="" -export AWS_KEY_ARN="" - -# Azure Credentials - -export AZURE_TENANT_ID="" -export AZURE_CLIENT_ID="" -export AZURE_CLIENT_SECRET="" -export AZURE_KEY_NAME="" -export AZURE_KEY_VERSION="" -export AZURE_KEY_VAULT_ENDPOINT="" - -# GCP Credentials - -export GCP_EMAIL="" -export GCP_PRIVATE_KEY="" - -export GCP_PROJECT_ID="" -export GCP_LOCATION="" -export GCP_KEY_RING="" -export GCP_KEY_NAME="" -export GCP_KEY_VERSION="" diff --git a/source/includes/sample_apps/csfle/go-fle-2/.gitignore b/source/includes/sample_apps/csfle/go-fle-2/.gitignore deleted file mode 100644 index 32027aa3459..00000000000 --- a/source/includes/sample_apps/csfle/go-fle-2/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -IntelliJ IDEA -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work diff --git a/source/includes/sample_apps/csfle/go-fle-2/README.md b/source/includes/sample_apps/csfle/go-fle-2/README.md deleted file mode 100644 index d4a4f586fea..00000000000 --- a/source/includes/sample_apps/csfle/go-fle-2/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Go sample -applications that use CSFLE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Go applications, run the following command from the parent of this directory: - - python build.py --project go-fle-2 - -To test your build applications, run the following -command from the parent of this directory: - - python -m unittest test.TestGoFLE2 diff --git a/source/includes/sample_apps/csfle/go-fle-2/go.mod b/source/includes/sample_apps/csfle/go-fle-2/go.mod deleted file mode 100644 index 6d3979e8587..00000000000 --- a/source/includes/sample_apps/csfle/go-fle-2/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.10.0-beta1 -) diff --git a/source/includes/sample_apps/csfle/go-fle-2/go.sum b/source/includes/sample_apps/csfle/go-fle-2/go.sum deleted file mode 100644 index 51eb5075051..00000000000 --- a/source/includes/sample_apps/csfle/go-fle-2/go.sum +++ /dev/null @@ -1,46 +0,0 @@ -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -go.mongodb.org/mongo-driver v1.10.0-beta1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/source/includes/sample_apps/csfle/go-fle-2/insert-encrypted-document.go b/source/includes/sample_apps/csfle/go-fle-2/insert-encrypted-document.go deleted file mode 100644 index 42d5e1b259f..00000000000 --- a/source/includes/sample_apps/csfle/go-fle-2/insert-encrypted-document.go +++ /dev/null @@ -1,257 +0,0 @@ -package main - -import ( - "context" - "encoding/json" - "fmt" - - // :state-start: local-test aws-test azure-test gcp-test - "os" - // :state-end: - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" -) - -// :state-start: local-reader local-test -// :uncomment-start: -//import ( -// "io/ioutil" -// "log" -//) -// :uncomment-end: -// :state-end: - -func Insert() error { - - // start-key-vault - keyVaultColl := "__keyVault" - keyVaultDb := "encryption" - keyVaultNamespace := keyVaultDb + "." + keyVaultColl - // end-key-vault - dbName := "medicalRecords" - collName := "patients" - - // start-kmsproviders - // :state-start: local-test local-reader - // :uncomment-start: - //key, err := ioutil.ReadFile("master-key.txt") - //if err != nil { - // log.Fatalf("Could not read the key from master-key.txt: %v", err) - //} - //kmsProviders := map[string]map[string]interface{} { "local":{ "key": key}} - // :uncomment-end: - // :state-end: - // :state-uncomment-start: aws-reader - //kmsProviders := map[string]map[string]interface{} { - // "aws":{ - // "accessKeyId": "", - // "secretAccessKey" : "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //kmsProviders := map[string]map[string]interface{} { - // "aws":{ - // "accessKeyId": os.Getenv("AWS_ACCESS_KEY_ID"), - // "secretAccessKey" : os.Getenv("AWS_SECRET_ACCESS_KEY"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //kmsProviders := map[string]map[string]interface{} { - // "azure":{ - // "tenantId": "", - // "clientId": "", - // "clientSecret": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //kmsProviders := map[string]map[string]interface{} { - // "azure":{ - // "tenantId": os.Getenv("AZURE_TENANT_ID"), - // "clientId": os.Getenv("AZURE_CLIENT_ID"), - // "clientSecret": os.Getenv("AZURE_CLIENT_SECRET"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //kmsProviders := map[string]map[string]interface{} { - // "gcp": { - // "email": "", - // "privateKey": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //kmsProviders := map[string]map[string]interface{} { - // "gcp": { - // "email": os.Getenv("GCP_EMAIL"), - // "privateKey": os.Getenv("GCP_PRIVATE_KEY"), - // }, - //} - // :state-uncomment-end: - // end-kmsproviders - - - // :state-start: local-reader aws-reader gcp-reader azure-reader - // :uncomment-start: - //uri := "" - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test gcp-test azure-test - uri := os.Getenv("MONGODB_URI") - // :state-end: - - // start-schema - regularClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri)) - if err != nil { - return fmt.Errorf("Connect error for regular client: %v", err) - } - defer func() { - _ = regularClient.Disconnect(context.TODO()) - }() - - var foundDoc1 bson.M - err = regularClient.Database(keyVaultDb).Collection(keyVaultColl).FindOne(context.TODO(), bson.D{{"keyAltNames", "demoDataKey1"}}).Decode(&foundDoc1) - if err != nil { - panic(err) - } - var dataKeyID1 = foundDoc1["_id"].(primitive.Binary) - var foundDoc2 bson.M - err = regularClient.Database(keyVaultDb).Collection(keyVaultColl).FindOne(context.TODO(), bson.D{{"keyAltNames", "demoDataKey2"}}).Decode(&foundDoc2) - if err != nil { - panic(err) - } - var dataKeyID2 = foundDoc2["_id"].(primitive.Binary) - var foundDoc3 bson.M - err = regularClient.Database(keyVaultDb).Collection(keyVaultColl).FindOne(context.TODO(), bson.D{{"keyAltNames", "demoDataKey3"}}).Decode(&foundDoc3) - if err != nil { - panic(err) - } - var dataKeyID3 = foundDoc3["_id"].(primitive.Binary) - var foundDoc4 bson.M - err = regularClient.Database(keyVaultDb).Collection(keyVaultColl).FindOne(context.TODO(), bson.D{{"keyAltNames", "demoDataKey4"}}).Decode(&foundDoc4) - if err != nil { - panic(err) - } - var dataKeyID4 = foundDoc4["_id"].(primitive.Binary) - - encryptedFieldsMap := bson.M{ - "medicalRecords.patients": bson.M{ - "fields": []bson.M{ - { - "path": "patientId", - "bsonType": "int", - "keyId": dataKeyID1, - "queries": []bson.M{ - { - "queryType": "equality", - }, - }, - }, - { - "path": "medications", - "bsonType": "array", - "keyId": dataKeyID2, - }, - { - "path": "patientRecord.ssn", - "bsonType": "string", - "keyId": dataKeyID3, - "queries": []bson.M{ - { - "queryType": "equality", - }, - }, - }, - { - "path": "patientRecord.billing", - "bsonType": "object", - "keyId": dataKeyID4, - }, - }, - }, - } - // end-schema - - // start-extra-options - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //extraOptions := map[string]interface{}{ - // "cryptSharedLibPath": "", - //} - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - extraOptions := map[string]interface{}{ - "cryptSharedLibPath": os.Getenv("SHARED_LIB_PATH"), - } - // :state-end: - // end-extra-options - - // start-client - autoEncryptionOpts := options.AutoEncryption(). - SetKmsProviders(kmsProviders). - SetKeyVaultNamespace(keyVaultNamespace). - SetEncryptedFieldsMap(encryptedFieldsMap). - SetExtraOptions(extraOptions) - secureClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri).SetAutoEncryptionOptions(autoEncryptionOpts)) - if err != nil { - return fmt.Errorf("Connect error for encrypted client: %v", err) - } - defer func() { - _ = secureClient.Disconnect(context.TODO()) - }() - // end-client - - - // start-insert - test_patient := map[string]interface{}{ - "firstName": "Jon", - "lastName": "Doe", - "patientId": 12345678, - "address": "157 Electric Ave.", - "medications": []string {"Atorvastatin", "Levothyroxine"}, - "patientRecord": map[string]interface{}{ - "ssn": "987-65-4320", - "billing": map[string]interface{}{ - "type": "Visa", - "number": "4111111111111111", - }, - }, - } - if _, err := secureClient.Database(dbName).Collection(collName).InsertOne(context.TODO(), test_patient); err != nil { - return fmt.Errorf("InsertOne error: %v", err) - } - // end-insert - // start-find - fmt.Println("Finding a document with regular (non-encrypted) client.") - var resultRegular bson.M - err = regularClient.Database(dbName).Collection(collName).FindOne(context.TODO(), bson.D{{"firstName", "Jon"}}).Decode(&resultRegular) - if err != nil { - panic(err) - } - outputRegular, err := json.MarshalIndent(resultRegular, "", " ") - if err != nil { - panic(err) - } - fmt.Printf("%s\n", outputRegular) - - fmt.Println("Finding a document with encrypted client, searching on an encrypted field") - var resultSecure bson.M - err = secureClient.Database(dbName).Collection(collName).FindOne(context.TODO(), bson.D{bson.E{"patientRecord.ssn", "987-65-4320"}}).Decode(&resultSecure) - if err != nil { - panic(err) - } - outputSecure, err := json.MarshalIndent(resultSecure, "", " ") - if err != nil { - panic(err) - } - fmt.Printf("%s\n", outputSecure) - // end-find - return nil -} - diff --git a/source/includes/sample_apps/csfle/go-fle-2/main.go b/source/includes/sample_apps/csfle/go-fle-2/main.go deleted file mode 100644 index 43110ba588b..00000000000 --- a/source/includes/sample_apps/csfle/go-fle-2/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/go-fle-2/make-data-key.go b/source/includes/sample_apps/csfle/go-fle-2/make-data-key.go deleted file mode 100644 index 5b44d67565f..00000000000 --- a/source/includes/sample_apps/csfle/go-fle-2/make-data-key.go +++ /dev/null @@ -1,337 +0,0 @@ -package main - -import ( - "context" - "fmt" - "log" - - // :state-start: local-test aws-test azure-test gcp-test - "os" - // :state-end: - - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" -) - -// :state-start: local-reader local-test -// :uncomment-start: -//import ( -// "crypto/rand" -// "io/ioutil" -//) -// :uncomment-end: -// :state-end: - -// :state-start: local-test local-reader -// :uncomment-start: -//func localMasterKey() []byte { -// key := make([]byte, 96) -// if _, err := rand.Read(key); err != nil { -// log.Fatalf("Unable to create a random 96 byte data key: %v", err) -// } -// if err := ioutil.WriteFile("master-key.txt", key, 0644); err != nil { -// log.Fatalf("Unable to write key to file: %v", err) -// } -// return key -//} -// :uncomment-end: -// :state-end: - -func MakeKey() error { - - // :state-start: local-test local-reader - localMasterKey() - // :state-end: - - // start-kmsproviders - // :state-start: local-test local-reader - // :uncomment-start: - //key, err := ioutil.ReadFile("master-key.txt") - //if err != nil { - // log.Fatalf("Could not read the key from master-key.txt: %v", err) - //} - //provider := "local" - //kmsProviders := map[string]map[string]interface{} { "local":{ "key": key}} - // :uncomment-end: - // :state-end: - // :state-uncomment-start: aws-reader - //provider := "aws" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "accessKeyId": "", - // "secretAccessKey" : "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //provider := "aws" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "accessKeyId": os.Getenv("AWS_ACCESS_KEY_ID"), - // "secretAccessKey" : os.Getenv("AWS_SECRET_ACCESS_KEY"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //provider := "azure" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "tenantId": "", - // "clientId": "", - // "clientSecret": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //provider := "azure" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "tenantId": os.Getenv("AZURE_TENANT_ID"), - // "clientId": os.Getenv("AZURE_CLIENT_ID"), - // "clientSecret": os.Getenv("AZURE_CLIENT_SECRET"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //provider := "gcp" - //kmsProviders := map[string]map[string]interface{} { - // provider: { - // "email": "", - // "privateKey": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //provider := "gcp" - //kmsProviders := map[string]map[string]interface{} { - // provider: { - // "email": os.Getenv("GCP_EMAIL"), - // "privateKey": os.Getenv("GCP_PRIVATE_KEY"), - // }, - //} - // :state-uncomment-end: - // end-kmsproviders - - // start-datakeyopts - // :state-start: local-reader local-test - // :state-end: - // :state-uncomment-start: aws-reader - //masterKey := map[string]interface{} { - // "key": "", - // "region": "", - //} - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //masterKey := map[string]interface{} { - // "key": os.Getenv("AWS_KEY_ARN"), - // "region": os.Getenv("AWS_KEY_REGION"), - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //masterKey := map[string]interface{} { - // "keyVaultEndpoint": "", - // "keyName": "", - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //masterKey := map[string]interface{} { - // "keyVaultEndpoint": os.Getenv("AZURE_KEY_VAULT_ENDPOINT"), - // "keyName": os.Getenv("AZURE_KEY_NAME"), - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //masterKey := map[string]interface{} { - // "projectId": "", - // "location": "", - // "keyRing": "", - // "keyName": "", - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //masterKey := map[string]interface{} { - // "projectId": os.Getenv("GCP_PROJECT_ID"), - // "location": os.Getenv("GCP_LOCATION"), - // "keyRing": os.Getenv("GCP_KEY_RING"), - // "keyName": os.Getenv("GCP_KEY_NAME"), - //} - // :state-uncomment-end: - // end-datakeyopts - - - // start-create-index - // :state-start: local-reader aws-reader gcp-reader azure-reader - // :uncomment-start: - //uri := "" - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test gcp-test azure-test - uri := os.Getenv("MONGODB_URI") - // :state-end: - keyVaultClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri)) - if err != nil { - return fmt.Errorf("Connect error for regular client: %v", err) - } - defer func() { - _ = keyVaultClient.Disconnect(context.TODO()) - }() - - keyVaultDb := "encryption" - keyVaultColl := "__keyVault" - keyVaultNamespace := keyVaultDb + "." + keyVaultColl - keyVaultIndex := mongo.IndexModel{ - Keys: bson.D{{"keyAltNames", 1}}, - Options: options.Index(). - SetUnique(true). - SetPartialFilterExpression(bson.D{ - {"keyAltNames", bson.D{ - {"$exists", true}, - }}, - }), - } - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - if err = keyVaultClient.Database(keyVaultDb).Collection(keyVaultColl).Drop(context.TODO()); err != nil { - log.Fatalf("Collection.Drop error: %v", err) - } - _, err = keyVaultClient.Database(keyVaultDb).Collection(keyVaultColl).Indexes().CreateOne(context.TODO(), keyVaultIndex) - if err != nil { - panic(err) - } - // end-create-index - - // start-create-dek - clientEncryptionOpts := options.ClientEncryption().SetKeyVaultNamespace(keyVaultNamespace).SetKmsProviders(kmsProviders) - clientEnc, err := mongo.NewClientEncryption(keyVaultClient, clientEncryptionOpts) - if err != nil { - return fmt.Errorf("NewClientEncryption error %v", err) - } - defer func() { - _ = clientEnc.Close(context.TODO()) - }() - dataKeyOpts1 := options.DataKey(). - // :state-start: aws-reader gcp-reader azure-reader aws-test gcp-test azure-test - // :uncomment-start: - //SetMasterKey(masterKey). - // :uncomment-end: - // :state-end: - SetKeyAltNames([]string{"demoDataKey1"}) - dataKeyID1, err := clientEnc.CreateDataKey(context.TODO(), provider, dataKeyOpts1) - if err != nil { - return fmt.Errorf("create data key error %v", err) - } - dataKeyOpts2 := options.DataKey(). - // :state-start: aws-reader gcp-reader azure-reader aws-test gcp-test azure-test - // :uncomment-start: - //SetMasterKey(masterKey). - // :uncomment-end: - // :state-end: - SetKeyAltNames([]string{"demoDataKey2"}) - dataKeyID2, err := clientEnc.CreateDataKey(context.TODO(), provider, dataKeyOpts2) - if err != nil { - return fmt.Errorf("create data key error %v", err) - } - dataKeyOpts3 := options.DataKey(). - // :state-start: aws-reader gcp-reader azure-reader aws-test gcp-test azure-test - // :uncomment-start: - //SetMasterKey(masterKey). - // :uncomment-end: - // :state-end: - SetKeyAltNames([]string{"demoDataKey3"}) - dataKeyID3, err := clientEnc.CreateDataKey(context.TODO(), provider, dataKeyOpts3) - if err != nil { - return fmt.Errorf("create data key error %v", err) - } - dataKeyOpts4 := options.DataKey(). - // :state-start: aws-reader gcp-reader azure-reader aws-test gcp-test azure-test - // :uncomment-start: - //SetMasterKey(masterKey). - // :uncomment-end: - // :state-end: - SetKeyAltNames([]string{"demoDataKey4"}) - dataKeyID4, err := clientEnc.CreateDataKey(context.TODO(), provider, dataKeyOpts4) - if err != nil { - return fmt.Errorf("create data key error %v", err) - } - // end-create-dek - - // start-create-enc-collection - dbName := "medicalRecords" - collName := "patients" - encNamespace := (dbName + "." + collName) - - encryptedFieldsMap := bson.M{ - encNamespace: bson.M{ - "fields": []bson.M{ - { - "path": "patientId", - "bsonType": "int", - "keyId": dataKeyID1, - "queries": []bson.M{ - { - "queryType": "equality", - }, - }, - }, - { - "path": "medications", - "bsonType": "array", - "keyId": dataKeyID2, - }, - { - "path": "patientRecord.ssn", - "bsonType": "string", - "keyId": dataKeyID3, - "queries": []bson.M{ - { - "queryType": "equality", - }, - }, - }, - { - "path": "patientRecord.billing", - "bsonType": "object", - "keyId": dataKeyID4, - }, - }, - }, - } - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //extraOptions := map[string]interface{}{ - // "cryptSharedLibPath": "", - //} - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - extraOptions := map[string]interface{}{ - "cryptSharedLibPath": os.Getenv("SHARED_LIB_PATH"), - } - // :state-end: - - autoEncryptionOpts := options.AutoEncryption(). - SetKmsProviders(kmsProviders). - SetKeyVaultNamespace(keyVaultNamespace). - SetEncryptedFieldsMap(encryptedFieldsMap). - SetExtraOptions(extraOptions) - secureClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri).SetAutoEncryptionOptions(autoEncryptionOpts)) - if err != nil { - return fmt.Errorf("Connect error for encrypted client: %v", err) - } - defer func() { - _ = secureClient.Disconnect(context.TODO()) - }() - // Drop the encrypted collection in case you created this collection - // in a previous run of this application. - if err = secureClient.Database(dbName).Collection(collName).Drop(context.TODO()); err != nil { - log.Fatalf("Collection.Drop error: %v", err) - } - err = secureClient.Database(dbName).CreateCollection(context.TODO(), collName) - if err != nil { - return fmt.Errorf("Error creating collection: %v", err) - } - // end-create-enc-collection - print("Created Encrypted Collection") - - return nil -} diff --git a/source/includes/sample_apps/csfle/go/.gitignore b/source/includes/sample_apps/csfle/go/.gitignore deleted file mode 100644 index 32027aa3459..00000000000 --- a/source/includes/sample_apps/csfle/go/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -IntelliJ IDEA -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work diff --git a/source/includes/sample_apps/csfle/go/README.md b/source/includes/sample_apps/csfle/go/README.md deleted file mode 100644 index 5d41f853b16..00000000000 --- a/source/includes/sample_apps/csfle/go/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Go sample -applications that use CSFLE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Go applications, run the following command from the parent of this directory: - - python build.py --project go - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestGo diff --git a/source/includes/sample_apps/csfle/go/go.mod b/source/includes/sample_apps/csfle/go/go.mod deleted file mode 100644 index b4e98411e42..00000000000 --- a/source/includes/sample_apps/csfle/go/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module goCsfle - -go 1.15 - -require ( - github.com/aws/aws-sdk-go v1.34.28 // indirect - github.com/fatih/structs v1.1.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect - github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect - go.mongodb.org/mongo-driver v1.7.2 -) diff --git a/source/includes/sample_apps/csfle/go/go.sum b/source/includes/sample_apps/csfle/go/go.sum deleted file mode 100644 index a4ab4c6504d..00000000000 --- a/source/includes/sample_apps/csfle/go/go.sum +++ /dev/null @@ -1,142 +0,0 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.34.28 h1:sscPpn/Ns3i0F4HPEWAVcwdIRaZZCuL7llJ2/60yPIk= -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/klauspost/compress v1.9.5 h1:U+CaK85mrNNb4k8BNOfgJtJ/gr6kswUCFj6miSzVC6M= -github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2 h1:akYIkZ28e6A96dkWNJQu3nmCzH3YfwMPQExUYDaRv7w= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc h1:n+nNi93yXLkJvKwXNP9d55HC7lGK4H/SRcwB5IaUZLo= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -go.mongodb.org/mongo-driver v1.4.0-beta2.0.20201111202951-cdacb6473abf h1:/lmcWkMSu+Ab6eceQ5nXHbOpoZ66BrtCvgjV9/B8FY8= -go.mongodb.org/mongo-driver v1.4.0-beta2.0.20201111202951-cdacb6473abf/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.7.2 h1:pFttQyIiJUHEn50YfZgC9ECjITMT44oiN36uArf/OFg= -go.mongodb.org/mongo-driver v1.7.2/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5 h1:8dUaAV7K4uHsF56JQWkprecIQKdPHtR9jCHF5nB8uzc= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/source/includes/sample_apps/csfle/go/insert-encrypted-document.go b/source/includes/sample_apps/csfle/go/insert-encrypted-document.go deleted file mode 100644 index 97ba14cd2b6..00000000000 --- a/source/includes/sample_apps/csfle/go/insert-encrypted-document.go +++ /dev/null @@ -1,297 +0,0 @@ -package main - -import ( - "context" - "encoding/json" - "fmt" - - // :state-start: local-test aws-test azure-test gcp-test - "os" - // :state-end: - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" -) - -// :state-start: local-reader local-test -// :uncomment-start: -//import ( -// "io/ioutil" -// "log" -//) -// :uncomment-end: -// :state-end: - -func Insert() error { - - // start-key-vault - keyVaultNamespace := "encryption.__keyVault" - // end-key-vault - dbName := "medicalRecords" - collName := "patients" - - // start-kmsproviders - // :state-start: local-test local-reader - // :uncomment-start: - //key, err := ioutil.ReadFile("master-key.txt") - //if err != nil { - // log.Fatalf("Could not read the key from master-key.txt: %v", err) - //} - //kmsProviders := map[string]map[string]interface{} { "local":{ "key": key}} - // :uncomment-end: - // :state-end: - // :state-uncomment-start: aws-reader - //kmsProviders := map[string]map[string]interface{} { - // "aws":{ - // "accessKeyId": "", - // "secretAccessKey" : "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //kmsProviders := map[string]map[string]interface{} { - // "aws":{ - // "accessKeyId": os.Getenv("AWS_ACCESS_KEY_ID"), - // "secretAccessKey" : os.Getenv("AWS_SECRET_ACCESS_KEY"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //kmsProviders := map[string]map[string]interface{} { - // "azure":{ - // "tenantId": "", - // "clientId": "", - // "clientSecret": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //kmsProviders := map[string]map[string]interface{} { - // "azure":{ - // "tenantId": os.Getenv("AZURE_TENANT_ID"), - // "clientId": os.Getenv("AZURE_CLIENT_ID"), - // "clientSecret": os.Getenv("AZURE_CLIENT_SECRET"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //kmsProviders := map[string]map[string]interface{} { - // "gcp": { - // "email": "", - // "privateKey": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //kmsProviders := map[string]map[string]interface{} { - // "gcp": { - // "email": os.Getenv("GCP_EMAIL"), - // "privateKey": os.Getenv("GCP_PRIVATE_KEY"), - // }, - //} - // :state-uncomment-end: - // end-kmsproviders - - - // start-schema - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //dek_id := "" - //schema_template := `{ - // "bsonType": "object", - // "encryptMetadata": { - // "keyId": [ - // { - // "$binary": { - // "base64": "%s", - // "subType": "04" - // } - // } - // ] - // }, - // "properties": { - // "insurance": { - // "bsonType": "object", - // "properties": { - // "policyNumber": { - // "encrypt": { - // "bsonType": "int", - // "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - // } - // } - // } - // }, - // "medicalRecords": { - // "encrypt": { - // "bsonType": "array", - // "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - // } - // }, - // "bloodType": { - // "encrypt": { - // "bsonType": "string", - // "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - // } - // }, - // "ssn": { - // "encrypt": { - // "bsonType": "int", - // "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - // } - // } - // } - //}` - //schema := fmt.Sprintf(schema_template, dek_id) - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - dek_id := "" - schema_template := `{ - "bsonType": "object", - "encryptMetadata": { - "keyId": "/key-id" - }, - "properties": { - "insurance": { - "bsonType": "object", - "properties": { - "policyNumber": { - "encrypt": { - "bsonType": "int", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - } - } - }, - "medicalRecords": { - "encrypt": { - "bsonType": "array", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "bloodType": { - "encrypt": { - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - }, - "ssn": { - "encrypt": { - "bsonType": "int", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random" - } - } - } - }` - schema := fmt.Sprintf(schema_template, dek_id) - // :state-end: - var schemaDoc bson.Raw - if err := bson.UnmarshalExtJSON([]byte(schema), true, &schemaDoc); err != nil { - return fmt.Errorf("UnmarshalExtJSON error: %v", err) - } - schemaMap := map[string]interface{}{ - dbName + "." + collName: schemaDoc, - } - // end-schema - - // :state-start: local-reader aws-reader gcp-reader azure-reader - // :uncomment-start: - //uri := "" - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test gcp-test azure-test - uri := os.Getenv("MONGODB_URI") - // :state-end: - - // start-extra-options - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //extraOptions := map[string]interface{}{ - // "mongocryptdSpawnPath": "/usr/local/bin/mongocryptd", - //} - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - extraOptions := map[string]interface{}{ - "mongocryptdSpawnPath": os.Getenv("MONGCRYPTD_PATH"), - } - // :state-end: - // end-extra-options - regularClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri)) - if err != nil { - return fmt.Errorf("Connect error for regular client: %v", err) - } - defer func() { - _ = regularClient.Disconnect(context.TODO()) - }() - // start-client - autoEncryptionOpts := options.AutoEncryption(). - SetKmsProviders(kmsProviders). - SetKeyVaultNamespace(keyVaultNamespace). - SetSchemaMap(schemaMap). - SetExtraOptions(extraOptions) - secureClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri).SetAutoEncryptionOptions(autoEncryptionOpts)) - if err != nil { - return fmt.Errorf("Connect error for encrypted client: %v", err) - } - defer func() { - _ = secureClient.Disconnect(context.TODO()) - }() - // end-client - - // start-insert - test_patient := map[string]interface{}{ - "name": "Jon Doe", - "ssn": 241014209, - "bloodType": "AB+", - // :state-start: local-test aws-test azure-test gcp-test - "key-id": "demo-data-key", - // :state-end: - "medicalRecords": []map[string]interface{} {{ - "weight": 180, - "bloodPressure": "120/80", - }}, - "insurance": map[string]interface{}{ - "provider": "MaestCare", - "policyNumber": 123142, - }, - } - if _, err := secureClient.Database(dbName).Collection(collName).InsertOne(context.TODO(), test_patient); err != nil { - return fmt.Errorf("InsertOne error: %v", err) - } - // end-insert - // start-find - fmt.Println("Finding a document with regular (non-encrypted) client.") - var resultRegular bson.M - err = regularClient.Database(dbName).Collection(collName).FindOne(context.TODO(), bson.D{{"name", "Jon Doe"}}).Decode(&resultRegular) - if err != nil { - panic(err) - } - outputRegular, err := json.MarshalIndent(resultRegular, "", " ") - if err != nil { - panic(err) - } - fmt.Printf("%s\n", outputRegular) - - fmt.Println("Finding a document with encrypted client, searching on an encrypted field") - var resultSecure bson.M - // :state-start: local-test aws-test azure-test gcp-test - err = secureClient.Database(dbName).Collection(collName).FindOne(context.TODO(), bson.D{{"name", "Jon Doe"}}).Decode(&resultSecure) - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //err = secureClient.Database(dbName).Collection(collName).FindOne(context.TODO(), bson.D{{"ssn", "241014209"}}).Decode(&resultSecure) - // :uncomment-end: - // :state-end: - if err != nil { - panic(err) - } - outputSecure, err := json.MarshalIndent(resultSecure, "", " ") - if err != nil { - panic(err) - } - fmt.Printf("%s\n", outputSecure) - // end-find - return nil -} - diff --git a/source/includes/sample_apps/csfle/go/main.go b/source/includes/sample_apps/csfle/go/main.go deleted file mode 100644 index 43110ba588b..00000000000 --- a/source/includes/sample_apps/csfle/go/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" -) - -func main() { - err := MakeKey() - if err != nil { - log.Fatal(err) - } - err = Insert() - if err != nil { - log.Fatal(err) - } - -} diff --git a/source/includes/sample_apps/csfle/go/make-data-key.go b/source/includes/sample_apps/csfle/go/make-data-key.go deleted file mode 100644 index 15691662eac..00000000000 --- a/source/includes/sample_apps/csfle/go/make-data-key.go +++ /dev/null @@ -1,246 +0,0 @@ -package main - -import ( - "context" - "encoding/base64" - "fmt" - "log" - - // :state-start: local-test aws-test azure-test gcp-test - "os" - // :state-end: - - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/options" -) - -// :state-start: local-reader local-test -// :uncomment-start: -//import ( -// "crypto/rand" -// "io/ioutil" -//) -// :uncomment-end: -// :state-end: - -// :state-start: local-test local-reader -// :uncomment-start: -//func localMasterKey() []byte { -// key := make([]byte, 96) -// if _, err := rand.Read(key); err != nil { -// log.Fatalf("Unable to create a random 96 byte data key: %v", err) -// } -// if err := ioutil.WriteFile("master-key.txt", key, 0644); err != nil { -// log.Fatalf("Unable to write key to file: %v", err) -// } -// return key -//} -// :uncomment-end: -// :state-end: - -func MakeKey() error { - - // :state-start: local-test local-reader - localMasterKey() - // :state-end: - - // start-kmsproviders - // :state-start: local-test local-reader - // :uncomment-start: - //key, err := ioutil.ReadFile("master-key.txt") - //if err != nil { - // log.Fatalf("Could not read the key from master-key.txt: %v", err) - //} - //provider := "local" - //kmsProviders := map[string]map[string]interface{} { "local":{ "key": key}} - // :uncomment-end: - // :state-end: - // :state-uncomment-start: aws-reader - //provider := "aws" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "accessKeyId": "", - // "secretAccessKey" : "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //provider := "aws" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "accessKeyId": os.Getenv("AWS_ACCESS_KEY_ID"), - // "secretAccessKey" : os.Getenv("AWS_SECRET_ACCESS_KEY"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //provider := "azure" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "tenantId": "", - // "clientId": "", - // "clientSecret": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //provider := "azure" - //kmsProviders := map[string]map[string]interface{} { - // provider:{ - // "tenantId": os.Getenv("AZURE_TENANT_ID"), - // "clientId": os.Getenv("AZURE_CLIENT_ID"), - // "clientSecret": os.Getenv("AZURE_CLIENT_SECRET"), - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //provider := "gcp" - //kmsProviders := map[string]map[string]interface{} { - // provider: { - // "email": "", - // "privateKey": "", - // }, - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //provider := "gcp" - //kmsProviders := map[string]map[string]interface{} { - // provider: { - // "email": os.Getenv("GCP_EMAIL"), - // "privateKey": os.Getenv("GCP_PRIVATE_KEY"), - // }, - //} - // :state-uncomment-end: - // end-kmsproviders - - // start-datakeyopts - // :state-start: local-reader local-test - // :state-end: - // :state-uncomment-start: aws-reader - //masterKey := map[string]interface{} { - // "key": "", - // "region": "", - //} - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //masterKey := map[string]interface{} { - // "key": os.Getenv("AWS_KEY_ARN"), - // "region": os.Getenv("AWS_KEY_REGION"), - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //masterKey := map[string]interface{} { - // "keyVaultEndpoint": "", - // "keyName": "", - //} - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //masterKey := map[string]interface{} { - // "keyVaultEndpoint": os.Getenv("AZURE_KEY_VAULT_ENDPOINT"), - // "keyName": os.Getenv("AZURE_KEY_NAME"), - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //masterKey := map[string]interface{} { - // "projectId": "", - // "location": "", - // "keyRing": "", - // "keyName": "", - //} - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //masterKey := map[string]interface{} { - // "projectId": os.Getenv("GCP_PROJECT_ID"), - // "location": os.Getenv("GCP_LOCATION"), - // "keyRing": os.Getenv("GCP_KEY_RING"), - // "keyName": os.Getenv("GCP_KEY_NAME"), - //} - // :state-uncomment-end: - // end-datakeyopts - - // start-create-index - // :state-start: local-reader aws-reader gcp-reader azure-reader - // :uncomment-start: - //uri := "" - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test gcp-test azure-test - uri := os.Getenv("MONGODB_URI") - // :state-end: - keyVaultClient, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(uri)) - if err != nil { - return fmt.Errorf("Connect error for regular client: %v", err) - } - defer func() { - _ = keyVaultClient.Disconnect(context.TODO()) - }() - - keyVaultColl := "__keyVault" - keyVaultDb := "encryption" - keyVaultNamespace := keyVaultDb + "." + keyVaultColl - keyVaultIndex := mongo.IndexModel{ - Keys: bson.D{{"keyAltNames", 1}}, - Options: options.Index(). - SetUnique(true). - SetPartialFilterExpression(bson.D{ - {"keyAltNames", bson.D{ - {"$exists", true}, - }}, - }), - } - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - if err = keyVaultClient.Database(keyVaultDb).Collection(keyVaultColl).Drop(context.TODO()); err != nil { - log.Fatalf("Collection.Drop error: %v", err) - } - // Drop the database storing your encrypted fields as all - // the DEKs encrypting those fields were deleted in the preceding line. - if err = keyVaultClient.Database("medicalRecords").Collection("patients").Drop(context.TODO()); err != nil { - log.Fatalf("Collection.Drop error: %v", err) - } - _, err = keyVaultClient.Database(keyVaultDb).Collection(keyVaultColl).Indexes().CreateOne(context.TODO(), keyVaultIndex) - if err != nil { - panic(err) - } - // end-create-index - - // start-create-dek - clientEncryptionOpts := options.ClientEncryption().SetKeyVaultNamespace(keyVaultNamespace).SetKmsProviders(kmsProviders) - clientEnc, err := mongo.NewClientEncryption(keyVaultClient, clientEncryptionOpts) - if err != nil { - return fmt.Errorf("NewClientEncryption error %v", err) - } - defer func() { - _ = clientEnc.Close(context.TODO()) - }() - // :state-start: local-test aws-test gcp-test azure-test aws-reader azure-reader gcp-reader - dataKeyOpts := options.DataKey(). - // :state-end: - // :state-uncomment-start: local-reader - //dataKeyOpts := options.DataKey() - // :state-uncomment-end: - // :state-start: aws-test gcp-test azure-test - // :uncomment-start: - //SetMasterKey(masterKey). - // :uncomment-end: - // :state-end: - // :state-start: aws-reader gcp-reader azure-reader - // :uncomment-start: - //SetMasterKey(masterKey) - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - SetKeyAltNames([]string{"demo-data-key"}) - // :state-end: - - dataKeyID, err := clientEnc.CreateDataKey(context.TODO(), provider, dataKeyOpts) - if err != nil { - return fmt.Errorf("create data key error %v", err) - } - - fmt.Printf("DataKeyId [base64]: %s\n",base64.StdEncoding.EncodeToString(dataKeyID.Data)) - // end-create-dek - return nil -} - diff --git a/source/includes/sample_apps/csfle/java-fle-2/.gitignore b/source/includes/sample_apps/csfle/java-fle-2/.gitignore deleted file mode 100644 index 6854497fc93..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.gitignore +++ /dev/null @@ -1,79 +0,0 @@ -target/ - -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# AWS User-specific -.idea/**/aws.xml - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# SonarLint plugin -.idea/sonarlint/ - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser diff --git a/source/includes/sample_apps/csfle/java-fle-2/.idea/.name b/source/includes/sample_apps/csfle/java-fle-2/.idea/.name deleted file mode 100644 index 7a1c2590414..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Java-CSFLE-guide \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java-fle-2/.idea/compiler.xml b/source/includes/sample_apps/csfle/java-fle-2/.idea/compiler.xml deleted file mode 100644 index 33bfbe24b95..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.idea/compiler.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java-fle-2/.idea/jarRepositories.xml b/source/includes/sample_apps/csfle/java-fle-2/.idea/jarRepositories.xml deleted file mode 100644 index 712ab9d985c..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java-fle-2/.idea/java.iml b/source/includes/sample_apps/csfle/java-fle-2/.idea/java.iml deleted file mode 100644 index 60d170d851d..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.idea/java.iml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java-fle-2/.idea/misc.xml b/source/includes/sample_apps/csfle/java-fle-2/.idea/misc.xml deleted file mode 100644 index 972ec8d76ca..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.idea/misc.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java-fle-2/.idea/modules.xml b/source/includes/sample_apps/csfle/java-fle-2/.idea/modules.xml deleted file mode 100644 index a127731fcdc..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java-fle-2/.mvn/.mvn.iml b/source/includes/sample_apps/csfle/java-fle-2/.mvn/.mvn.iml deleted file mode 100644 index e48065a3f37..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/.mvn/.mvn.iml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java-fle-2/README.md b/source/includes/sample_apps/csfle/java-fle-2/README.md deleted file mode 100644 index bfa7bf3404d..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Java sample -applications that use CSFLE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Java applications, run the following command from the parent of this directory: - - python build.py --project java - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestJava diff --git a/source/includes/sample_apps/csfle/java-fle-2/mongocryptd.pid b/source/includes/sample_apps/csfle/java-fle-2/mongocryptd.pid deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/includes/sample_apps/csfle/java-fle-2/pom.xml b/source/includes/sample_apps/csfle/java-fle-2/pom.xml deleted file mode 100644 index 0034fa70f9c..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - Java-QE-guide - - Java-QE-guide-AWS - - - Java-QE-guide-Azure - - - Java-QE-guide-GCP - - - Java-QE-guide-Local - - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.7.0-beta0 - - - - org.mongodb - mongodb-crypt - 1.5.0-rc1 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/java-fle-2/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/sample_apps/csfle/java-fle-2/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java deleted file mode 100644 index 8cd837353f5..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ /dev/null @@ -1,238 +0,0 @@ -package com.mongodb.csfle; -/* - * Copyright 2008-present MongoDB, Inc. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - - -import java.util.*; - -import java.util.HashMap; -import java.util.Map; - -import static com.mongodb.client.model.Filters.eq; - -import com.mongodb.AutoEncryptionSettings; -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; -import com.mongodb.client.MongoCollection; - -import org.bson.BsonArray; -import org.bson.BsonBinary; -import org.bson.BsonDocument; -import org.bson.BsonString; -import org.bson.types.Binary; -import org.bson.BsonBinarySubType; - -import com.mongodb.ConnectionString; -import com.mongodb.MongoClientSettings; -import org.bson.Document; - -// :state-start: local-reader local-test -import java.io.FileInputStream; -// :state-end: - - -/* - * - Reads master key from file "master-key.txt" in root directory of project - * - Creates a JSON schema for a specified collection to enable automatic encryption - * - Creates an encrypted client and upserts a single document - * - Finds the upserted document with the encrypted client using an encrypted field - * - Attempts to find the upserted document with the normal client using an encrypted field - * - Finds the upserted document with the normal client using a non-encrypted field - */ -public class insertEncryptedDocument { - - public static void main(String[] args) throws Exception { - - - String encryptedDbName = "medicalRecords"; - String encryptedCollName = "patients"; - String encryptedNameSpace = encryptedDbName + "." + encryptedCollName; - - // start-key-vault - String keyVaultDb = "encryption"; - String keyVaultColl = "__keyVault"; - String keyVaultNamespace = keyVaultDb + "." + keyVaultColl; - // end-key-vault - - // :state-start: aws-test azure-test local-test gcp-test - String connectionString = System.getenv("MONGODB_URI"); - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //String connectionString = ""; - // :uncomment-end: - // :state-end: - - // start-kmsproviders - // :state-start: local-reader local-test - String kmsProvider = "local"; - String path = "master-key.txt"; - - byte[] localMasterKeyRead = new byte[96]; - - try (FileInputStream fis = new FileInputStream(path)) { - if (fis.read(localMasterKeyRead) < 96) - throw new Exception("Expected to read 96 bytes from file"); - } - Map keyMap = new HashMap(); - keyMap.put("key", localMasterKeyRead); - - Map> kmsProviders = new HashMap>(); - kmsProviders.put(kmsProvider, keyMap); - // :state-end: - // :state-uncomment-start: aws-reader - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", ""); - //providerDetails.put("secretAccessKey", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", System.getenv("AWS_ACCESS_KEY_ID")); - //providerDetails.put("secretAccessKey", System.getenv("AWS_SECRET_ACCESS_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //String kmsProvider = "azure"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", ""); - //providerDetails.put("clientId", ""); - //providerDetails.put("clientSecret", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "azure"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", System.getenv("AZURE_TENANT_ID")); - //providerDetails.put("clientId", System.getenv("AZURE_CLIENT_ID")); - //providerDetails.put("clientSecret", System.getenv("AZURE_CLIENT_SECRET")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", ""); - //providerDetails.put("privateKey", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", System.getenv("GCP_EMAIL")); - //providerDetails.put("privateKey", System.getenv("GCP_PRIVATE_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // end-kmsproviders - - // start-schema - MongoClient regularClient = MongoClients.create(connectionString); - - MongoCollection keyVaultClient = regularClient.getDatabase(keyVaultDb).getCollection(keyVaultColl); - - BsonBinary dataKeyId1 = new BsonBinary(BsonBinarySubType.UUID_STANDARD, keyVaultClient.find(eq("keyAltNames", "dataKey1")).first().get("_id", Binary.class).getData()); - BsonBinary dataKeyId2 = new BsonBinary(BsonBinarySubType.UUID_STANDARD, keyVaultClient.find(eq("keyAltNames", "dataKey2")).first().get("_id", Binary.class).getData()); - BsonBinary dataKeyId3 = new BsonBinary(BsonBinarySubType.UUID_STANDARD, keyVaultClient.find(eq("keyAltNames", "dataKey3")).first().get("_id", Binary.class).getData()); - BsonBinary dataKeyId4 = new BsonBinary(BsonBinarySubType.UUID_STANDARD, keyVaultClient.find(eq("keyAltNames", "dataKey4")).first().get("_id", Binary.class).getData()); - - BsonDocument encFields = new BsonDocument().append("fields", - new BsonArray(Arrays.asList( - new BsonDocument().append("keyId", dataKeyId1) - .append("path", new BsonString("patientId")) - .append("bsonType", new BsonString("int")) - .append("queries", new BsonDocument().append("queryType", new BsonString("equality"))), - new BsonDocument().append("keyId", dataKeyId2) - .append("path", new BsonString("medications")) - .append("bsonType", new BsonString("array")), - new BsonDocument().append("keyId", dataKeyId3) - .append("path", new BsonString("patientRecord.ssn")) - .append("bsonType", new BsonString("string")) - .append("queries", new BsonDocument().append("queryType", new BsonString("equality"))), - new BsonDocument().append("keyId", dataKeyId4) - .append("path", new BsonString("patientRecord.billing")) - .append("bsonType", new BsonString("object"))))); - Map encryptedFieldsMap = new HashMap(); - encryptedFieldsMap.put(encryptedNameSpace, encFields); - - // end-schema - - // start-extra-options - Map extraOptions = new HashMap(); - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //extraOptions.put("cryptSharedLibPath", ""); - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - extraOptions.put("cryptSharedLibPath", System.getenv("SHARED_LIB_PATH")); - // :state-end: - // end-extra-options - - // start-client - MongoClientSettings clientSettings = MongoClientSettings.builder() - .applyConnectionString(new ConnectionString(connectionString)) - .autoEncryptionSettings(AutoEncryptionSettings.builder() - .keyVaultNamespace(keyVaultNamespace) - .kmsProviders(kmsProviders) - .encryptedFieldsMap(encryptedFieldsMap) - .extraOptions(extraOptions) - .build()) - .build(); - MongoClient mongoClientSecure = MongoClients.create(clientSettings); - // end-client - - - // start-insert - ArrayList medications = new ArrayList<>(); - medications.add("Atorvastatin"); - medications.add("Levothyroxine"); - - Document patientRecord = new Document() - .append("ssn", "987-65-4320") - .append("billing", new Document().append("type", "Visa").append("number", "4111111111111111")); - - Document patient = new Document() - .append("firstName", "Jon") - .append("lastName", "Doe") - .append("patientId", 12345678) - .append("address", "AB+") - .append("medications", medications) - .append("patientRecord", patientRecord); - mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).insertOne(patient); - // end-insert - - // start-find - System.out.println("Finding a document with regular (non-encrypted) client."); - Document docRegular = regularClient.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); - System.out.println(docRegular.toJson()); - System.out.println("Finding a document with encrypted client, searching on an encrypted field"); - Document docSecure = mongoClientSecure.getDatabase(encryptedDbName).getCollection(encryptedCollName).find(eq("firstName", "Jon")).first(); - System.out.println(docSecure.toJson()); - // end-find - - mongoClientSecure.close(); - regularClient.close(); - - } -} diff --git a/source/includes/sample_apps/csfle/java-fle-2/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/sample_apps/csfle/java-fle-2/src/main/java/com/mongodb/csfle/makeDataKey.java deleted file mode 100644 index b3ed63f65be..00000000000 --- a/source/includes/sample_apps/csfle/java-fle-2/src/main/java/com/mongodb/csfle/makeDataKey.java +++ /dev/null @@ -1,307 +0,0 @@ -package com.mongodb.csfle; -/* - * Copyright 2008-present MongoDB, Inc. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import java.util.*; - -import java.util.HashMap; -import java.util.Map; - - -import org.bson.BsonArray; -import org.bson.BsonBinary; -import org.bson.BsonDocument; -import org.bson.BsonString; -import org.bson.BsonInt32; -import org.bson.BsonBoolean; - -import com.mongodb.AutoEncryptionSettings; -import com.mongodb.ClientEncryptionSettings; -import com.mongodb.ConnectionString; -import com.mongodb.MongoClientSettings; - -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; -import com.mongodb.client.MongoCollection; -import com.mongodb.client.MongoDatabase; -import com.mongodb.client.model.IndexOptions; -import com.mongodb.client.model.vault.DataKeyOptions; -import com.mongodb.client.vault.ClientEncryption; -import com.mongodb.client.vault.ClientEncryptions; - -// :state-start: local-reader local-test -import java.io.FileOutputStream; -import java.io.FileInputStream; -import java.security.SecureRandom; -// :state-end: - -/* - * - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS - * - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS - * - Prints base 64-encoded value of the data encryption key - */ -public class makeDataKey { - - public static void main(String[] args) throws Exception { - // :state-start: local-reader local-test - byte[] localMasterKeyWrite = new byte[96]; - new SecureRandom().nextBytes(localMasterKeyWrite); - try (FileOutputStream stream = new FileOutputStream("master-key.txt")) { - stream.write(localMasterKeyWrite); - } - // :state-end: - - // start-kmsproviders - // :state-start: local-reader local-test - String kmsProvider = "local"; - String path = "master-key.txt"; - - byte[] localMasterKeyRead = new byte[96]; - - try (FileInputStream fis = new FileInputStream(path)) { - if (fis.read(localMasterKeyRead) < 96) - throw new Exception("Expected to read 96 bytes from file"); - } - Map keyMap = new HashMap(); - keyMap.put("key", localMasterKeyRead); - - Map> kmsProviders = new HashMap>(); - kmsProviders.put("local", keyMap); - // :state-end: - // :state-uncomment-start: aws-reader - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", new BsonString("")); - //providerDetails.put("secretAccessKey", new BsonString("")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", System.getenv("AWS_ACCESS_KEY_ID")); - //providerDetails.put("secretAccessKey", System.getenv("AWS_SECRET_ACCESS_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //String kmsProvider = "azure"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", ""); - //providerDetails.put("clientId", ""); - //providerDetails.put("clientSecret", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //String kmsProvider = "azure"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", System.getenv("AZURE_TENANT_ID")); - //providerDetails.put("clientId", System.getenv("AZURE_CLIENT_ID")); - //providerDetails.put("clientSecret", System.getenv("AZURE_CLIENT_SECRET")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", ""); - //providerDetails.put("privateKey", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", System.getenv("GCP_EMAIL")); - //providerDetails.put("privateKey", System.getenv("GCP_PRIVATE_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // end-kmsproviders - - // start-datakeyopts - // :state-start: local-reader local-test - // :state-end: - // :state-uncomment-start: aws-reader - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("key", new BsonString("")); - //masterKeyProperties.put("region", new BsonString("")); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //BsonDocument masterKeyProperties = new BsonDocument(); - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("key", new BsonString(System.getenv("AWS_KEY_ARN"))); - //masterKeyProperties.put("region", new BsonString(System.getenv("AWS_KEY_REGION"))); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //BsonDocument masterKeyProperties = new BsonDocument(); - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("keyName", new BsonString("")); - //masterKeyProperties.put("keyVaultEndpoint", new BsonString("")); - //masterKeyProperties.put("location", new BsonString("")); - //masterKeyProperties.put("keyRing", new BsonString("")); - //masterKeyProperties.put("keyName", new BsonString("")); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //BsonDocument masterKeyProperties = new BsonDocument(); - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("projectId", new BsonString(System.getenv("GCP_PROJECT_ID"))); - //masterKeyProperties.put("location", new BsonString(System.getenv("GCP_LOCATION"))); - //masterKeyProperties.put("keyRing", new BsonString(System.getenv("GCP_KEY_RING"))); - //masterKeyProperties.put("keyName", new BsonString(System.getenv("GCP_KEY_NAME"))); - // :state-uncomment-end: - // end-datakeyopts - - - // start-create-index - // :state-start: aws-test azure-test local-test gcp-test - String connectionString = System.getenv("MONGODB_URI"); - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //String connectionString = ""; - // :uncomment-end: - // :state-end: - String keyVaultDb = "encryption"; - String keyVaultColl = "__keyVault"; - MongoClient keyVaultClient = MongoClients.create(connectionString); - - String encryptedDbName = "medicalRecords"; - String encryptedCollName = "patients"; - - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - keyVaultClient.getDatabase(keyVaultDb).getCollection(keyVaultColl).drop(); - - MongoCollection keyVaultCollection = keyVaultClient.getDatabase(keyVaultDb).getCollection(keyVaultColl); - IndexOptions indexOpts = new IndexOptions().partialFilterExpression(new BsonDocument("keyAltNames", new BsonDocument("$exists", new BsonBoolean(true) ))).unique(true); - keyVaultCollection.createIndex(new BsonDocument("keyAltNames", new BsonInt32(1)), indexOpts); - keyVaultClient.close(); - // end-create-index - - // start-create-dek - String keyVaultNamespace = keyVaultDb + "." + keyVaultColl; - ClientEncryptionSettings clientEncryptionSettings = ClientEncryptionSettings.builder() - .keyVaultMongoClientSettings(MongoClientSettings.builder() - .applyConnectionString(new ConnectionString(connectionString)) - .build()) - .keyVaultNamespace(keyVaultNamespace) - .kmsProviders(kmsProviders) - .build(); - ClientEncryption clientEncryption = ClientEncryptions.create(clientEncryptionSettings); - List keyAlts1 = new ArrayList(); - keyAlts1.add("dataKey1"); - BsonBinary dataKeyId1 = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions() - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //.masterKey(masterKeyProperties) - // :uncomment-end: - // :state-end: - .keyAltNames(keyAlts1)); - List keyAlts2 = new ArrayList(); - keyAlts2.add("dataKey2"); - BsonBinary dataKeyId2 = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions() - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //.masterKey(masterKeyProperties) - // :uncomment-end: - // :state-end: - .keyAltNames(keyAlts2)); - List keyAlts3 = new ArrayList(); - keyAlts3.add("dataKey3"); - BsonBinary dataKeyId3 = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions() - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //.masterKey(masterKeyProperties) - // :uncomment-end: - // :state-end: - .keyAltNames(keyAlts3)); - List keyAlts4 = new ArrayList(); - keyAlts4.add("dataKey4"); - BsonBinary dataKeyId4 = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions() - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //.masterKey(masterKeyProperties) - // :uncomment-end: - // :state-end: - .keyAltNames(keyAlts4)); - // end-create-dek - // start-create-enc-collection - String encryptedNameSpace = encryptedDbName + "." + encryptedCollName; - BsonDocument encFields = new BsonDocument().append("fields", - new BsonArray(Arrays.asList( - new BsonDocument().append("keyId", dataKeyId1) - .append("path", new BsonString("patientId")) - .append("bsonType", new BsonString("int")) - .append("queries", new BsonDocument().append("queryType", new BsonString("equality"))), - new BsonDocument().append("keyId", dataKeyId2) - .append("path", new BsonString("medications")) - .append("bsonType", new BsonString("array")), - new BsonDocument().append("keyId", dataKeyId3) - .append("path", new BsonString("patientRecord.ssn")) - .append("bsonType", new BsonString("string")) - .append("queries", new BsonDocument().append("queryType", new BsonString("equality"))), - new BsonDocument().append("keyId", dataKeyId4) - .append("path", new BsonString("patientRecord.billing")) - .append("bsonType", new BsonString("object"))))); - Map encryptedFieldsMap = new HashMap(); - encryptedFieldsMap.put(encryptedNameSpace, encFields); - - Map extraOptions = new HashMap(); - // :state-start: local-test aws-test azure-test gcp-test - extraOptions.put("cryptSharedLibPath", System.getenv("SHARED_LIB_PATH")); - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //extraOptions.put("cryptSharedLibPath", ""); - // :uncomment-end: - // :state-end: - - MongoClientSettings clientSettings = MongoClientSettings.builder() - .applyConnectionString(new ConnectionString(connectionString)) - .autoEncryptionSettings(AutoEncryptionSettings.builder() - .keyVaultNamespace(keyVaultNamespace) - .kmsProviders(kmsProviders) - .encryptedFieldsMap(encryptedFieldsMap) - .extraOptions(extraOptions) - .build()) - .build(); - MongoClient mongoClientSecure = MongoClients.create(clientSettings); - MongoDatabase encDb = mongoClientSecure.getDatabase(encryptedDbName); - // Drop the encrypted collection in case you created this collection - // in a previous run of this application. - encDb.getCollection(encryptedCollName).drop(); - encDb.createCollection(encryptedCollName); - // end-create-enc-collection - System.out.println("Successfully created encrypted collection!"); - mongoClientSecure.close(); - clientEncryption.close(); - - } -} diff --git a/source/includes/sample_apps/csfle/java/.gitignore b/source/includes/sample_apps/csfle/java/.gitignore deleted file mode 100644 index 6854497fc93..00000000000 --- a/source/includes/sample_apps/csfle/java/.gitignore +++ /dev/null @@ -1,79 +0,0 @@ -target/ - -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# AWS User-specific -.idea/**/aws.xml - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# SonarLint plugin -.idea/sonarlint/ - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser diff --git a/source/includes/sample_apps/csfle/java/.idea/.name b/source/includes/sample_apps/csfle/java/.idea/.name deleted file mode 100644 index 7a1c2590414..00000000000 --- a/source/includes/sample_apps/csfle/java/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Java-CSFLE-guide \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java/.idea/compiler.xml b/source/includes/sample_apps/csfle/java/.idea/compiler.xml deleted file mode 100644 index 7f20cf6f506..00000000000 --- a/source/includes/sample_apps/csfle/java/.idea/compiler.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java/.idea/jarRepositories.xml b/source/includes/sample_apps/csfle/java/.idea/jarRepositories.xml deleted file mode 100644 index 712ab9d985c..00000000000 --- a/source/includes/sample_apps/csfle/java/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java/.idea/java.iml b/source/includes/sample_apps/csfle/java/.idea/java.iml deleted file mode 100644 index 28decca193c..00000000000 --- a/source/includes/sample_apps/csfle/java/.idea/java.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java/.idea/misc.xml b/source/includes/sample_apps/csfle/java/.idea/misc.xml deleted file mode 100644 index 972ec8d76ca..00000000000 --- a/source/includes/sample_apps/csfle/java/.idea/misc.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java/.idea/modules.xml b/source/includes/sample_apps/csfle/java/.idea/modules.xml deleted file mode 100644 index f3029082163..00000000000 --- a/source/includes/sample_apps/csfle/java/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java/.mvn/.mvn.iml b/source/includes/sample_apps/csfle/java/.mvn/.mvn.iml deleted file mode 100644 index e48065a3f37..00000000000 --- a/source/includes/sample_apps/csfle/java/.mvn/.mvn.iml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/includes/sample_apps/csfle/java/README.md b/source/includes/sample_apps/csfle/java/README.md deleted file mode 100644 index bfa7bf3404d..00000000000 --- a/source/includes/sample_apps/csfle/java/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Java sample -applications that use CSFLE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Java applications, run the following command from the parent of this directory: - - python build.py --project java - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestJava diff --git a/source/includes/sample_apps/csfle/java/build.gradle b/source/includes/sample_apps/csfle/java/build.gradle deleted file mode 100644 index 7948d8eeeb0..00000000000 --- a/source/includes/sample_apps/csfle/java/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -plugins { - id 'java-library' -} - -group = 'com.mongodb.csfle' - -version = '0.1-SNAPSHOT' - -repositories { - jcenter() -} - -dependencies { - compile( - [ - 'org.mongodb:mongodb-crypt:1.1.0-beta1', - 'org.mongodb:mongodb-driver-sync:4.1.1' - ] - ) -} diff --git a/source/includes/sample_apps/csfle/java/configure_certs.sh b/source/includes/sample_apps/csfle/java/configure_certs.sh deleted file mode 100644 index 01a37273835..00000000000 --- a/source/includes/sample_apps/csfle/java/configure_certs.sh +++ /dev/null @@ -1,19 +0,0 @@ -KMIP_PATH="../.kmip" - -# configure certificates for java -mkdir .generated_certs -openssl pkcs12 -CAfile "$KMIP_PATH"/certs/ca.pem -export -in "$KMIP_PATH"/certs/client.pem -out .generated_certs/client.pkc -password pass:${KEYSTORE_PASSWORD} -cp ${JAVA_HOME}/lib/security/cacerts .generated_certs/mongo-truststore -${JAVA_HOME}/bin/keytool -importcert -trustcacerts -file "$KMIP_PATH"/certs/ca.pem -keystore .generated_certs/mongo-truststore -storepass ${KEYSTORE_PASSWORD} -storetype JKS -noprompt - -# specify password in maven config file -mkdir .mvn -cp maven.config.tmpl .mvn/maven.config -sed -i '' -e "s/REPLACE-WITH-KEYSTORE-PASSWORD/$KEYSTORE_PASSWORD/g" .mvn/maven.config -sed -i '' -e "s/REPLACE-WITH-TRUSTSTORE-PASSWORD/$TRUSTSTORE_PASSWORD/g" .mvn/maven.config - -# start the kmip server -echo "Starting the KMIP Server..." -cd "$KMIP_PATH"/kmip_server/ -. ./activate_venv.sh -./kmstlsvenv/bin/python3 -u kms_kmip_server.py diff --git a/source/includes/sample_apps/csfle/java/maven.config.tmpl b/source/includes/sample_apps/csfle/java/maven.config.tmpl deleted file mode 100644 index 90e518cf5d7..00000000000 --- a/source/includes/sample_apps/csfle/java/maven.config.tmpl +++ /dev/null @@ -1,7 +0,0 @@ --Djavax.net.ssl.enabled=true --Djavax.net.ssl.keyStoreType=pkcs12 --Djavax.net.ssl.keyStore=./.generated_certs/client.pkc --Djavax.net.ssl.keyStorePassword=REPLACE-WITH-KEYSTORE-PASSWORD --Djavax.net.ssl.trustStoreType=jks --Djavax.net.ssl.trustStore=./.generated_certs/mongo-truststore --Djavax.net.ssl.trustStorePassword=REPLACE-WITH-TRUSTSTORE-PASSWORD diff --git a/source/includes/sample_apps/csfle/java/mongocryptd.pid b/source/includes/sample_apps/csfle/java/mongocryptd.pid deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/includes/sample_apps/csfle/java/pom.xml b/source/includes/sample_apps/csfle/java/pom.xml deleted file mode 100644 index 4c0a87e28ed..00000000000 --- a/source/includes/sample_apps/csfle/java/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - Java-CSFLE-guide - - Java-CSFLE-guide-AWS - - - Java-CSFLE-guide-Azure - - - Java-CSFLE-guide-GCP - - - Java-CSFLE-guide-Local - - 1.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.mongodb - mongodb-driver-sync - 4.4.0 - - - - org.mongodb - mongodb-crypt - 1.4.0 - - - - - - ${project.artifactId} - - diff --git a/source/includes/sample_apps/csfle/java/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java b/source/includes/sample_apps/csfle/java/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java deleted file mode 100644 index 3e31ca8b08a..00000000000 --- a/source/includes/sample_apps/csfle/java/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java +++ /dev/null @@ -1,266 +0,0 @@ -package com.mongodb.csfle; -/* - * Copyright 2008-present MongoDB, Inc. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - - -import java.util.*; - -import java.util.HashMap; -import java.util.Map; - -import static com.mongodb.client.model.Filters.eq; - -import com.mongodb.AutoEncryptionSettings; -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; -import com.mongodb.client.MongoCollection; -import org.bson.BsonDocument; - -import com.mongodb.ConnectionString; -import com.mongodb.MongoClientSettings; -import org.bson.Document; - -// :state-start: local-reader local-test -import java.io.FileOutputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.security.SecureRandom; -// :state-end: - - -/* - * - Reads master key from file "master-key.txt" in root directory of project - * - Creates a JSON schema for a specified collection to enable automatic encryption - * - Creates an encrypted client and upserts a single document - * - Finds the upserted document with the encrypted client using an encrypted field - * - Attempts to find the upserted document with the normal client using an encrypted field - * - Finds the upserted document with the normal client using a non-encrypted field - */ -public class insertEncryptedDocument { - - public static void main(String[] args) throws Exception { - String recordsDb = "medicalRecords"; - String recordsColl = "patients"; - - // start-key-vault - String keyVaultNamespace = "encryption.__keyVault"; - // end-key-vault - - // :state-start: aws-test azure-test local-test gcp-test - String connectionString = System.getenv("MONGODB_URI"); - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //String connectionString = "mongodb://localhost:27017"; - // :uncomment-end: - // :state-end: - - // start-kmsproviders - // :state-start: local-reader local-test - String kmsProvider = "local"; - String path = "master-key.txt"; - - byte[] localMasterKeyRead = new byte[96]; - - try (FileInputStream fis = new FileInputStream(path)) { - if (fis.read(localMasterKeyRead) < 96) - throw new Exception("Expected to read 96 bytes from file"); - } - Map keyMap = new HashMap(); - keyMap.put("key", localMasterKeyRead); - - Map> kmsProviders = new HashMap>(); - kmsProviders.put("local", keyMap); - // :state-end: - // :state-uncomment-start: aws-reader - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", ""); - //providerDetails.put("secretAccessKey", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", System.getenv("AWS_ACCESS_KEY_ID")); - //providerDetails.put("secretAccessKey", System.getenv("AWS_SECRET_ACCESS_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //String kmsProvider = "azure"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", ""); - //providerDetails.put("clientId", ""); - //providerDetails.put("clientSecret", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "azure"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", System.getenv("AZURE_TENANT_ID")); - //providerDetails.put("clientId", System.getenv("AZURE_CLIENT_ID")); - //providerDetails.put("clientSecret", System.getenv("AZURE_CLIENT_SECRET")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", ""); - //providerDetails.put("privateKey", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", System.getenv("GCP_EMAIL")); - //providerDetails.put("privateKey", System.getenv("GCP_PRIVATE_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // end-kmsproviders - - // start-schema - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //String dekId = ">"; - //Document jsonSchema = new Document().append("bsonType", "object").append("encryptMetadata", - // new Document().append("keyId", new ArrayList<>((Arrays.asList(new Document().append("$binary", new Document() - // .append("base64", dekId) - // .append("subType", "04"))))))) - // .append("properties", new Document() - // .append("ssn", new Document().append("encrypt", new Document() - // .append("bsonType", "int") - // .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"))) - // .append("bloodType", new Document().append("encrypt", new Document() - // .append("bsonType", "string") - // .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random"))) - // .append("medicalRecords", new Document().append("encrypt", new Document() - // .append("bsonType", "array") - // .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Random"))) - // .append("insurance", new Document() - // .append("bsonType", "object") - // .append("properties", - // new Document().append("policyNumber", new Document().append("encrypt", new Document() - // .append("bsonType", "int") - // .append("algorithm", "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic")))))); - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - Document jsonSchema = new Document().append("bsonType", "object").append("encryptMetadata", - new Document().append("keyId", "/key-id")) - .append("properties", new Document() - .append("ssn", new Document().append("encrypt", new Document() - .append("bsonType", "int") - .append("algorithm","AEAD_AES_256_CBC_HMAC_SHA_512-Random"))) - .append("bloodType", new Document().append("encrypt", new Document() - .append("bsonType", "string") - .append("algorithm","AEAD_AES_256_CBC_HMAC_SHA_512-Random"))) - .append("medicalRecords", new Document().append("encrypt", new Document() - .append("bsonType", "array") - .append("algorithm","AEAD_AES_256_CBC_HMAC_SHA_512-Random"))) - .append("insurance", new Document() - .append("bsonType", "object") - .append("properties", - new Document().append("policyNumber", new Document().append("encrypt", new Document() - .append("bsonType", "int") - .append("algorithm","AEAD_AES_256_CBC_HMAC_SHA_512-Random")))))); - // :state-end: - HashMap schemaMap = new HashMap(); - schemaMap.put("medicalRecords.patients", BsonDocument.parse(jsonSchema.toJson())); - // end-schema - - // start-extra-options - Map extraOptions = new HashMap(); - // :state-start: aws-reader azure-reader local-reader gcp-reader - // :uncomment-start: - //extraOptions.put("mongocryptdSpawnPath", "/usr/local/bin/mongocryptd"); - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test local-test gcp-test - extraOptions.put("mongocryptdSpawnPath", System.getenv("MONGCRYPTD_PATH")); - // :state-end: - // end-extra-options - - MongoClientSettings clientSettingsRegular = MongoClientSettings.builder() - .applyConnectionString(new ConnectionString(connectionString)) - .build(); - - MongoClient mongoClientRegular = MongoClients.create(clientSettingsRegular); - - // start-client - MongoClientSettings clientSettings = MongoClientSettings.builder() - .applyConnectionString(new ConnectionString(connectionString)) - .autoEncryptionSettings(AutoEncryptionSettings.builder() - .keyVaultNamespace(keyVaultNamespace) - .kmsProviders(kmsProviders) - .schemaMap(schemaMap) - .extraOptions(extraOptions) - .build()) - .build(); - - MongoClient mongoClientSecure = MongoClients.create(clientSettings); - // end-client - // start-insert - ArrayList medicalRecords = new ArrayList<>(); - medicalRecords.add(new Document().append("weight", "180")); - medicalRecords.add(new Document().append("bloodPressure", "120/80")); - - Document insurance = new Document() - .append("policyNumber", 123142) - .append("provider", "MaestCare"); - - Document patient = new Document() - .append("name", "Jon Doe") - .append("ssn", 241014209) - .append("bloodType", "AB+") - .append("medicalRecords", medicalRecords) - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //.append("insurance", insurance); - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - .append("insurance", insurance) - .append("key-id", "demo-data-key"); - // :state-end: - mongoClientSecure.getDatabase(recordsDb).getCollection(recordsColl).insertOne(patient); - // end-insert - // start-find - System.out.println("Finding a document with regular (non-encrypted) client."); - Document docRegular = mongoClientRegular.getDatabase(recordsDb).getCollection(recordsColl).find(eq("name", "Jon Doe")).first(); - System.out.println(docRegular.toJson()); - System.out.println("Finding a document with encrypted client, searching on an encrypted field"); - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //Document docSecure = mongoClientSecure.getDatabase(recordsDb).getCollection(recordsColl).find(eq("ssn", 241014209)).first(); - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - Document docSecure = mongoClientSecure.getDatabase(recordsDb).getCollection(recordsColl).find(eq("name", "Jon Doe")).first(); - // :state-end: - System.out.println(docSecure.toJson()); - // end-find - mongoClientSecure.close(); - mongoClientRegular.close(); - - } -} diff --git a/source/includes/sample_apps/csfle/java/src/main/java/com/mongodb/csfle/makeDataKey.java b/source/includes/sample_apps/csfle/java/src/main/java/com/mongodb/csfle/makeDataKey.java deleted file mode 100644 index 0b421bc044e..00000000000 --- a/source/includes/sample_apps/csfle/java/src/main/java/com/mongodb/csfle/makeDataKey.java +++ /dev/null @@ -1,243 +0,0 @@ -package com.mongodb.csfle; -/* - * Copyright 2008-present MongoDB, Inc. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import java.util.*; - -import java.util.HashMap; -import java.util.Map; -import java.util.Base64; - -import org.bson.BsonBinary; -import org.bson.BsonDocument; -import org.bson.BsonString; -import org.bson.BsonBoolean; -import org.bson.BsonInt32; - -import com.mongodb.ClientEncryptionSettings; -import com.mongodb.ConnectionString; -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; -import com.mongodb.client.MongoCollection; -import com.mongodb.MongoClientSettings; -import com.mongodb.client.model.vault.DataKeyOptions; -import com.mongodb.client.vault.ClientEncryption; -import com.mongodb.client.vault.ClientEncryptions; -import com.mongodb.client.model.IndexOptions; - -// :state-start: local-reader local-test -import java.io.FileOutputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.security.SecureRandom; -// :state-end: - -/* - * - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS - * - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS - * - Prints base 64-encoded value of the data encryption key - */ -public class makeDataKey { - - public static void main(String[] args) throws Exception { - // :state-start: local-reader local-test - byte[] localMasterKeyWrite = new byte[96]; - new SecureRandom().nextBytes(localMasterKeyWrite); - try (FileOutputStream stream = new FileOutputStream("master-key.txt")) { - stream.write(localMasterKeyWrite); - } - // :state-end: - - // start-kmsproviders - // :state-start: local-reader local-test - String kmsProvider = "local"; - String path = "master-key.txt"; - - byte[] localMasterKeyRead = new byte[96]; - - try (FileInputStream fis = new FileInputStream(path)) { - if (fis.read(localMasterKeyRead) < 96) - throw new Exception("Expected to read 96 bytes from file"); - } - Map keyMap = new HashMap(); - keyMap.put("key", localMasterKeyRead); - - Map> kmsProviders = new HashMap>(); - kmsProviders.put("local", keyMap); - // :state-end: - // :state-uncomment-start: aws-reader - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", new BsonString("")); - //providerDetails.put("secretAccessKey", new BsonString("")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //Map> kmsProviders = new HashMap>(); - //String kmsProvider = "aws"; - //Map providerDetails = new HashMap<>(); - //providerDetails.put("accessKeyId", System.getenv("AWS_ACCESS_KEY_ID")); - //providerDetails.put("secretAccessKey", System.getenv("AWS_SECRET_ACCESS_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //String kmsProvider = "azure"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", ""); - //providerDetails.put("clientId", ""); - //providerDetails.put("clientSecret", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: azure-test - //String kmsProvider = "azure"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("tenantId", System.getenv("AZURE_TENANT_ID")); - //providerDetails.put("clientId", System.getenv("AZURE_CLIENT_ID")); - //providerDetails.put("clientSecret", System.getenv("AZURE_CLIENT_SECRET")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-reader - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", ""); - //providerDetails.put("privateKey", ""); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //String kmsProvider = "gcp"; - //Map> kmsProviders = new HashMap>(); - //Map providerDetails = new HashMap<>(); - //providerDetails.put("email", System.getenv("GCP_EMAIL")); - //providerDetails.put("privateKey", System.getenv("GCP_PRIVATE_KEY")); - //kmsProviders.put(kmsProvider, providerDetails); - // :state-uncomment-end: - // end-kmsproviders - - // start-datakeyopts - // :state-start: local-reader local-test - // :state-end: - // :state-uncomment-start: aws-reader - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("key", new BsonString("")); - //masterKeyProperties.put("region", new BsonString("")); - // :state-uncomment-end: - // :state-uncomment-start: aws-test - //BsonDocument masterKeyProperties = new BsonDocument(); - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("key", new BsonString(System.getenv("AWS_KEY_ARN"))); - //masterKeyProperties.put("region", new BsonString(System.getenv("AWS_KEY_REGION"))); - // :state-uncomment-end: - // :state-uncomment-start: azure-reader - //BsonDocument masterKeyProperties = new BsonDocument(); - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("keyName", new BsonString("")); - //masterKeyProperties.put("keyVaultEndpoint", new BsonString("")); - //masterKeyProperties.put("location", new BsonString("")); - //masterKeyProperties.put("keyRing", new BsonString("")); - //masterKeyProperties.put("keyName", new BsonString("")); - // :state-uncomment-end: - // :state-uncomment-start: gcp-test - //BsonDocument masterKeyProperties = new BsonDocument(); - //masterKeyProperties.put("provider", new BsonString(kmsProvider)); - //masterKeyProperties.put("projectId", new BsonString(System.getenv("GCP_PROJECT_ID"))); - //masterKeyProperties.put("location", new BsonString(System.getenv("GCP_LOCATION"))); - //masterKeyProperties.put("keyRing", new BsonString(System.getenv("GCP_KEY_RING"))); - //masterKeyProperties.put("keyName", new BsonString(System.getenv("GCP_KEY_NAME"))); - // :state-uncomment-end: - // end-datakeyopts - - // start-create-index - // :state-start: aws-test azure-test local-test gcp-test - String connectionString = System.getenv("MONGODB_URI"); - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //String connectionString = ""; - // :uncomment-end: - // :state-end: - String keyVaultDb = "encryption"; - String keyVaultColl = "__keyVault"; - String keyVaultNamespace = keyVaultDb + "." + keyVaultColl; - MongoClient keyVaultClient = MongoClients.create(connectionString); - - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - keyVaultClient.getDatabase(keyVaultDb).getCollection(keyVaultColl).drop(); - // Drop the database storing your encrypted fields as all - // the DEKs encrypting those fields were deleted in the preceding line. - keyVaultClient.getDatabase("medicalRecords").getCollection("patients").drop(); - - - MongoCollection keyVaultCollection = keyVaultClient.getDatabase(keyVaultDb).getCollection(keyVaultColl); - IndexOptions indexOpts = new IndexOptions().partialFilterExpression(new BsonDocument("keyAltNames", new BsonDocument("$exists", new BsonBoolean(true) ))).unique(true); - keyVaultCollection.createIndex(new BsonDocument("keyAltNames", new BsonInt32(1)), indexOpts); - keyVaultClient.close(); - // end-create-index - - // start-create-dek - ClientEncryptionSettings clientEncryptionSettings = ClientEncryptionSettings.builder() - .keyVaultMongoClientSettings(MongoClientSettings.builder() - .applyConnectionString(new ConnectionString(connectionString)) - .build()) - .keyVaultNamespace(keyVaultNamespace) - .kmsProviders(kmsProviders) - .build(); - - MongoClient regularClient = MongoClients.create(connectionString); - - ClientEncryption clientEncryption = ClientEncryptions.create(clientEncryptionSettings); - // :state-uncomment-start: local-reader - //BsonBinary dataKeyId = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions()); - // :state-uncomment-end: - // :state-start: local-test - List keyAltNames = new ArrayList(); - keyAltNames.add("demo-data-key"); - BsonBinary dataKeyId = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions().keyAltNames(keyAltNames)); - // :state-end: - // :state-start: aws-reader azure-reader gcp-reader - // :uncomment-start: - //BsonBinary dataKeyId = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions().masterKey(masterKeyProperties)); - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test gcp-test - // :uncomment-start: - //List keyAltNames = new ArrayList(); - //keyAltNames.add("demo-data-key"); - //BsonBinary dataKeyId = clientEncryption.createDataKey(kmsProvider, new DataKeyOptions().masterKey(masterKeyProperties).keyAltNames(keyAltNames)); - // :uncomment-end: - // :state-end: - String base64DataKeyId = Base64.getEncoder().encodeToString(dataKeyId.getData()); - System.out.println("DataKeyId [base64]: " + base64DataKeyId); - clientEncryption.close(); - // end-create-dek - } -} diff --git a/source/includes/sample_apps/csfle/node-fle-2/.eslintrc.json b/source/includes/sample_apps/csfle/node-fle-2/.eslintrc.json deleted file mode 100644 index 1758e54a15d..00000000000 --- a/source/includes/sample_apps/csfle/node-fle-2/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true - }, - "extends": ["airbnb-base", "prettier"], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": {} -} diff --git a/source/includes/sample_apps/csfle/node-fle-2/.gitignore b/source/includes/sample_apps/csfle/node-fle-2/.gitignore deleted file mode 100644 index c6bba591381..00000000000 --- a/source/includes/sample_apps/csfle/node-fle-2/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* diff --git a/source/includes/sample_apps/csfle/node-fle-2/README.md b/source/includes/sample_apps/csfle/node-fle-2/README.md deleted file mode 100644 index 1bcf0d4e470..00000000000 --- a/source/includes/sample_apps/csfle/node-fle-2/README.md +++ /dev/null @@ -1,17 +0,0 @@ -These are the source files to build Node sample -applications to use Queryable Encryption following -KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build the Node applications, run the following command from the parent of this directory: - - python build.py --project node-fle-2 - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestNodeFLE2 diff --git a/source/includes/sample_apps/csfle/node-fle-2/insert_encrypted_document.js b/source/includes/sample_apps/csfle/node-fle-2/insert_encrypted_document.js deleted file mode 100644 index 58bb1127846..00000000000 --- a/source/includes/sample_apps/csfle/node-fle-2/insert_encrypted_document.js +++ /dev/null @@ -1,190 +0,0 @@ -const { MongoClient, Binary } = require("mongodb"); - -// start-key-vault -const eDB = "encryption"; -const eKV = "__keyVault"; -const keyVaultNamespace = `${eDB}.${eKV}`; -// end-key-vault - -// start-kmsproviders -// :state-start: local-reader local-test -const fs = require("fs"); -const provider = "local"; -const path = "./master-key.txt"; -// WARNING: Do not use a local key file in a production application -const localMasterKey = fs.readFileSync(path); -const kmsProviders = { - local: { - key: localMasterKey, - }, -}; -// :state-end: -// :state-uncomment-start: aws-reader -//const kmsProviders = { -// aws: { -// accessKeyId: "", -// secretAccessKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: aws-test -//const kmsProviders = { -// aws: { -// accessKeyId: process.env["AWS_ACCESS_KEY_ID"], -// secretAccessKey: process.env["AWS_SECRET_ACCESS_KEY"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-reader -//const kmsProviders = { -// azure: { -// tenantId: "", -// clientId: "", -// clientSecret: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-test -//const kmsProviders = { -// azure: { -// tenantId: process.env["AZURE_TENANT_ID"], -// clientId: process.env["AZURE_CLIENT_ID"], -// clientSecret: process.env["AZURE_CLIENT_SECRET"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-reader -//const kmsProviders = { -// gcp: { -// email: "", -// privateKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-test -//const kmsProviders = { -// gcp: { -// email: process.env["GCP_EMAIL"], -// privateKey: process.env["GCP_PRIVATE_KEY"], -// }, -//}; -// :state-uncomment-end: -// end-kmsproviders - -async function run() { - // start-schema - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //const uri = ""; - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - const uri = process.env.MONGODB_URI; - // :state-end: - const unencryptedClient = new MongoClient(uri); - await unencryptedClient.connect(); - const keyVaultClient = unencryptedClient.db(eDB).collection(eKV); - - const dek1 = await keyVaultClient.findOne({ keyAltNames: "dataKey1" }); - const dek2 = await keyVaultClient.findOne({ keyAltNames: "dataKey2" }); - const dek3 = await keyVaultClient.findOne({ keyAltNames: "dataKey3" }); - const dek4 = await keyVaultClient.findOne({ keyAltNames: "dataKey4" }); - - const secretDB = "medicalRecords"; - const secretCollection = "patients"; - - const encryptedFieldsMap = { - [`${secretDB}.${secretCollection}`]: { - fields: [ - { - keyId: dek1._id, - path: "patientId", - bsonType: "int", - queries: { queryType: "equality" }, - }, - { - keyId: dek2._id, - path: "medications", - bsonType: "array", - }, - { - keyId: dek3._id, - path: "patientRecord.ssn", - bsonType: "string", - queries: { queryType: "equality" }, - }, - { - keyId: dek4._id, - path: "patientRecord.billing", - bsonType: "object", - }, - ], - }, - }; - // end-schema - - // start-extra-options - const extraOptions = { - // :state-start: local-test aws-test azure-test gcp-test - cryptSharedLibPath: process.env["SHARED_LIB_PATH"], - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - // cryptSharedLibPath: "", - // :uncomment-end: - // :state-end: - }; - // end-extra-options - - // start-client - const encryptedClient = new MongoClient(uri, { - autoEncryption: { - keyVaultNamespace: keyVaultNamespace, - kmsProviders: kmsProviders, - extraOptions: extraOptions, - encryptedFieldsMap: encryptedFieldsMap, - }, - }); - await encryptedClient.connect(); - // end-client - try { - const unencryptedColl = unencryptedClient - .db(secretDB) - .collection(secretCollection); - - // start-insert - const encryptedColl = encryptedClient - .db(secretDB) - .collection(secretCollection); - await encryptedColl.insertOne({ - firstName: "Jon", - lastName: "Doe", - patientId: 12345678, - address: "157 Electric Ave.", - patientRecord: { - ssn: "987-65-4320", - billing: { - type: "Visa", - number: "4111111111111111", - }, - }, - medications: ["Atorvastatin", "Levothyroxine"], - }); - // end-insert - // start-find - console.log("Finding a document with regular (non-encrypted) client."); - console.log(await unencryptedColl.findOne({ firstName: /Jon/ })); - console.log( - "Finding a document with encrypted client, searching on an encrypted field" - ); - console.log( - await encryptedColl.findOne({ "patientRecord.ssn": "987-65-4320" }) - ); - // end-find - } finally { - await unencryptedClient.close(); - await encryptedClient.close(); - } -} - -run().catch(console.dir); diff --git a/source/includes/sample_apps/csfle/node-fle-2/make_data_key.js b/source/includes/sample_apps/csfle/node-fle-2/make_data_key.js deleted file mode 100644 index c67639f5bd3..00000000000 --- a/source/includes/sample_apps/csfle/node-fle-2/make_data_key.js +++ /dev/null @@ -1,258 +0,0 @@ -const { MongoClient, Binary } = require("mongodb"); -const { ClientEncryption } = require("mongodb-client-encryption"); - -const keyVaultDatabase = "encryption"; -const keyVaultCollection = "__keyVault"; -const keyVaultNamespace = `${keyVaultDatabase}.${keyVaultCollection}`; -const secretDB = "medicalRecords"; -const secretCollection = "patients"; - -// :state-start: local-reader local-test -const fs = require("fs"); -const crypto = require("crypto"); -try { - fs.writeFileSync("master-key.txt", crypto.randomBytes(96)); -} catch (err) { - console.error(err); -} -// :state-end: - -// start-kmsproviders -// :state-start: local-reader local-test -const provider = "local"; -const path = "./master-key.txt"; -// WARNING: Do not use a local key file in a production application -const localMasterKey = fs.readFileSync(path); -const kmsProviders = { - local: { - key: localMasterKey, - }, -}; -// :state-end: -// :state-uncomment-start: aws-reader -//const provider = "aws"; -//const kmsProviders = { -// aws: { -// accessKeyId: "", -// secretAccessKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: aws-test -//const provider = "aws"; -//const kmsProviders = { -// aws: { -// accessKeyId: process.env["AWS_ACCESS_KEY_ID"], -// secretAccessKey: process.env["AWS_SECRET_ACCESS_KEY"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-reader -//const provider = "azure"; -//const kmsProviders = { -// azure: { -// tenantId: "", -// clientId: "", -// clientSecret: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-test -//const provider = "azure"; -//const kmsProviders = { -// azure: { -// tenantId: process.env["AZURE_TENANT_ID"], -// clientId: process.env["AZURE_CLIENT_ID"], -// clientSecret: process.env["AZURE_CLIENT_SECRET"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-reader -//const provider = "gcp"; -//const kmsProviders = { -// gcp: { -// email: "", -// privateKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-test -//const provider = "gcp"; -//const kmsProviders = { -// gcp: { -// email: process.env["GCP_EMAIL"], -// privateKey: process.env["GCP_PRIVATE_KEY"], -// }, -//}; -// :state-uncomment-end: -// end-kmsproviders - -// start-datakeyopts -// :state-start: local-reader local-test -// :state-end: -// :state-uncomment-start: aws-reader -//const masterKey = { -// key: "", -// region: "", -//}; -// :state-uncomment-end: -// :state-uncomment-start: aws-test -//const masterKey = { -// key: process.env["AWS_KEY_ARN"], -// region: process.env["AWS_KEY_REGION"], -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-reader -//const masterKey = { -// keyVaultEndpoint: "", -// keyName: "", -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-test -//const masterKey = { -// keyVaultEndpoint: process.env["AZURE_KEY_VAULT_ENDPOINT"], -// keyName: process.env["AZURE_KEY_NAME"], -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-reader -//const masterKey = { -// projectId: "", -// location: "", -// keyRing: "", -// keyName: "", -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-test -//const masterKey = { -// projectId: process.env["GCP_PROJECT_ID"], -// location: process.env["GCP_LOCATION"], -// keyRing: process.env["GCP_KEY_RING"], -// keyName: process.env["GCP_KEY_NAME"], -//}; -// :state-uncomment-end: -// end-datakeyopts - -async function run() { - // start-create-index - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //const uri = ""; - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - const uri = process.env.MONGODB_URI; - // :state-end: - const keyVaultClient = new MongoClient(uri); - await keyVaultClient.connect(); - const keyVaultDB = keyVaultClient.db(keyVaultDatabase); - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - await keyVaultDB.dropDatabase(); - const keyVaultColl = keyVaultDB.collection(keyVaultCollection); - await keyVaultColl.createIndex( - { keyAltNames: 1 }, - { - unique: true, - partialFilterExpression: { keyAltNames: { $exists: true } }, - } - ); - // end-create-index - // start-create-dek - const clientEnc = new ClientEncryption(keyVaultClient, { - keyVaultNamespace: keyVaultNamespace, - kmsProviders: kmsProviders, - }); - const dek1 = await clientEnc.createDataKey(provider, { - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //masterKey: masterKey, - // :uncomment-end: - // :state-end: - keyAltNames: ["dataKey1"], - }); - const dek2 = await clientEnc.createDataKey(provider, { - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //masterKey: masterKey, - // :uncomment-end: - // :state-end: - keyAltNames: ["dataKey2"], - }); - const dek3 = await clientEnc.createDataKey(provider, { - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //masterKey: masterKey, - // :uncomment-end: - // :state-end: - keyAltNames: ["dataKey3"], - }); - const dek4 = await clientEnc.createDataKey(provider, { - // :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - // :uncomment-start: - //masterKey: masterKey, - // :uncomment-end: - // :state-end: - keyAltNames: ["dataKey4"], - }); - // end-create-dek - - // start-create-enc-collection - const encryptedFieldsMap = { - [`${secretDB}.${secretCollection}`]: { - fields: [ - { - keyId: dek1, - path: "patientId", - bsonType: "int", - queries: { queryType: "equality" }, - }, - { - keyId: dek2, - path: "medications", - bsonType: "array", - }, - { - keyId: dek3, - path: "patientRecord.ssn", - bsonType: "string", - queries: { queryType: "equality" }, - }, - { - keyId: dek4, - path: "patientRecord.billing", - bsonType: "object", - }, - ], - }, - }; - const extraOptions = { - // :state-start: local-test aws-test azure-test gcp-test - cryptSharedLibPath: process.env["SHARED_LIB_PATH"], - // :state-end: - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - // cryptSharedLibPath: "", - // :uncomment-end: - // :state-end: - }; - const encClient = new MongoClient(uri, { - autoEncryption: { - keyVaultNamespace, - kmsProviders, - extraOptions, - encryptedFieldsMap, - }, - }); - await encClient.connect(); - const newEncDB = encClient.db(secretDB); - // Drop the encrypted collection in case you created this collection - // in a previous run of this application. - await newEncDB.dropDatabase(); - await newEncDB.createCollection(secretCollection); - console.log("Created encrypted collection!"); - // end-create-enc-collection - await keyVaultClient.close(); - await encClient.close(); -} - -run().catch(console.dir); diff --git a/source/includes/sample_apps/csfle/node-fle-2/package-lock.json b/source/includes/sample_apps/csfle/node-fle-2/package-lock.json deleted file mode 100644 index 0f2c9983ccc..00000000000 --- a/source/includes/sample_apps/csfle/node-fle-2/package-lock.json +++ /dev/null @@ -1,1395 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "array-includes": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", - "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5", - "get-intrinsic": "^1.1.1", - "is-string": "^1.0.7" - } - }, - "array.prototype.flat": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", - "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.2", - "es-shim-unscopables": "^1.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "integrity": "sha512-Zy8ZXMyxIT6RMTeY7OP/bDndfj6bwCan7SS98CEndS6deHwWPpseeHlwarNcBim+etXnF9HBc1non5JgDaJU1g==" - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" - } - }, - "es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - } - }, - "eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "requires": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" - } - }, - "eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "resolve": "^1.20.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-module-utils": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", - "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "find-up": "^2.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-plugin-import": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", - "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", - "dev": true, - "requires": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", - "has": "^1.0.3", - "is-core-module": "^2.8.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", - "tsconfig-paths": "^3.14.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, - "espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", - "dev": true, - "requires": { - "acorn": "^8.7.1", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - } - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, - "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "jslint": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/jslint/-/jslint-0.12.1.tgz", - "integrity": "sha512-q5iHswjOmJffbsGVq/1umGh4YBxb5pCArNHCZeHpkuVDDKM6IldqUn4hLehKSwQr7Bn07VXjD34Lx3nw+6j8eA==", - "requires": { - "exit": "~0.1.2", - "glob": "~7.1.3", - "nopt": "~4.0.1", - "readable-stream": "~2.1.5" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "object-inspect": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.1.tgz", - "integrity": "sha512-Y/jF6vnvEtOPGiKD1+q+X0CiUYRQtEHp89MLLUJ7TUivtH8Ugn2+3A7Rynqk7BRsAoqeOQWnFnjpDrKSxDgIGA==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "readable-stream": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", - "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", - "requires": { - "buffer-shims": "^1.0.0", - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "tsconfig-paths": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", - "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", - "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -} diff --git a/source/includes/sample_apps/csfle/node-fle-2/package.json b/source/includes/sample_apps/csfle/node-fle-2/package.json deleted file mode 100644 index 73b43acca7e..00000000000 --- a/source/includes/sample_apps/csfle/node-fle-2/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "mongodb": "^4.6.0-alpha.0", - "mongodb-client-encryption": "^2.2.0-alpha.0" - } -} diff --git a/source/includes/sample_apps/csfle/node/.gitignore b/source/includes/sample_apps/csfle/node/.gitignore deleted file mode 100644 index c6bba591381..00000000000 --- a/source/includes/sample_apps/csfle/node/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* diff --git a/source/includes/sample_apps/csfle/node/README.md b/source/includes/sample_apps/csfle/node/README.md deleted file mode 100644 index 04582f54f08..00000000000 --- a/source/includes/sample_apps/csfle/node/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Node sample -applications that use CSFLE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Node applications, run the following command from the parent of this directory: - - python build.py --project node - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestNode diff --git a/source/includes/sample_apps/csfle/node/insert_encrypted_document.js b/source/includes/sample_apps/csfle/node/insert_encrypted_document.js deleted file mode 100644 index f4da76ee863..00000000000 --- a/source/includes/sample_apps/csfle/node/insert_encrypted_document.js +++ /dev/null @@ -1,253 +0,0 @@ -const mongodb = require("mongodb"); -const { ClientEncryption } = require("mongodb-client-encryption"); -const { MongoClient, Binary } = mongodb; - -var db = "medicalRecords"; -var coll = "patients"; -var namespace = `${db}.${coll}`; -// start-kmsproviders -// :state-start: local-reader local-test -const fs = require("fs"); -const provider = "local"; -const path = "./master-key.txt"; -const localMasterKey = fs.readFileSync(path); -const kmsProviders = { - local: { - key: localMasterKey, - }, -}; -// :state-end: -// :state-uncomment-start: aws-reader -//const kmsProviders = { -// aws: { -// accessKeyId: "", -// secretAccessKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: aws-test -//const kmsProviders = { -// aws: { -// accessKeyId: process.env["AWS_ACCESS_KEY_ID"], -// secretAccessKey: process.env["AWS_SECRET_ACCESS_KEY"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-reader -//const kmsProviders = { -// azure: { -// tenantId: "", -// clientId: "", -// clientSecret: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-test -//const kmsProviders = { -// azure: { -// tenantId: process.env["AZURE_TENANT_ID"], -// clientId: process.env["AZURE_CLIENT_ID"], -// clientSecret: process.env["AZURE_CLIENT_SECRET"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-reader -//const kmsProviders = { -// gcp: { -// email: "", -// privateKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-test -//const kmsProviders = { -// gcp: { -// email: process.env["GCP_EMAIL"], -// privateKey: process.env["GCP_PRIVATE_KEY"], -// }, -//}; -// :state-uncomment-end: -// end-kmsproviders - -// :state-start: local-reader aws-reader azure-reader gcp-reader -// :uncomment-start: -//const connectionString = ""; -// :uncomment-end: -// :state-end: -// :state-start: local-test aws-test azure-test gcp-test -const connectionString = process.env.MONGODB_URI; -// :state-end: - -// start-key-vault -const keyVaultNamespace = "encryption.__keyVault"; -// end-key-vault - - -// start-schema -// :state-start: local-reader aws-reader azure-reader gcp-reader -// :uncomment-start: -//dataKey = ""; -//const schema = { -// bsonType: "object", -// encryptMetadata: { -// keyId: [new Binary(Buffer.from(dataKey, "base64"), 4)], -// }, -// properties: { -// insurance: { -// bsonType: "object", -// properties: { -// policyNumber: { -// encrypt: { -// bsonType: "int", -// algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic", -// }, -// }, -// }, -// }, -// medicalRecords: { -// encrypt: { -// bsonType: "array", -// algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Random", -// }, -// }, -// bloodType: { -// encrypt: { -// bsonType: "string", -// algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Random", -// }, -// }, -// ssn: { -// encrypt: { -// bsonType: "int", -// algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic", -// }, -// }, -// }, -// }; -// :uncomment-end: -// :state-end: -// :state-start: local-test aws-test azure-test gcp-test -const schema = { - bsonType: "object", - encryptMetadata: { - keyId: "/key-id", - }, - properties: { - insurance: { - bsonType: "object", - properties: { - policyNumber: { - encrypt: { - bsonType: "int", - algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Random", - }, - }, - }, - }, - medicalRecords: { - encrypt: { - bsonType: "array", - algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Random", - }, - }, - bloodType: { - encrypt: { - bsonType: "string", - algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Random", - }, - }, - ssn: { - encrypt: { - bsonType: "int", - algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Random", - }, - }, - }, -}; -// :state-end: -var patientSchema = {}; -patientSchema[namespace] = schema; -// end-schema - -// start-extra-options -// :state-start: aws-reader azure-reader local-reader gcp-reader -// :uncomment-start: -//const extraOptions = { -// mongocryptdSpawnPath: '/usr/local/bin/mongocryptd', -//}; -// :uncomment-end: -// :state-end: -// :state-start: aws-test azure-test local-test gcp-test -const extraOptions = { - mongocryptdSpawnPath: process.env["MONGCRYPTD_PATH"], -}; -// :state-end: -// end-extra-options - - -// start-client -const secureClient = new MongoClient(connectionString, { - useNewUrlParser: true, - useUnifiedTopology: true, - autoEncryption: { - keyVaultNamespace, - kmsProviders, - schemaMap: patientSchema, - extraOptions: extraOptions, - }, -}); -// end-client -const regularClient = new MongoClient(connectionString, { - useNewUrlParser: true, - useUnifiedTopology: true, -}); - -async function main() { - try { - await regularClient.connect(); - try{ - await secureClient.connect(); - // start-insert - try { - const writeResult = await secureClient.db(db).collection(coll).insertOne({ - name: "Jon Doe", - ssn: 241014209, - bloodType: "AB+", - // :state-start: local-test aws-test azure-test gcp-test - "key-id": "demo-data-key", - // :state-end: - medicalRecords: [{ weight: 180, bloodPressure: "120/80" }], - insurance: { - policyNumber: 123142, - provider: "MaestCare", - }, - }); - } catch (writeError) { - console.error("writeError occurred:", writeError); - } - // end-insert - // start-find - console.log("Finding a document with regular (non-encrypted) client."); - console.log(await regularClient.db(db).collection(coll).findOne({ name: /Jon/ })); - console.log( - "Finding a document with encrypted client, searching on an encrypted field" - ); - console.log( - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //await secureClient.db(db).collection(coll).findOne({ ssn: "241014209" }) - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - await secureClient.db(db).collection(coll).findOne({ name: /Jon/ }) - // :state-end: - ); - // end-find - } finally { - await secureClient.close(); - } - } finally { - await regularClient.close(); - } -} -main(); diff --git a/source/includes/sample_apps/csfle/node/make_data_key.js b/source/includes/sample_apps/csfle/node/make_data_key.js deleted file mode 100644 index 4430411c4e5..00000000000 --- a/source/includes/sample_apps/csfle/node/make_data_key.js +++ /dev/null @@ -1,201 +0,0 @@ -const mongodb = require("mongodb"); -const { ClientEncryption } = require("mongodb-client-encryption"); -const { MongoClient, Binary } = mongodb; - -// :state-start: local-reader local-test -const fs = require("fs"); -const crypto = require("crypto"); -try { - fs.writeFileSync("master-key.txt", crypto.randomBytes(96)); -} catch (err) { - console.error(err); -} -// :state-end: - -// start-kmsproviders -// :state-start: local-reader local-test -const provider = "local"; -const path = "./master-key.txt"; -const localMasterKey = fs.readFileSync(path); -const kmsProviders = { - local: { - key: localMasterKey, - }, -}; -// :state-end: -// :state-uncomment-start: aws-reader -//const provider = "aws"; -//const kmsProviders = { -// aws: { -// accessKeyId: "", -// secretAccessKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: aws-test -//const provider = "aws"; -//const kmsProviders = { -// aws: { -// accessKeyId: process.env["AWS_ACCESS_KEY_ID"], -// secretAccessKey: process.env["AWS_SECRET_ACCESS_KEY"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-reader -//const provider = "azure"; -//const kmsProviders = { -// azure: { -// tenantId: "", -// clientId: "", -// clientSecret: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-test -//const provider = "azure"; -//const kmsProviders = { -// azure: { -// tenantId: process.env["AZURE_TENANT_ID"], -// clientId: process.env["AZURE_CLIENT_ID"], -// clientSecret: process.env["AZURE_CLIENT_SECRET"], -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-reader -//const provider = "gcp"; -//const kmsProviders = { -// gcp: { -// email: "", -// privateKey: "", -// }, -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-test -//const provider = "gcp"; -//const kmsProviders = { -// gcp: { -// email: process.env["GCP_EMAIL"], -// privateKey: process.env["GCP_PRIVATE_KEY"], -// }, -//}; -// :state-uncomment-end: -// end-kmsproviders - -// start-datakeyopts -// :state-start: local-reader local-test -// :state-end: -// :state-uncomment-start: aws-reader -//const masterKey = { -// key: "", -// region: "", -//}; -// :state-uncomment-end: -// :state-uncomment-start: aws-test -//const masterKey = { -// key: process.env["AWS_KEY_ARN"], -// region: process.env["AWS_KEY_REGION"], -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-reader -//const masterKey = { -// keyVaultEndpoint: "", -// keyName: "", -//}; -// :state-uncomment-end: -// :state-uncomment-start: azure-test -//const masterKey = { -// keyVaultEndpoint: process.env["AZURE_KEY_VAULT_ENDPOINT"], -// keyName: process.env["AZURE_KEY_NAME"], -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-reader -//const masterKey = { -// projectId: "", -// location: "", -// keyRing: "", -// keyName: "", -//}; -// :state-uncomment-end: -// :state-uncomment-start: gcp-test -//const masterKey = { -// projectId: process.env["GCP_PROJECT_ID"], -// location: process.env["GCP_LOCATION"], -// keyRing: process.env["GCP_KEY_RING"], -// keyName: process.env["GCP_KEY_NAME"], -//}; -// :state-uncomment-end: -// end-datakeyopts - - - -async function main() { - // start-create-index - // :state-start: local-reader aws-reader azure-reader gcp-reader - // :uncomment-start: - //const uri = ""; - // :uncomment-end: - // :state-end: - // :state-start: local-test aws-test azure-test gcp-test - const uri = process.env.MONGODB_URI; - // :state-end: - const keyVaultDatabase = "encryption"; - const keyVaultCollection = "__keyVault"; - const keyVaultNamespace = `${keyVaultDatabase}.${keyVaultCollection}`; - const keyVaultClient = new MongoClient(uri); - await keyVaultClient.connect(); - const keyVaultDB = keyVaultClient.db(keyVaultDatabase); - // Drop the Key Vault Collection in case you created this collection - // in a previous run of this application. - await keyVaultDB.dropDatabase(); - // Drop the database storing your encrypted fields as all - // the DEKs encrypting those fields were deleted in the preceding line. - await keyVaultClient.db("medicalRecords").dropDatabase(); - const keyVaultColl = keyVaultDB.collection(keyVaultCollection); - await keyVaultColl.createIndex( - { keyAltNames: 1 }, - { - unique: true, - partialFilterExpression: { keyAltNames: { $exists: true } }, - } - ); - // end-create-index - // start-create-dek - const client = new MongoClient(uri, { - useNewUrlParser: true, - useUnifiedTopology: true, - }); - await client.connect(); - const encryption = new ClientEncryption(client, { - keyVaultNamespace, - kmsProviders, - }); - // :state-uncomment-start: local-reader - //const key = await encryption.createDataKey(provider); - // :state-uncomment-end: - // :state-start: local-test - const key = await encryption.createDataKey(provider, { - keyAltNames: ["demo-data-key"], - }); - // :state-end: - // :state-start: aws-reader azure-reader gcp-reader - // :uncomment-start: - //const key = await encryption.createDataKey( - // provider, - // { masterKey: masterKey }, - //); - // :uncomment-end: - // :state-end: - // :state-start: aws-test azure-test gcp-test - // :uncomment-start: - //const key = await encryption.createDataKey( - // provider, - // { masterKey: masterKey, keyAltNames: ["demo-data-key"] } - //); - // :uncomment-end: - // :state-end: - console.log("DataKeyId [base64]: ", key.toString("base64")); - await keyVaultClient.close() - await client.close(); - // end-create-dek -} -main(); diff --git a/source/includes/sample_apps/csfle/node/package-lock.json b/source/includes/sample_apps/csfle/node/package-lock.json deleted file mode 100644 index da1f1071808..00000000000 --- a/source/includes/sample_apps/csfle/node/package-lock.json +++ /dev/null @@ -1,3369 +0,0 @@ -{ - "name": "csfle", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "csfle", - "version": "1.0.0", - "license": "Apache-2.0", - "dependencies": { - "dotenv": "^8.2.0", - "mongodb": "^4.1.1", - "mongodb-client-encryption": "1.2.6" - }, - "devDependencies": { - "eslint": "^7.15.0", - "prettier": "^2.2.1" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", - "dev": true - }, - "node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", - "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@types/node": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.0.tgz", - "integrity": "sha512-nmP+VR4oT0pJUPFbKE4SXj3Yb4Q/kz3M9dSAO1GGMebRKWHQxLfDNmU/yh3xxCJha3N60nQ/JwXWwOE/ZSEVag==" - }, - "node_modules/@types/webidl-conversions": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", - "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" - }, - "node_modules/@types/whatwg-url": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz", - "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==", - "dependencies": { - "@types/node": "*", - "@types/webidl-conversions": "*" - } - }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "node_modules/are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/bson": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.1.tgz", - "integrity": "sha512-XqFP74pbTVLyLy5KFxVfTUyRrC1mgOlmu/iXHfXqfCKT59jyP9lwbotGfbN59cHBRbJSamZNkrSopjv+N0SqAA==", - "dependencies": { - "buffer": "^5.6.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/chalk/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/chalk/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "dependencies": { - "mimic-response": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "node_modules/denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz", - "integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.2.0", - "esutils": "^2.0.2", - "file-entry-cache": "^6.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "node_modules/file-entry-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", - "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", - "dev": true - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "node_modules/gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dependencies": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" - }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "dependencies": { - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", - "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "node_modules/mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "node_modules/mongodb": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.1.tgz", - "integrity": "sha512-fbACrWEyvr6yl0sSiCGV0sqEiBwTtDJ8iSojmkDjAfw9JnOZSAkUyv9seFSPYhPPKwxp1PDtyjvBNfMDz0WBLQ==", - "dependencies": { - "bson": "^4.5.1", - "denque": "^1.5.0", - "mongodb-connection-string-url": "^2.0.0" - }, - "engines": { - "node": ">=12.9.0" - }, - "optionalDependencies": { - "saslprep": "^1.0.0" - } - }, - "node_modules/mongodb-client-encryption": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/mongodb-client-encryption/-/mongodb-client-encryption-1.2.6.tgz", - "integrity": "sha512-GOO0PKAkbqPy27tRs26PdEu2wypdMLLjEOVUd7obRg7nj9I3f7dYCDWQzgT+HfsEbHnCLq7z4jDcmgUorSAXwA==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.5.0", - "bl": "^2.2.1", - "nan": "^2.14.2", - "prebuild-install": "6.1.2" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "mongodb": ">=3.4.0" - } - }, - "node_modules/mongodb-connection-string-url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.0.0.tgz", - "integrity": "sha512-M0I1vyLoq5+HQTuPSJWbt+hIXsMCfE8sS1fS5mvP9R2DOMoi2ZD32yWqgBIITyu0dFu4qtS50erxKjvUeBiyog==", - "dependencies": { - "@types/whatwg-url": "^8.2.1", - "whatwg-url": "^9.1.0" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "node_modules/node-abi": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.0.tgz", - "integrity": "sha512-g6bZh3YCKQRdwuO/tSZZYJAw622SjsRfJ2X0Iy4sSOHZ34/sPPdVBn8fev2tj7njzLwuqPw9uMtGsGkO5kIQvg==", - "dependencies": { - "semver": "^5.4.1" - } - }, - "node_modules/noop-logger": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", - "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" - }, - "node_modules/npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dependencies": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/prebuild-install": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.2.tgz", - "integrity": "sha512-PzYWIKZeP+967WuKYXlTOhYBgGOvTRSfaKI89XnfJ0ansRAH7hDU45X+K+FZeI1Wb/7p/NnuctPH3g0IqKUuSQ==", - "dependencies": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "noop-logger": "^0.1.1", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" - }, - "node_modules/saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "dependencies": { - "sparse-bitfield": "^3.0.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", - "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", - "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "dependencies": { - "memory-pager": "^1.0.2" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/table/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/table/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream/node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", - "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "node_modules/v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", - "dev": true - }, - "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "engines": { - "node": ">=10.4" - } - }, - "node_modules/whatwg-url": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", - "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", - "dependencies": { - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, - "@eslint/eslintrc": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", - "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } - } - }, - "@types/node": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.0.tgz", - "integrity": "sha512-nmP+VR4oT0pJUPFbKE4SXj3Yb4Q/kz3M9dSAO1GGMebRKWHQxLfDNmU/yh3xxCJha3N60nQ/JwXWwOE/ZSEVag==" - }, - "@types/webidl-conversions": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", - "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" - }, - "@types/whatwg-url": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz", - "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==", - "requires": { - "@types/node": "*", - "@types/webidl-conversions": "*" - } - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "bson": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.1.tgz", - "integrity": "sha512-XqFP74pbTVLyLy5KFxVfTUyRrC1mgOlmu/iXHfXqfCKT59jyP9lwbotGfbN59cHBRbJSamZNkrSopjv+N0SqAA==", - "requires": { - "buffer": "^5.6.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "requires": { - "mimic-response": "^2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==" - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz", - "integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.2.0", - "esutils": "^2.0.2", - "file-entry-cache": "^6.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "file-entry-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", - "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", - "dev": true - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", - "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - } - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "mongodb": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.1.tgz", - "integrity": "sha512-fbACrWEyvr6yl0sSiCGV0sqEiBwTtDJ8iSojmkDjAfw9JnOZSAkUyv9seFSPYhPPKwxp1PDtyjvBNfMDz0WBLQ==", - "requires": { - "bson": "^4.5.1", - "denque": "^1.5.0", - "mongodb-connection-string-url": "^2.0.0", - "saslprep": "^1.0.0" - } - }, - "mongodb-client-encryption": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/mongodb-client-encryption/-/mongodb-client-encryption-1.2.6.tgz", - "integrity": "sha512-GOO0PKAkbqPy27tRs26PdEu2wypdMLLjEOVUd7obRg7nj9I3f7dYCDWQzgT+HfsEbHnCLq7z4jDcmgUorSAXwA==", - "requires": { - "bindings": "^1.5.0", - "bl": "^2.2.1", - "nan": "^2.14.2", - "prebuild-install": "6.1.2" - } - }, - "mongodb-connection-string-url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.0.0.tgz", - "integrity": "sha512-M0I1vyLoq5+HQTuPSJWbt+hIXsMCfE8sS1fS5mvP9R2DOMoi2ZD32yWqgBIITyu0dFu4qtS50erxKjvUeBiyog==", - "requires": { - "@types/whatwg-url": "^8.2.1", - "whatwg-url": "^9.1.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" - }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "node-abi": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.0.tgz", - "integrity": "sha512-g6bZh3YCKQRdwuO/tSZZYJAw622SjsRfJ2X0Iy4sSOHZ34/sPPdVBn8fev2tj7njzLwuqPw9uMtGsGkO5kIQvg==", - "requires": { - "semver": "^5.4.1" - } - }, - "noop-logger": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", - "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "prebuild-install": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.2.tgz", - "integrity": "sha512-PzYWIKZeP+967WuKYXlTOhYBgGOvTRSfaKI89XnfJ0ansRAH7hDU45X+K+FZeI1Wb/7p/NnuctPH3g0IqKUuSQ==", - "requires": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "noop-logger": "^0.1.1", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" - }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" - }, - "simple-get": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", - "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", - "requires": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - } - } - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "requires": { - "punycode": "^2.1.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, - "uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", - "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", - "dev": true - }, - "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" - }, - "whatwg-url": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", - "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", - "requires": { - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } -} diff --git a/source/includes/sample_apps/csfle/node/package.json b/source/includes/sample_apps/csfle/node/package.json deleted file mode 100644 index b00a56aff6d..00000000000 --- a/source/includes/sample_apps/csfle/node/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "csfle", - "version": "1.0.0", - "description": "A sample implementation of field level encryption in MongoDB, meant to accompany the CSFLE guide at https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide/", - "main": "clients.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mongodb-university/csfle-guides.git" - }, - "author": "Developer Education Team", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/mongodb-university/csfle-guides/issues" - }, - "homepage": "https://github.com/mongodb-university/csfle-guides#readme", - "dependencies": { - "dotenv": "^8.2.0", - "mongodb": "^4.1.1", - "mongodb-client-encryption": "1.2.6" - }, - "prettier": { - "semi": true - }, - "devDependencies": { - "eslint": "^7.15.0", - "prettier": "^2.2.1" - } -} diff --git a/source/includes/sample_apps/csfle/python-fle-2/.gitignore b/source/includes/sample_apps/csfle/python-fle-2/.gitignore deleted file mode 100644 index 391bbcade4f..00000000000 --- a/source/includes/sample_apps/csfle/python-fle-2/.gitignore +++ /dev/null @@ -1 +0,0 @@ -libmongocrypt/*/* diff --git a/source/includes/sample_apps/csfle/python-fle-2/README.md b/source/includes/sample_apps/csfle/python-fle-2/README.md deleted file mode 100644 index a3f0359532a..00000000000 --- a/source/includes/sample_apps/csfle/python-fle-2/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Python sample -applications that use Queryable Encryption with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Python applications, run the following command from the parent of this directory: - - python build.py --project python-fle-2 - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestPythonFLE2 diff --git a/source/includes/sample_apps/csfle/python-fle-2/insert_encrypted_document.py b/source/includes/sample_apps/csfle/python-fle-2/insert_encrypted_document.py deleted file mode 100644 index 84ee3ed6d1d..00000000000 --- a/source/includes/sample_apps/csfle/python-fle-2/insert_encrypted_document.py +++ /dev/null @@ -1,184 +0,0 @@ -from pymongo import MongoClient -from pymongo.encryption_options import AutoEncryptionOpts -from pymongo.encryption import ClientEncryption -import base64 -import os -from bson.codec_options import CodecOptions -from bson.binary import STANDARD, UUID -import pprint - -# start-key-vault -key_vault_db = "encryption" -key_vault_coll = "__keyVault" -key_vault_namespace = "encryption.__keyVault" -# end-key-vault - -# start-kmsproviders -# :state-start: local-reader local-test -provider = "local" -path = "./master-key.txt" -# WARNING: Do not use a local key file in a production application -with open(path, "rb") as f: - local_master_key = f.read() -kms_providers = { - "local": { - "key": local_master_key # local_master_key variable from the previous step - }, -} -# :state-end: -# :state-uncomment-start: aws-reader -# provider="aws" -# kms_providers = { -# provider: { -# "accessKeyId": "", -# "secretAccessKey": "" -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: aws-test -# provider="aws" -# kms_providers = { -# provider: { -# "accessKeyId": os.getenv("AWS_ACCESS_KEY_ID"), -# "secretAccessKey": os.getenv("AWS_SECRET_ACCESS_KEY"), -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: azure-reader -#provider = "azure" -#kms_providers = { -# provider: { -# "tenantId": "", -# "clientId": "", -# "clientSecret": "", -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: azure-test -#provider = "azure" -#kms_providers = { -# provider: { -# "tenantId": os.getenv("AZURE_TENANT_ID"), -# "clientId": os.getenv("AZURE_CLIENT_ID"), -# "clientSecret": os.getenv("AZURE_CLIENT_SECRET"), -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-reader -#provider = "gcp" -#kms_providers = { -# provider: { -# "email": "", -# "privateKey": "" -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-test -#provider = "azure" -#provider = "gcp" -#kms_providers = { -# provider: { -# "email": os.getenv("GCP_EMAIL"), -# "privateKey": os.getenv("GCP_PRIVATE_KEY") -# } -#} -# :state-uncomment-end: -# end-kmsproviders - -# start-schema -# :state-start: aws-test azure-test local-test gcp-test -connection_string = os.getenv("MONGODB_URI") -# :state-end: -# :state-start: local-reader aws-reader azure-reader gcp-reader -# :uncomment-start: -#connection_string = "" -# :uncomment-end: -# :state-end: - -unencryptedClient = MongoClient(connection_string) -keyVaultClient = unencryptedClient[key_vault_db][key_vault_coll] -data_key_id_1 = keyVaultClient.find_one({"keyAltNames": "dataKey1"})["_id"] -data_key_id_2 = keyVaultClient.find_one({"keyAltNames": "dataKey2"})["_id"] -data_key_id_3 = keyVaultClient.find_one({"keyAltNames": "dataKey3"})["_id"] -data_key_id_4 = keyVaultClient.find_one({"keyAltNames": "dataKey4"})["_id"] - -encrypted_db_name = "medicalRecords" -encrypted_coll_name = "patients" - -encrypted_fields_map = { - f"{encrypted_db_name}.{encrypted_coll_name}": { - "fields": [ - { - "keyId": data_key_id_1, - "path": "patientId", - "bsonType": "int", - "queries": {"queryType": "equality"}, - }, - { - "keyId": data_key_id_2, - "path": "medications", - "bsonType": "array", - }, - { - "keyId": data_key_id_3, - "path": "patientRecord.ssn", - "bsonType": "string", - "queries": {"queryType": "equality"}, - }, - { - "keyId": data_key_id_4, - "path": "patientRecord.billing", - "bsonType": "object", - }, - ], - }, -} -# end-schema - -# start-extra-options -auto_encryption = AutoEncryptionOpts( - kms_providers, - key_vault_namespace, - encrypted_fields_map=encrypted_fields_map, - schema_map=None, - # :state-start: local-test aws-test azure-test gcp-test - crypt_shared_lib_path= os.getenv("SHARED_LIB_PATH"), - # :state-end: - # :state-start: local-reader aws-reader azure-reader gcp-reader - # :uncomment-start: - #crypt_shared_lib_path= "", - # :uncomment-end: - # :state-end: -) -# end-extra-options - -# start-client -secure_client = MongoClient(connection_string, auto_encryption_opts=auto_encryption) -# end-client - -# start-insert -encrypted_coll = secure_client[encrypted_db_name][encrypted_coll_name] -encrypted_coll.insert_one( - { - "firstName": "Jon", - "lastName": "Doe", - "patientId": 12345678, - "address": "157 Electric Ave.", - "patientRecord": { - "ssn": "987-65-4320", - "billing": { - "type": "Visa", - "number": "4111111111111111", - }, - }, - "medications": ["Atorvastatin", "Levothyroxine"], - } -) -# end-insert - -# start-find -print("Finding a document with regular (non-encrypted) client.") -pprint.pprint(unencryptedClient[encrypted_db_name][encrypted_coll_name].find_one({"firstName": "Jon"})) -print("Finding a document with encrypted client, searching on an encrypted field") -pprint.pprint(encrypted_coll.find_one({ "patientRecord.ssn": "987-65-4320" })) -# end-find diff --git a/source/includes/sample_apps/csfle/python-fle-2/make_data_key.py b/source/includes/sample_apps/csfle/python-fle-2/make_data_key.py deleted file mode 100644 index 7119e9de3dc..00000000000 --- a/source/includes/sample_apps/csfle/python-fle-2/make_data_key.py +++ /dev/null @@ -1,251 +0,0 @@ -from pymongo import MongoClient, ASCENDING -from pymongo.encryption_options import AutoEncryptionOpts -from pymongo.encryption import ClientEncryption, MongoCryptOptions -import base64 -import os -from bson.codec_options import CodecOptions -from bson.binary import STANDARD, UUID - -import os -# :state-start: local-reader local-test -path = "master-key.txt" -file_bytes = os.urandom(96) -with open(path, "wb") as f: - f.write(file_bytes) -# :state-end: - -# start-kmsproviders -# :state-start: local-reader local-test -provider = "local" -path = "./master-key.txt" -# WARNING: Do not use a local key file in a production application -with open(path, "rb") as f: - local_master_key = f.read() -kms_providers = { - "local": { - "key": local_master_key # local_master_key variable from the previous step - }, -} -# :state-end: -# :state-uncomment-start: aws-reader -# provider="aws" -# kms_providers = { -# provider: { -# "accessKeyId": "", -# "secretAccessKey": "" -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: aws-test -# provider="aws" -# kms_providers = { -# provider: { -# "accessKeyId": os.getenv("AWS_ACCESS_KEY_ID"), -# "secretAccessKey": os.getenv("AWS_SECRET_ACCESS_KEY"), -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: azure-reader -#provider = "azure" -#kms_providers = { -# provider: { -# "tenantId": "", -# "clientId": "", -# "clientSecret": "", -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: azure-test -#provider = "azure" -#kms_providers = { -# provider: { -# "tenantId": os.getenv("AZURE_TENANT_ID"), -# "clientId": os.getenv("AZURE_CLIENT_ID"), -# "clientSecret": os.getenv("AZURE_CLIENT_SECRET"), -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-reader -#provider = "gcp" -#kms_providers = { -# provider: { -# "email": "", -# "privateKey": "" -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-test -#provider = "azure" -#provider = "gcp" -#kms_providers = { -# provider: { -# "email": os.getenv("GCP_EMAIL"), -# "privateKey": os.getenv("GCP_PRIVATE_KEY") -# } -#} -# :state-uncomment-end: -# end-kmsproviders - -# start-datakeyopts -# :state-start: local-reader local-test -# :state-end: -# :state-uncomment-start: aws-reader -# master_key={ "region": "", "key": "" } -# :state-uncomment-end: -# :state-uncomment-start: aws-test -# master_key={ "region": os.getenv("AWS_KEY_REGION"), "key": os.getenv("AWS_KEY_ARN") } -# :state-uncomment-end: -# :state-uncomment-start: azure-reader -#master_key = { -# "keyName": "", -# "keyVersion": "", -# "keyVaultEndpoint": "", -#} -# :state-uncomment-end: -# :state-uncomment-start: azure-test -#master_key = { -# "keyName": os.getenv("AZURE_KEY_NAME"), -# "keyVaultEndpoint": os.getenv("AZURE_KEY_VAULT_ENDPOINT"), -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-reader -#master_key = { -# "projectId": "", -# "location": "", -# "keyRing": "", -# "keyName": "", -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-test -#master_key = { -# "projectId": os.getenv("GCP_PROJECT_ID"), -# "location": os.getenv("GCP_LOCATION"), -# "keyRing": os.getenv("GCP_KEY_RING"), -# "keyName": os.getenv("GCP_KEY_NAME"), -#} -# :state-uncomment-end: -# end-datakeyopts - - -# start-create-index -# :state-start: aws-test azure-test local-test gcp-test -connection_string = os.getenv("MONGODB_URI") -# :state-end: -# :state-start: local-reader aws-reader azure-reader gcp-reader -# :uncomment-start: -#connection_string = "" -# :uncomment-end: -# :state-end: - -key_vault_coll = "__keyVault" -key_vault_db = "encryption" -key_vault_namespace = f"{key_vault_db}.{key_vault_coll}" -key_vault_client = MongoClient(connection_string); -# Drop the Key Vault Collection in case you created this collection -# in a previous run of this application. -key_vault_client.drop_database(key_vault_db); - -key_vault_client[key_vault_db][key_vault_coll].create_index( - [("keyAltNames", ASCENDING )], - unique = True, - partialFilterExpression = { "keyAltNames": { "$exists": True } }) -# end-create-index - -# start-create-dek -client = MongoClient(connection_string) -client_encryption = ClientEncryption( - kms_providers, # pass in the kms_providers variable from the previous step - key_vault_namespace, - client, - CodecOptions(uuid_representation=STANDARD), -) - -data_key_id_1 = client_encryption.create_data_key(provider, - # :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - # :uncomment-start: - #master_key= master_key, - # :uncomment-end: - # :state-end: - key_alt_names=["dataKey1"]) -data_key_id_2 = client_encryption.create_data_key(provider, - # :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - # :uncomment-start: - #master_key= master_key, - # :uncomment-end: - # :state-end: - key_alt_names=["dataKey2"]) -data_key_id_3 = client_encryption.create_data_key(provider, - # :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - # :uncomment-start: - #master_key= master_key, - # :uncomment-end: - # :state-end: - key_alt_names=["dataKey3"]) -data_key_id_4 = client_encryption.create_data_key(provider, - # :state-start: aws-test aws-reader azure-test azure-reader gcp-test gcp-reader - # :uncomment-start: - #master_key= master_key, - # :uncomment-end: - # :state-end: - key_alt_names=["dataKey4"]) -# end-create-dek - - -# start-create-enc-collection -encrypted_db_name = "medicalRecords" -encrypted_coll_name = "patients" -encrypted_fields_map = { - f"{encrypted_db_name}.{encrypted_coll_name}": { - "fields": [ - { - "keyId": data_key_id_1, - "path": "patientId", - "bsonType": "int", - "queries": {"queryType": "equality"}, - }, - { - "keyId": data_key_id_2, - "path": "medications", - "bsonType": "array", - }, - { - "keyId": data_key_id_3, - "path": "patientRecord.ssn", - "bsonType": "string", - "queries": {"queryType": "equality"}, - }, - { - "keyId": data_key_id_4, - "path": "patientRecord.billing", - "bsonType": "object", - }, - ], - }, -} - -key_vault_namespace = "encryption.__keyVault" - - -auto_encryption = AutoEncryptionOpts( - kms_providers, - key_vault_namespace, - encrypted_fields_map=encrypted_fields_map, - schema_map=None, - # :state-start: local-test aws-test azure-test gcp-test - crypt_shared_lib_path= os.getenv("SHARED_LIB_PATH"), - # :state-end: - # :state-start: local-reader aws-reader azure-reader gcp-reader - # :uncomment-start: - #crypt_shared_lib_path= "", - # :uncomment-end: - # :state-end: -) - -secure_client = MongoClient(connection_string, auto_encryption_opts=auto_encryption) -# Drop the encrypted collection in case you created this collection -# in a previous run of this application. -secure_client.drop_database(encrypted_db_name) -encrypted_db = secure_client[encrypted_db_name] -encrypted_db.create_collection(encrypted_coll_name) -print("Created encrypted collection!") -# end-create-enc-collection diff --git a/source/includes/sample_apps/csfle/python-fle-2/requirements.sh b/source/includes/sample_apps/csfle/python-fle-2/requirements.sh deleted file mode 100644 index e19197a4386..00000000000 --- a/source/includes/sample_apps/csfle/python-fle-2/requirements.sh +++ /dev/null @@ -1,3 +0,0 @@ -pip install -e git+https://github.com/mongodb/mongo-python-driver.git@master#egg=pymongo -git clone git@github.com:mongodb/libmongocrypt.git -python -m pip install ./libmongocrypt/bindings/python diff --git a/source/includes/sample_apps/csfle/python/.gitignore b/source/includes/sample_apps/csfle/python/.gitignore deleted file mode 100644 index 68bc17f9ff2..00000000000 --- a/source/includes/sample_apps/csfle/python/.gitignore +++ /dev/null @@ -1,160 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ diff --git a/source/includes/sample_apps/csfle/python/README.md b/source/includes/sample_apps/csfle/python/README.md deleted file mode 100644 index 147fad0e247..00000000000 --- a/source/includes/sample_apps/csfle/python/README.md +++ /dev/null @@ -1,16 +0,0 @@ -These are the source files to build Python sample -applications that use CSFLE with the following KMS providers: - -- AWS -- GCP -- Azure -- Local KMS - -To build Python applications, run the following command from the parent of this directory: - - python build.py --project python - -To test your built applications, run the following -command from the parent of this directory: - - python -m unittest test.TestPython diff --git a/source/includes/sample_apps/csfle/python/insert_encrypted_document.py b/source/includes/sample_apps/csfle/python/insert_encrypted_document.py deleted file mode 100644 index b3bfbaa91e9..00000000000 --- a/source/includes/sample_apps/csfle/python/insert_encrypted_document.py +++ /dev/null @@ -1,214 +0,0 @@ -from pymongo import MongoClient -from pymongo.encryption_options import AutoEncryptionOpts -from pymongo.encryption import ClientEncryption -import base64 -import os -from bson.codec_options import CodecOptions -from bson.binary import STANDARD, UUID -import pprint - -# start-key-vault -key_vault_namespace = "encryption.__keyVault" -# end-key-vault - -# :state-start: aws-test azure-test local-test gcp-test -connection_string = os.getenv("MONGODB_URI") -# :state-end: -# :state-start: local-reader aws-reader azure-reader gcp-reader -# :uncomment-start: -#connection_string = "" -# :uncomment-end: -# :state-end: - -# start-kmsproviders -# :state-start: local-reader local-test -path = "./master-key.txt" -with open(path, "rb") as f: - local_master_key = f.read() -kms_providers = { - "local": { - "key": local_master_key # local_master_key variable from the previous step - }, -} -# :state-end: -# :state-uncomment-start: aws-reader -# provider="aws" -# kms_providers = { -# "aws": { -# "accessKeyId": "", -# "secretAccessKey": "" -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: aws-test -# provider="aws" -# kms_providers = { -# "aws": { -# "accessKeyId": os.getenv("AWS_ACCESS_KEY_ID"), -# "secretAccessKey": os.getenv("AWS_SECRET_ACCESS_KEY") -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: azure-reader -#provider = "azure" -#kms_providers = { -# "azure": { -# "tenantId": "", -# "clientId": "", -# "clientSecret": "", -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: azure-test -#provider = "azure" -#kms_providers = { -# "azure": { -# "tenantId": os.getenv("AZURE_TENANT_ID"), -# "clientId": os.getenv("AZURE_CLIENT_ID"), -# "clientSecret": os.getenv("AZURE_CLIENT_SECRET"), -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-reader -#provider = "gcp" -#kms_providers = { -# "gcp": { -# "email": "", -# "privateKey": "" -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-test -#provider = "gcp" -#kms_providers = { -# "gcp": { -# "email": os.getenv("GCP_EMAIL"), -# "privateKey": os.getenv("GCP_PRIVATE_KEY") -# } -#} -# :state-uncomment-end: -# end-kmsproviders - -# start-schema -# :state-start: aws-reader azure-reader local-reader gcp-reader -dek_id = b"" -json_schema = { - "bsonType": "object", - "encryptMetadata": {"keyId": [Binary(base64.b64decode(dek_id), UUID_SUBTYPE)]}, - "properties": { - "insurance": { - "bsonType": "object", - "properties": { - "policyNumber": { - "encrypt": { - "bsonType": "int", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic", - } - } - }, - }, - "medicalRecords": { - "encrypt": { - "bsonType": "array", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random", - } - }, - "bloodType": { - "encrypt": { - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random", - } - }, - "ssn": { - "encrypt": { - "bsonType": "int", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic", - } - }, - }, -} - -patient_schema = {"medicalRecords.patients": json_schema} -# :state-end: -# :state-start: aws-test azure-test local-test gcp-test -# :uncomment-start: -## Make All fields random to use json pointer to reference key-id -#json_schema = {'bsonType': 'object', 'encryptMetadata': {'keyId': '/key-id'}, 'properties': {'insurance': {'bsonType': 'object', 'properties': {'policyNumber': {'encrypt': {'bsonType': 'int', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}}}, 'medicalRecords': {'encrypt': {'bsonType': 'array', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'bloodType': {'encrypt': {'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}, 'ssn': {'encrypt': {'bsonType': 'int', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'}}}} -# :uncomment-end: -# :state-end: - -patient_schema = { - "medicalRecords.patients": json_schema -} -# end-schema - -# start-extra-options -# :state-start: aws-reader azure-reader local-reader gcp-reader -# :uncomment-start: -#extra_options = { -# 'mongocryptd_spawn_path': '/usr/local/bin/mongocryptd' -#} -# :uncomment-end: -# :state-end: -# :state-start: aws-test azure-test local-test gcp-test -extra_options = { - 'mongocryptd_spawn_path': os.getenv("MONGCRYPTD_PATH") -} -# :state-end: -# end-extra-options - -# start-client -fle_opts = AutoEncryptionOpts( - kms_providers, - key_vault_namespace, - schema_map=patient_schema, - **extra_options -) -secureClient = MongoClient(connection_string, auto_encryption_opts=fle_opts) -# end-client - -# start-insert -def insert_patient(collection, name, ssn, blood_type, medical_records, policy_number, provider): - insurance = { - 'policyNumber': policy_number, - 'provider': provider - } - doc = { - 'name': name, - 'ssn': ssn, - 'bloodType': blood_type, - 'medicalRecords': medical_records, - 'insurance': insurance, - # :state-start: aws-test azure-test local-test gcp-test - # :uncomment-start: - #'key-id': 'demo-data-key' - # :uncomment-end: - # :state-end: - } - collection.insert_one(doc) - - -medical_record = [{"weight": 180, "bloodPressure": "120/80"}] -insert_patient(secureClient.medicalRecords.patients, - "Jon Doe", - 241014209, - "AB+", - medical_record, - 123142, - "MaestCare") -# end-insert -regularClient = MongoClient(connection_string) -# start-find -print("Finding a document with regular (non-encrypted) client.") -result = regularClient.medicalRecords.patients.find_one({"name":"Jon Doe"}) -pprint.pprint(result) -print("Finding a document with encrypted client, searching on an encrypted field") -# :state-start: local-reader aws-reader azure-reader gcp-reader -# :uncomment-start: -#pprint.pprint(secureClient.medicalRecords.patients.find_one({"ssn":241014209})) -# :uncomment-end: -# :state-end: -# :state-start: local-test aws-test azure-test gcp-test -pprint.pprint(secureClient.medicalRecords.patients.find_one({"name":"Jon Doe"})) -# :state-end: -# end-find diff --git a/source/includes/sample_apps/csfle/python/make_data_key.py b/source/includes/sample_apps/csfle/python/make_data_key.py deleted file mode 100644 index 6f94e2dfce4..00000000000 --- a/source/includes/sample_apps/csfle/python/make_data_key.py +++ /dev/null @@ -1,186 +0,0 @@ -from pymongo import MongoClient, ASCENDING -from pymongo.encryption_options import AutoEncryptionOpts -from pymongo.encryption import ClientEncryption -import base64 -import os -from bson.codec_options import CodecOptions -from bson.binary import STANDARD, UUID - -# :state-start: local-reader local-test -import os -path = "master-key.txt" -file_bytes = os.urandom(96) -with open(path, "wb") as f: - f.write(file_bytes) -# :state-end: - -# start-kmsproviders -# :state-start: local-reader local-test -path = "./master-key.txt" -with open(path, "rb") as f: - local_master_key = f.read() -kms_providers = { - "local": { - "key": local_master_key # local_master_key variable from the previous step - }, -} -# :state-end: -# :state-uncomment-start: aws-reader -# provider="aws" -# kms_providers = { -# provider: { -# "accessKeyId": "", -# "secretAccessKey": "" -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: aws-test -# provider="aws" -# kms_providers = { -# provider: { -# "accessKeyId": os.getenv("AWS_ACCESS_KEY_ID"), -# "secretAccessKey": os.getenv("AWS_SECRET_ACCESS_KEY"), -# } -# } -# :state-uncomment-end: -# :state-uncomment-start: azure-reader -#provider = "azure" -#kms_providers = { -# provider: { -# "tenantId": "", -# "clientId": "", -# "clientSecret": "", -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: azure-test -#provider = "azure" -#kms_providers = { -# provider: { -# "tenantId": os.getenv("AZURE_TENANT_ID"), -# "clientId": os.getenv("AZURE_CLIENT_ID"), -# "clientSecret": os.getenv("AZURE_CLIENT_SECRET"), -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-reader -#provider = "gcp" -#kms_providers = { -# provider: { -# "email": "", -# "privateKey": "" -# } -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-test -#provider = "azure" -#provider = "gcp" -#kms_providers = { -# provider: { -# "email": os.getenv("GCP_EMAIL"), -# "privateKey": os.getenv("GCP_PRIVATE_KEY") -# } -#} -# :state-uncomment-end: -# end-kmsproviders - -# start-datakeyopts -# :state-start: local-reader local-test -# :state-end: -# :state-uncomment-start: aws-reader -# master_key={ "region": "", "key": "" } -# :state-uncomment-end: -# :state-uncomment-start: aws-test -# master_key={ "region": os.getenv("AWS_KEY_REGION"), "key": os.getenv("AWS_KEY_ARN") } -# :state-uncomment-end: -# :state-uncomment-start: azure-reader -#master_key = { -# "keyName": "", -# "keyVersion": "", -# "keyVaultEndpoint": "", -#} -# :state-uncomment-end: -# :state-uncomment-start: azure-test -#master_key = { -# "keyName": os.getenv("AZURE_KEY_NAME"), -# "keyVaultEndpoint": os.getenv("AZURE_KEY_VAULT_ENDPOINT"), -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-reader -#master_key = { -# "projectId": "", -# "location": "", -# "keyRing": "", -# "keyName": "", -#} -# :state-uncomment-end: -# :state-uncomment-start: gcp-test -#master_key = { -# "projectId": os.getenv("GCP_PROJECT_ID"), -# "location": os.getenv("GCP_LOCATION"), -# "keyRing": os.getenv("GCP_KEY_RING"), -# "keyName": os.getenv("GCP_KEY_NAME"), -#} -# :state-uncomment-end: -# end-datakeyopts - -# start-create-index -# :state-start: aws-test azure-test local-test gcp-test -connection_string = os.getenv("MONGODB_URI") -# :state-end: -# :state-start: local-reader aws-reader azure-reader gcp-reader -# :uncomment-start: -#connection_string = "" -# :uncomment-end: -# :state-end: - -key_vault_coll = "__keyVault" -key_vault_db = "encryption" -key_vault_namespace = f"{key_vault_db}.{key_vault_coll}" -key_vault_client = MongoClient(connection_string); -# Drop the Key Vault Collection in case you created this collection -# in a previous run of this application. -key_vault_client.drop_database(key_vault_db); -# Drop the database storing your encrypted fields as all -# the DEKs encrypting those fields were deleted in the preceding line. -key_vault_client["medicalRecords"].drop_collection("patients") -key_vault_client[key_vault_db][key_vault_coll].create_index( - [("keyAltNames", ASCENDING )], - unique = True, - partialFilterExpression = { "keyAltNames": { "$exists": True } }) -# end-create-index - -# start-create-dek -key_vault_database = "encryption" -key_vault_collection = "__keyVault" -key_vault_namespace = f"{key_vault_database}.{key_vault_collection}" - -client = MongoClient(connection_string) -client_encryption = ClientEncryption( - kms_providers, # pass in the kms_providers variable from the previous step - key_vault_namespace, - client, - CodecOptions(uuid_representation=STANDARD), -) -# :state-start: local-reader -data_key_id = client_encryption.create_data_key("local") -# :state-end: -# :state-start: local-test -# :uncomment-start: -#data_key_id = client_encryption.create_data_key("local", key_alt_names=["demo-data-key"]) -# :uncomment-end: -# :state-end: -# :state-start: aws-reader azure-reader gcp-reader -# :uncomment-start: -#data_key_id = client_encryption.create_data_key(provider, master_key) -# :uncomment-end: -# :state-end: -# :state-start: aws-test azure-test gcp-test -# :uncomment-start: -#data_key_id = client_encryption.create_data_key(provider, master_key, key_alt_names=["demo-data-key"]) -# :uncomment-end: -# :state-end: - -base_64_data_key_id = base64.b64encode(data_key_id) -print("DataKeyId [base64]: ", base_64_data_key_id) -# end-create-dek diff --git a/source/includes/sample_apps/csfle/python/requirements.txt b/source/includes/sample_apps/csfle/python/requirements.txt deleted file mode 100644 index 7dd5868d73b..00000000000 --- a/source/includes/sample_apps/csfle/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pymongo -pymongocrypt diff --git a/source/includes/sample_apps/csfle/requirements.txt b/source/includes/sample_apps/csfle/requirements.txt deleted file mode 100644 index 61ffc2c769a..00000000000 --- a/source/includes/sample_apps/csfle/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -black==22.3.0 -cffi==1.15.0 -click==8.1.3 -cryptography==37.0.2 -dnspython==2.2.1 -mypy-extensions==0.4.3 -pathspec==0.9.0 -platformdirs==2.5.2 -pycparser==2.21 --e git+https://github.com/mongodb/mongo-python-driver.git@e59a11ef4bceaab4da2e81bfca0713e4a333c296#egg=pymongo -pymongocrypt -tomli==2.0.1 -typing_extensions==4.2.0 diff --git a/source/includes/sample_apps/csfle/test.py b/source/includes/sample_apps/csfle/test.py deleted file mode 100644 index 1c9efcf6665..00000000000 --- a/source/includes/sample_apps/csfle/test.py +++ /dev/null @@ -1,394 +0,0 @@ -import unittest -import pymongo -from bson.binary import Binary -from const import ( - BUILD_DIR, - DIR_SEPERATOR, - FLE_1_LANGS, - FLE_2_LANGS, - NODE, - NODE_FLE_2, - GO, - GO_FLE_2, - CSHARP, - CSHARP_FLE_2, - PYTHON, - PYTHON_FLE_2, - JAVA, - JAVA_FLE_2, - AWS_TEST, - AZURE_TEST, - GCP_TEST, - LOCAL_TEST, - FILE_MAP, - DEK, - INSERT, -) -import os -import ntpath - -DB_NAME = "medicalRecords" -COLLECTION_NAME = "patients" -KEY_VAULT_DB = "encryption" -KEY_VAULT_COLL = "__keyVault" -CURRENT_DIRECTORY = os.getcwd() -NUM_QE_DEKS = 4 -BSON_BINARY_VALUE = Binary(b"") -TEST_FLE1_ENC_FIELD = "bloodType" -TEST_FLE2_ENC_FIELD = "patientId" - -FLE2_ENC_COLLS = [ - f"enxcol_.{COLLECTION_NAME}.esc", - f"enxcol_.{COLLECTION_NAME}.ecc", - f"enxcol_.{COLLECTION_NAME}.ecoc", -] - -KEY_ALT_NAMES_FIELD = "keyAltNames" - -SUCCESS = 0 - -class TestTutorials(unittest.TestCase): - - client = pymongo.MongoClient(os.getenv("MONGODB_URI")) - - def _dropData(self): - self.client[DB_NAME][COLLECTION_NAME].drop() - self.client[KEY_VAULT_DB][KEY_VAULT_COLL].drop() - - for c in FLE2_ENC_COLLS: - self.client[DB_NAME][c].drop() - - def startTestRun(self): - self._dropData() - - def setUp(self): - os.chdir(CURRENT_DIRECTORY) - self._dropData() - - def tearDown(self): - self._dropData() - - def _check_index(self): - """Ensure index on Key Alt Names field exists""" - - test_data_key_ids_document = {KEY_ALT_NAMES_FIELD: ["AltNameToTestForIndex"]} - test_data_key_ids_document_copy = test_data_key_ids_document.copy() - self.client[KEY_VAULT_DB][KEY_VAULT_COLL].insert_one(test_data_key_ids_document) - # make sure inserting a document with duplicate key alt name raises an error - with self.assertRaises(pymongo.errors.DuplicateKeyError): - self.client[KEY_VAULT_DB][KEY_VAULT_COLL].insert_one( - test_data_key_ids_document_copy - ) - - self.client[KEY_VAULT_DB][KEY_VAULT_COLL].delete_one(test_data_key_ids_document) - - def _check_docs(self, project): - """Checks that expected documents were added to key vault and collection and that fields were encrypted""" - - if project in FLE_2_LANGS: - self.assertEqual( - self.client[KEY_VAULT_DB][KEY_VAULT_COLL].count_documents({}), - NUM_QE_DEKS, - ) - self.assertEqual( - self.client[DB_NAME][COLLECTION_NAME].count_documents( - {"firstName": "Jon"} - ), - 1, - ) - self.assertEqual( - type( - self.client[DB_NAME][COLLECTION_NAME].find_one( - {"firstName": "Jon"} - )[TEST_FLE2_ENC_FIELD] - ), - type(BSON_BINARY_VALUE), - f"{TEST_FLE2_ENC_FIELD} must be encrypted", - ) - elif project in FLE_1_LANGS: - self.assertEqual( - self.client[KEY_VAULT_DB][KEY_VAULT_COLL].count_documents({}), 1 - ) - self.assertEqual( - self.client[DB_NAME][COLLECTION_NAME].count_documents( - {"name": "Jon Doe"} - ), - 1, - ) - self.assertEqual( - type( - self.client[DB_NAME][COLLECTION_NAME].find_one({"name": "Jon Doe"})[ - TEST_FLE1_ENC_FIELD - ] - ), - type(BSON_BINARY_VALUE), - f"{TEST_FLE1_ENC_FIELD} must be encrypted", - ) - else: - raise ValueError( - f"Project not in either of the following:\nFLE_1_LANGS: {FLE_1_LANGS}\nFLE_2_LANGS: {FLE_2_LANGS}" - ) - - def _check_app(self, project): - """Build and test a sample application""" - - make_dek_file_name = None - insert_file_name = None - commands = [] - if project == PYTHON or project == PYTHON_FLE_2: - make_dek_file_name = FILE_MAP[project][DEK] - insert_file_name = FILE_MAP[project][INSERT] - commands.append(f"python {make_dek_file_name}") - commands.append(f"python {insert_file_name}") - elif project == JAVA or project == JAVA_FLE_2: - make_dek_file_name = os.path.splitext( - ntpath.basename(FILE_MAP[project][DEK]) - )[0] - insert_file_name = os.path.splitext( - ntpath.basename(FILE_MAP[project][INSERT]) - )[0] - commands.append( - f'mvn compile exec:java -Dexec.mainClass="com.mongodb.csfle.{make_dek_file_name}"' - ) - commands.append( - f'mvn compile exec:java -Dexec.mainClass="com.mongodb.csfle.{insert_file_name}"' - ) - elif project == CSHARP or project == CSHARP_FLE_2: - project_dir = os.path.split(FILE_MAP[project][DEK])[0] - os.chdir(project_dir) - commands.append("dotnet run") - elif project == NODE or project == NODE_FLE_2: - make_dek_file_name = FILE_MAP[project][DEK] - insert_file_name = FILE_MAP[project][INSERT] - commands.append("npm install") - commands.append(f"node {make_dek_file_name}") - commands.append(f"node {insert_file_name}") - elif project == GO or project == GO_FLE_2: - make_dek_file_name = FILE_MAP[project][DEK] - insert_file_name = FILE_MAP[project][INSERT] - commands.append("go get .") - commands.append(f"go fmt {make_dek_file_name}") - commands.append(f"go fmt {insert_file_name}") - commands.append("go run -tags=cse .") - else: - Exception("Failed to Handle project") - - def run_apps(name_of_run, message = ""): - for c in commands: - print(c) - exit_code = os.system(c) - self.assertEqual(exit_code, SUCCESS, f"Process did not exit with status code {SUCCESS} on {name_of_run} run. {message}") - - run_apps("first", "There may be a problem in the application source code.") - - self._check_index() - self._check_docs(project) - # test that sample apps can run twice in a row - run_apps("second", "The application was unable to run twice in a row. Maybe you aren't cleaning up created collections before second run?") - -class TestPython(TestTutorials): - """Test Python FLE1 Sample Apps""" - - def test_python_aws(self): - os.chdir(os.path.join(BUILD_DIR, PYTHON, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(PYTHON) - - def test_python_azure(self): - os.chdir(os.path.join(BUILD_DIR, PYTHON, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(PYTHON) - - def test_python_gcp(self): - os.chdir(os.path.join(BUILD_DIR, PYTHON, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(PYTHON) - - def test_python_local(self): - os.chdir(os.path.join(BUILD_DIR, PYTHON, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(PYTHON) - - -class TestPythonFLE2(TestTutorials): - """Test Python FLE2 Sample Apps""" - - def test_python_fle_2_aws(self): - os.chdir(os.path.join(BUILD_DIR, PYTHON_FLE_2, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(PYTHON_FLE_2) - - def test_python_fle_2_azure(self): - os.chdir( - os.path.join(BUILD_DIR, PYTHON_FLE_2, *AZURE_TEST.split(DIR_SEPERATOR)) - ) - self._check_app(PYTHON_FLE_2) - - def test_python_fle_2_gcp(self): - os.chdir(os.path.join(BUILD_DIR, PYTHON_FLE_2, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(PYTHON_FLE_2) - - def test_python_fle_2_local(self): - os.chdir( - os.path.join(BUILD_DIR, PYTHON_FLE_2, *LOCAL_TEST.split(DIR_SEPERATOR)) - ) - self._check_app(PYTHON_FLE_2) - - -class TestDotnet(TestTutorials): - """Test Dotnet FLE1 Sample Apps""" - - def test_dotnet_aws(self): - os.chdir(os.path.join(BUILD_DIR, CSHARP, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(CSHARP) - - def test_dotnet_azure(self): - os.chdir(os.path.join(BUILD_DIR, CSHARP, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(CSHARP) - - def test_dotnet_gcp(self): - os.chdir(os.path.join(BUILD_DIR, CSHARP, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(CSHARP) - - def test_dotnet_local(self): - os.chdir(os.path.join(BUILD_DIR, CSHARP, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(CSHARP) - - -class TestDotnetFLE2(TestTutorials): - """Test Dotnet FLE2 Sample Apps""" - - def test_dotnet_fle_2_aws(self): - os.chdir(os.path.join(BUILD_DIR, CSHARP_FLE_2, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(CSHARP_FLE_2) - - def test_dotnet_fle_2_azure(self): - os.chdir( - os.path.join(BUILD_DIR, CSHARP_FLE_2, *AZURE_TEST.split(DIR_SEPERATOR)) - ) - self._check_app(CSHARP_FLE_2) - - def test_dotnet_fle_2_gcp(self): - os.chdir(os.path.join(BUILD_DIR, CSHARP_FLE_2, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(CSHARP_FLE_2) - - def test_dotnet_fle_2_local(self): - os.chdir( - os.path.join(BUILD_DIR, CSHARP_FLE_2, *LOCAL_TEST.split(DIR_SEPERATOR)) - ) - self._check_app(CSHARP_FLE_2) - - -class TestNode(TestTutorials): - """Test Node FLE1 Sample Apps""" - - def test_node_aws(self): - os.chdir(os.path.join(BUILD_DIR, NODE, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE) - - def test_node_azure(self): - os.chdir(os.path.join(BUILD_DIR, NODE, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE) - - def test_node_gcp(self): - os.chdir(os.path.join(BUILD_DIR, NODE, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE) - - def test_node_local(self): - os.chdir(os.path.join(BUILD_DIR, NODE, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE) - - -class TestNodeFLE2(TestTutorials): - """Test Node FLE2 Sample Apps""" - - def test_node_fle_2_aws(self): - os.chdir(os.path.join(BUILD_DIR, NODE_FLE_2, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE_FLE_2) - - def test_node_fle_2_azure(self): - os.chdir(os.path.join(BUILD_DIR, NODE_FLE_2, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE_FLE_2) - - def test_node_fle_2_gcp(self): - os.chdir(os.path.join(BUILD_DIR, NODE_FLE_2, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE_FLE_2) - - def test_node_fle_2local(self): - os.chdir(os.path.join(BUILD_DIR, NODE_FLE_2, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(NODE_FLE_2) - - -class TestGo(TestTutorials): - """Test Go FLE1 Sample Apps""" - - def test_go_aws(self): - os.chdir(os.path.join(BUILD_DIR, GO, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(GO) - - def test_go_azure(self): - os.chdir(os.path.join(BUILD_DIR, GO, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(GO) - - def test_go_gcp(self): - os.chdir(os.path.join(BUILD_DIR, GO, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(GO) - - def test_go_local(self): - os.chdir(os.path.join(BUILD_DIR, GO, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(GO) - - -class TestGoFLE2(TestTutorials): - """Test Go FLE1 Sample Apps""" - - def test_go_fle_2_aws(self): - os.chdir(os.path.join(BUILD_DIR, GO_FLE_2, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(GO_FLE_2) - - def test_go_fle_2_azure(self): - os.chdir(os.path.join(BUILD_DIR, GO_FLE_2, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(GO_FLE_2) - - def test_go_fle_2_gcp(self): - os.chdir(os.path.join(BUILD_DIR, GO_FLE_2, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(GO_FLE_2) - - def test_go_fle_2_local(self): - os.chdir(os.path.join(BUILD_DIR, GO_FLE_2, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(GO_FLE_2) - - -class TestJava(TestTutorials): - """Test Java FLE1 Sample Apps""" - - def test_java_aws(self): - os.chdir(os.path.join(BUILD_DIR, JAVA, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA) - - def test_java_azure(self): - os.chdir(os.path.join(BUILD_DIR, JAVA, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA) - - def test_java_gcp(self): - os.chdir(os.path.join(BUILD_DIR, JAVA, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA) - - def test_java_local(self): - os.chdir(os.path.join(BUILD_DIR, JAVA, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA) - - -class TestJavaFLE2(TestTutorials): - """Test Java FLE2 Sample Apps""" - - def test_java_fle_2_aws(self): - os.chdir(os.path.join(BUILD_DIR, JAVA_FLE_2, *AWS_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA_FLE_2) - - def test_java_fle_2_azure(self): - os.chdir(os.path.join(BUILD_DIR, JAVA_FLE_2, *AZURE_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA_FLE_2) - - def test_java_fle_2_gcp(self): - os.chdir(os.path.join(BUILD_DIR, JAVA_FLE_2, *GCP_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA_FLE_2) - - def test_java_fle_2_local(self): - os.chdir(os.path.join(BUILD_DIR, JAVA_FLE_2, *LOCAL_TEST.split(DIR_SEPERATOR))) - self._check_app(JAVA_FLE_2) diff --git a/source/includes/steps-install-mongodb-enterprise-on-linux.yaml b/source/includes/steps-install-mongodb-enterprise-on-linux.yaml index 70b6bda99d2..d89de2bc486 100644 --- a/source/includes/steps-install-mongodb-enterprise-on-linux.yaml +++ b/source/includes/steps-install-mongodb-enterprise-on-linux.yaml @@ -29,4 +29,5 @@ content: | :mongosh:`Install ` ``mongosh`` then use the MongoDB Shell to connect to your deployment. + .. include:: /includes/install-mongodb-shell-tarball.rst ... diff --git a/source/includes/steps-install-mongodb-on-amazon-tarball.yaml b/source/includes/steps-install-mongodb-on-amazon-tarball.yaml index 781ed02be0d..15b2d0acb30 100644 --- a/source/includes/steps-install-mongodb-on-amazon-tarball.yaml +++ b/source/includes/steps-install-mongodb-on-amazon-tarball.yaml @@ -65,4 +65,5 @@ content: | :mongosh:`Install ` ``mongosh`` then use the MongoDB Shell to connect to your deployment. + .. include:: /includes/install-mongodb-shell-tarball.rst ... diff --git a/source/includes/steps-install-mongodb-on-linux.yaml b/source/includes/steps-install-mongodb-on-linux.yaml index f37c08c5942..3783cd19fc7 100644 --- a/source/includes/steps-install-mongodb-on-linux.yaml +++ b/source/includes/steps-install-mongodb-on-linux.yaml @@ -67,4 +67,5 @@ content: | :mongosh:`Install ` ``mongosh`` then use the MongoDB Shell to connect to your deployment. + .. include:: /includes/install-mongodb-shell-tarball.rst ... diff --git a/source/includes/steps-install-mongodb-on-ubuntu-tarball.yaml b/source/includes/steps-install-mongodb-on-ubuntu-tarball.yaml index 17b5dae1dd2..160e779d7f3 100644 --- a/source/includes/steps-install-mongodb-on-ubuntu-tarball.yaml +++ b/source/includes/steps-install-mongodb-on-ubuntu-tarball.yaml @@ -64,5 +64,6 @@ content: | :mongosh:`Install ` ``mongosh`` then use the MongoDB Shell to connect to your deployment. + .. include:: /includes/install-mongodb-shell-tarball.rst ... diff --git a/source/includes/steps-log-rotate-rename.yaml b/source/includes/steps-log-rotate-rename.yaml index e9e13d7d106..f6558784690 100644 --- a/source/includes/steps-log-rotate-rename.yaml +++ b/source/includes/steps-log-rotate-rename.yaml @@ -30,7 +30,7 @@ pre: | action: language: sh code: | - db.adminCommand( { logRotate : server } ) + db.adminCommand( { logRotate : "server" } ) post: | If :doc:`auditing ` is enabled, you can specify ``1`` to ``logRotate`` (instead of ``server``) to rotate both the server diff --git a/source/includes/steps-sharding-segmenting-data-by-location-update.yaml b/source/includes/steps-sharding-segmenting-data-by-location-update.yaml index f2a9e0ef169..bcb15ad8f04 100644 --- a/source/includes/steps-sharding-segmenting-data-by-location-update.yaml +++ b/source/includes/steps-sharding-segmenting-data-by-location-update.yaml @@ -87,7 +87,7 @@ action: * The inclusive lower bound of the range. * The exclusive upper bound of the range. * The name of the zone. - + language: javascript code: | sh.addTagRange( @@ -101,7 +101,7 @@ post: | for comparisons. :bsontype:`MinKey` always compares as lower than every other possible value, while :bsontype:`MaxKey` always compares as higher than every other possible value. This ensures the two ranges captures the - entire possible value space of ``creation_date``. + entire possible value space of ``userid``. --- stepnum: 5 title: Enable the Balancer (Optional) diff --git a/source/includes/time-series/fact-view-limitation.rst b/source/includes/time-series/fact-view-limitation.rst new file mode 100644 index 00000000000..6f2c7f9fb8b --- /dev/null +++ b/source/includes/time-series/fact-view-limitation.rst @@ -0,0 +1,2 @@ +Time series collections are writable non-materialized views. Limitations +for views apply to time series collections. diff --git a/source/includes/tutorials/automatic/aws/client.rst b/source/includes/tutorials/automatic/aws/client.rst index 5971d51b720..a8231b689ff 100644 --- a/source/includes/tutorials/automatic/aws/client.rst +++ b/source/includes/tutorials/automatic/aws/client.rst @@ -11,7 +11,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -21,7 +21,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -31,7 +31,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -41,7 +41,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -51,7 +51,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -70,7 +70,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -80,7 +80,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -90,7 +90,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -100,7 +100,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -110,7 +110,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -131,7 +131,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -141,7 +141,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -151,7 +151,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -161,7 +161,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -171,7 +171,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -188,7 +188,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -209,7 +209,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -230,7 +230,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -256,7 +256,7 @@ If the ``mongocryptd.exe`` executable is not in the PATH, specify the spawn path. - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -274,7 +274,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -303,7 +303,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -313,7 +313,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -323,7 +323,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -333,7 +333,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp @@ -343,7 +343,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go diff --git a/source/includes/tutorials/automatic/aws/dek.rst b/source/includes/tutorials/automatic/aws/dek.rst index 8e774611de2..66573056a7b 100644 --- a/source/includes/tutorials/automatic/aws/dek.rst +++ b/source/includes/tutorials/automatic/aws/dek.rst @@ -13,7 +13,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -23,7 +23,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -33,7 +33,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -43,7 +43,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -53,7 +53,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -80,7 +80,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-datakeyopts :end-before: end-datakeyopts :language: java @@ -90,7 +90,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/make_data_key.js :start-after: start-datakeyopts :end-before: end-datakeyopts :language: javascript @@ -100,7 +100,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/make_data_key.py :start-after: start-datakeyopts :end-before: end-datakeyopts :language: python @@ -110,7 +110,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/MakeDataKey.cs :start-after: start-datakeyopts :end-before: end-datakeyopts :language: csharp @@ -120,7 +120,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/make-data-key.go :start-after: start-datakeyopts :end-before: end-datakeyopts :language: go @@ -136,7 +136,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -146,7 +146,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -156,7 +156,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -166,7 +166,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp @@ -176,7 +176,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go diff --git a/source/includes/tutorials/automatic/aws/find.rst b/source/includes/tutorials/automatic/aws/find.rst index 34b8bbf9f9c..6f7580dc485 100644 --- a/source/includes/tutorials/automatic/aws/find.rst +++ b/source/includes/tutorials/automatic/aws/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -21,7 +21,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :language: javascript @@ -31,7 +31,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -41,7 +41,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp @@ -51,7 +51,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go diff --git a/source/includes/tutorials/automatic/aws/insert.rst b/source/includes/tutorials/automatic/aws/insert.rst index 3ee71b012c6..db61fa77a5c 100644 --- a/source/includes/tutorials/automatic/aws/insert.rst +++ b/source/includes/tutorials/automatic/aws/insert.rst @@ -10,7 +10,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -20,7 +20,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -30,7 +30,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -40,7 +40,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp @@ -49,7 +49,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go diff --git a/source/includes/tutorials/automatic/aws/key-vault-index.rst b/source/includes/tutorials/automatic/aws/key-vault-index.rst index 0ca689fd06e..752f13f4681 100644 --- a/source/includes/tutorials/automatic/aws/key-vault-index.rst +++ b/source/includes/tutorials/automatic/aws/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/aws/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/aws/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/aws/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/aws/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/aws/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/aws/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/aws/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/tutorials/automatic/azure/client.rst b/source/includes/tutorials/automatic/azure/client.rst index e690e7f9a35..3e0c6f9bef7 100644 --- a/source/includes/tutorials/automatic/azure/client.rst +++ b/source/includes/tutorials/automatic/azure/client.rst @@ -11,7 +11,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -21,7 +21,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -31,7 +31,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -41,7 +41,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -51,7 +51,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -68,7 +68,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -78,7 +78,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -88,7 +88,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -98,7 +98,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -108,7 +108,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -129,7 +129,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -139,7 +139,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -149,7 +149,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -159,7 +159,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -169,7 +169,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -186,7 +186,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -207,7 +207,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -228,7 +228,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -254,7 +254,7 @@ If the ``mongocryptd.exe`` executable is not in the PATH, specify the spawn path. - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -272,7 +272,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -301,7 +301,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -311,7 +311,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -321,7 +321,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -331,7 +331,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp @@ -341,7 +341,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go diff --git a/source/includes/tutorials/automatic/azure/dek.rst b/source/includes/tutorials/automatic/azure/dek.rst index 315ee6bc9bc..3c587b5f07b 100644 --- a/source/includes/tutorials/automatic/azure/dek.rst +++ b/source/includes/tutorials/automatic/azure/dek.rst @@ -19,7 +19,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -29,7 +29,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -39,7 +39,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -49,7 +49,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -59,7 +59,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -86,7 +86,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-datakeyopts :end-before: end-datakeyopts :language: java @@ -96,7 +96,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/make_data_key.js :start-after: start-datakeyopts :end-before: end-datakeyopts :language: javascript @@ -106,7 +106,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/make_data_key.py :start-after: start-datakeyopts :end-before: end-datakeyopts :language: python @@ -116,7 +116,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/MakeDataKey.cs :start-after: start-datakeyopts :end-before: end-datakeyopts :language: csharp @@ -126,7 +126,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/make-data-key.go :start-after: start-datakeyopts :end-before: end-datakeyopts :language: go @@ -142,7 +142,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -152,7 +152,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -162,7 +162,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -172,7 +172,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp @@ -182,7 +182,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go diff --git a/source/includes/tutorials/automatic/azure/find.rst b/source/includes/tutorials/automatic/azure/find.rst index dc27b86ced9..d18cdc3f4c6 100644 --- a/source/includes/tutorials/automatic/azure/find.rst +++ b/source/includes/tutorials/automatic/azure/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -21,7 +21,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :language: javascript @@ -31,7 +31,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -41,7 +41,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp @@ -51,7 +51,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go diff --git a/source/includes/tutorials/automatic/azure/insert.rst b/source/includes/tutorials/automatic/azure/insert.rst index 1b871b8b0d6..34f7aba1d42 100644 --- a/source/includes/tutorials/automatic/azure/insert.rst +++ b/source/includes/tutorials/automatic/azure/insert.rst @@ -10,7 +10,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -20,7 +20,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -30,7 +30,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -40,7 +40,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp @@ -50,7 +50,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go diff --git a/source/includes/tutorials/automatic/azure/key-vault-index.rst b/source/includes/tutorials/automatic/azure/key-vault-index.rst index 16e0681244e..f4dfa3c30e2 100644 --- a/source/includes/tutorials/automatic/azure/key-vault-index.rst +++ b/source/includes/tutorials/automatic/azure/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/azure/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/azure/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/azure/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/azure/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/azure/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/azure/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/azure/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/tutorials/automatic/gcp/client.rst b/source/includes/tutorials/automatic/gcp/client.rst index 951f78cc5dd..abf3b1d114f 100644 --- a/source/includes/tutorials/automatic/gcp/client.rst +++ b/source/includes/tutorials/automatic/gcp/client.rst @@ -11,7 +11,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-key-vault :end-before: end-key-vault :language: java @@ -21,7 +21,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js :start-after: start-key-vault :end-before: end-key-vault :language: javascript @@ -31,7 +31,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py :start-after: start-key-vault :end-before: end-key-vault :language: python @@ -41,7 +41,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-key-vault :end-before: end-key-vault :language: csharp @@ -51,7 +51,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go :start-after: start-key-vault :end-before: end-key-vault :language: go @@ -67,7 +67,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -77,7 +77,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -87,7 +87,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -97,7 +97,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -107,7 +107,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -128,7 +128,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-schema :end-before: end-schema :language: java @@ -138,7 +138,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js :start-after: start-schema :end-before: end-schema :language: javascript @@ -148,7 +148,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py :start-after: start-schema :end-before: end-schema :language: python @@ -158,7 +158,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-schema :end-before: end-schema :language: csharp @@ -168,7 +168,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go :start-after: start-schema :end-before: end-schema :language: go @@ -185,7 +185,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-extra-options :end-before: end-extra-options :language: java @@ -206,7 +206,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js :start-after: start-extra-options :end-before: end-extra-options :language: javascript @@ -227,7 +227,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py :start-after: start-extra-options :end-before: end-extra-options :language: python @@ -253,7 +253,7 @@ If the ``mongocryptd.exe`` executable is not in the PATH, specify the spawn path. - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-extra-options :end-before: end-extra-options :language: csharp @@ -271,7 +271,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go :start-after: start-extra-options :end-before: end-extra-options :language: go @@ -300,7 +300,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-client :end-before: end-client :language: java @@ -310,7 +310,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js :start-after: start-client :end-before: end-client :language: javascript @@ -320,7 +320,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py :start-after: start-client :end-before: end-client :language: python @@ -330,7 +330,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-client :end-before: end-client :language: csharp @@ -340,7 +340,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go :start-after: start-client :end-before: end-client :language: go diff --git a/source/includes/tutorials/automatic/gcp/dek.rst b/source/includes/tutorials/automatic/gcp/dek.rst index 37537b0fb73..f03f851612a 100644 --- a/source/includes/tutorials/automatic/gcp/dek.rst +++ b/source/includes/tutorials/automatic/gcp/dek.rst @@ -13,7 +13,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-kmsproviders :end-before: end-kmsproviders :language: java @@ -23,7 +23,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/make_data_key.js :start-after: start-kmsproviders :end-before: end-kmsproviders :language: javascript @@ -33,7 +33,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/make_data_key.py :start-after: start-kmsproviders :end-before: end-kmsproviders :language: python @@ -43,7 +43,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/MakeDataKey.cs :start-after: start-kmsproviders :end-before: end-kmsproviders :language: csharp @@ -53,7 +53,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/make-data-key.go :start-after: start-kmsproviders :end-before: end-kmsproviders :language: go @@ -80,7 +80,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-datakeyopts :end-before: end-datakeyopts :language: java @@ -90,7 +90,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/make_data_key.js :start-after: start-datakeyopts :end-before: end-datakeyopts :language: javascript @@ -100,7 +100,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/make_data_key.py :start-after: start-datakeyopts :end-before: end-datakeyopts :language: python @@ -110,7 +110,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/MakeDataKey.cs :start-after: start-datakeyopts :end-before: end-datakeyopts :language: csharp @@ -120,7 +120,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/make-data-key.go :start-after: start-datakeyopts :end-before: end-datakeyopts :language: go @@ -136,7 +136,7 @@ .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-dek :end-before: end-create-dek :language: java @@ -146,7 +146,7 @@ .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/make_data_key.js :start-after: start-create-dek :end-before: end-create-dek :language: javascript @@ -156,7 +156,7 @@ .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/make_data_key.py :start-after: start-create-dek :end-before: end-create-dek :language: python @@ -166,7 +166,7 @@ .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/MakeDataKey.cs :start-after: start-create-dek :end-before: end-create-dek :language: csharp @@ -176,7 +176,7 @@ .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/make-data-key.go :start-after: start-create-dek :end-before: end-create-dek :language: go diff --git a/source/includes/tutorials/automatic/gcp/find.rst b/source/includes/tutorials/automatic/gcp/find.rst index 293caefbe85..beabd272aba 100644 --- a/source/includes/tutorials/automatic/gcp/find.rst +++ b/source/includes/tutorials/automatic/gcp/find.rst @@ -11,7 +11,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-find :end-before: end-find :language: java @@ -21,7 +21,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js :start-after: start-find :end-before: end-find :language: javascript @@ -31,7 +31,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py :start-after: start-find :end-before: end-find :language: python @@ -41,7 +41,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-find :end-before: end-find :language: csharp @@ -51,7 +51,7 @@ a client that is not configured for automatic {+csfle-abbrev+}. .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go :start-after: start-find :end-before: end-find :language: go diff --git a/source/includes/tutorials/automatic/gcp/insert.rst b/source/includes/tutorials/automatic/gcp/insert.rst index fca152e0594..f978b42e69e 100644 --- a/source/includes/tutorials/automatic/gcp/insert.rst +++ b/source/includes/tutorials/automatic/gcp/insert.rst @@ -11,7 +11,7 @@ snippet: .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/insertEncryptedDocument.java :start-after: start-insert :end-before: end-insert :language: java @@ -21,7 +21,7 @@ snippet: .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/insert_encrypted_document.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/insert_encrypted_document.js :start-after: start-insert :end-before: end-insert :language: javascript @@ -31,7 +31,7 @@ snippet: .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/insert_encrypted_document.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/insert_encrypted_document.py :start-after: start-insert :end-before: end-insert :language: python @@ -41,7 +41,7 @@ snippet: .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs :start-after: start-insert :end-before: end-insert :language: csharp @@ -51,7 +51,7 @@ snippet: .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/insert-encrypted-document.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/insert-encrypted-document.go :start-after: start-insert :end-before: end-insert :language: go diff --git a/source/includes/tutorials/automatic/gcp/key-vault-index.rst b/source/includes/tutorials/automatic/gcp/key-vault-index.rst index cf50611bb4e..6cfd6503376 100644 --- a/source/includes/tutorials/automatic/gcp/key-vault-index.rst +++ b/source/includes/tutorials/automatic/gcp/key-vault-index.rst @@ -8,7 +8,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: nodejs - .. literalinclude:: /includes/sample_apps/csfle/build/node/gcp/reader/make_data_key.js + .. literalinclude:: /includes/generated/in-use-encryption/csfle/node/gcp/reader/make_data_key.js :start-after: start-create-index :end-before: end-create-index :caption: make_data_key.js @@ -18,7 +18,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: python - .. literalinclude:: /includes/sample_apps/csfle/build/python/gcp/reader/make_data_key.py + .. literalinclude:: /includes/generated/in-use-encryption/csfle/python/gcp/reader/make_data_key.py :start-after: start-create-index :end-before: end-create-index :language: python @@ -28,7 +28,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: java-sync - .. literalinclude:: /includes/sample_apps/csfle/build/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java + .. literalinclude:: /includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/makeDataKey.java :start-after: start-create-index :end-before: end-create-index :language: java @@ -38,7 +38,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: go - .. literalinclude:: /includes/sample_apps/csfle/build/go/gcp/reader/make-data-key.go + .. literalinclude:: /includes/generated/in-use-encryption/csfle/go/gcp/reader/make-data-key.go :start-after: start-create-index :end-before: end-create-index :language: go @@ -48,7 +48,7 @@ Create a unique index on the ``keyAltNames`` field in your .. tab:: :tabid: csharp - .. literalinclude:: /includes/sample_apps/csfle/build/dotnet/gcp/reader/CSFLE/MakeDataKey.cs + .. literalinclude:: /includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/MakeDataKey.cs :start-after: start-create-index :end-before: end-create-index :language: csharp diff --git a/source/includes/tutorials/automatic/kmip/dek.rst b/source/includes/tutorials/automatic/kmip/dek.rst index 32fe250a94e..cebdf95a779 100644 --- a/source/includes/tutorials/automatic/kmip/dek.rst +++ b/source/includes/tutorials/automatic/kmip/dek.rst @@ -1,10 +1,6 @@ Update and run the following code to generate a new {+dek-long+}: - -.. TODO: Java Tech review: does it make sense to only specify endpoint - in order for KMS to randomly generate 96 byte DEK? Would you - rather I specify an ID value here or have a reader use their own? .. _csfle-kmip-create-dek: diff --git a/source/index.txt b/source/index.txt index 4512dd3d453..dc98a08c5ee 100644 --- a/source/index.txt +++ b/source/index.txt @@ -25,8 +25,6 @@ What is MongoDB? :uri: /installation `Get started with MongoDB Atlas `__ - - .. include:: /includes/rc-available.rst .. image:: /images/hero.png :alt: Homepage hero image diff --git a/source/installation.txt b/source/installation.txt index 8ebe00e479b..06a8289752a 100644 --- a/source/installation.txt +++ b/source/installation.txt @@ -27,7 +27,7 @@ MongoDB is available in two server editions: *Community* and .. _`MongoDB Download Center`: https://www.mongodb.com/try/download/community?tck=docs_server -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst This section of the manual contains information on installing MongoDB. diff --git a/source/introduction.txt b/source/introduction.txt index edaab41446b..670ca8df41d 100644 --- a/source/introduction.txt +++ b/source/introduction.txt @@ -10,8 +10,6 @@ Introduction to MongoDB :depth: 1 :class: singlecol -.. include:: /includes/rc-available.rst - Document Database ----------------- diff --git a/source/reference/change-events.txt b/source/reference/change-events.txt index 6b91a2c048e..0b488d8057c 100644 --- a/source/reference/change-events.txt +++ b/source/reference/change-events.txt @@ -1,5 +1,7 @@ .. _change-events: +.. _change-stream-output: + ============= Change Events ============= @@ -9,855 +11,161 @@ Change Events .. contents:: On this page :local: :backlinks: none - :depth: 1 + :depth: 2 :class: singlecol -.. _change-stream-output: +Change streams watch collections, databases, or deployments for changes. + +When a change occurs on a watched resource, the change stream returns a +change event notification document, with information on the operation and +the changes it made. -Change Events -------------- - -The following document represents all possible fields that a change -stream response document can have. - -.. code-block:: json - - { - _id : { }, - "operationType" : "", - "fullDocument" : { }, - "fullDocumentBeforeChange" : { }, // Added in MongoDB 6.0 - "ns" : { - "db" : "", - "coll" : "" - }, - "to" : { - "db" : "", - "coll" : "" - }, - "documentKey" : { "_id" : }, - "updateDescription" : { - "updatedFields" : { }, - "removedFields" : [ "", ... ], - "truncatedArrays" : [ - { "field" : , "newSize" : }, - ... - ] - }, - "operationDescription": { }, - "collectionUUID": , - "clusterTime" : , - "wallTime" : , // Added in MongoDB 6.0 - "txnNumber" : , - "lsid" : { - "id" : , - "uid" : - } - } -Some fields are only available for certain operations, such as updates. The -following table describes each field in the change stream response document: +.. _change-event-operation-types: + +Operation Types +--------------- .. list-table:: :header-rows: 1 - :widths: 10 20 60 - * - Field - - Type + * - Event - Description - * - :ref:`_id ` - - document - - .. _change-stream-event-id: - - A :term:`BSON` object which serves as an identifier for the - change stream event. This value is used as the ``resumeToken`` - for the ``resumeAfter`` parameter when resuming a change stream. - The ``_id`` object has the following form: - - .. code-block:: none - - { - "_data" : - } - - The ``_data`` type depends on the MongoDB versions - and, in some cases, the :ref:`feature compatibility version (fCV) - ` at the time of the change stream's - opening/resumption. See :ref:`change-stream-resume-token` for the - full list of ``_data`` types. - - See :ref:`change-stream-resume` for an example of resuming a - change stream by ``resumeToken``. - - * - ``operationType`` - - string - - The type of operation that occurred. Can be any of the following - values: - - - ``insert`` - - ``delete`` - - ``replace`` - - ``update`` - - ``drop`` - - ``rename`` - - ``dropDatabase`` - - ``invalidate`` - - ``createIndexes`` - - ``dropIndexes`` - - ``create`` - - ``modify`` - - ``shardCollection`` - - * - ``fullDocument`` - - document - - The document created or modified by the ``insert``, ``replace``, - ``delete``, ``update`` operations (i.e. CRUD operations). - - For ``insert`` and ``replace`` operations, this represents the new - document created by the operation. - - For ``delete`` operations, this field is omitted as the document no - longer exists. - - For ``update`` operations, this field only appears if you configured - the change stream with ``fullDocument`` set to ``updateLookup``. This - field then represents the most current majority-committed version of - the document modified by the update operation. This - document may differ from the changes described in ``updateDescription`` - if other majority-committed operations modified the document between - the original update operation and the full document lookup. - - Starting in MongoDB 6.0, if you enable the - ``changeStreamPreAndPostImages`` field using - :method:`db.createCollection()`, :dbcommand:`create`, or - :dbcommand:`collMod`, then ``fullDocument`` is the document after - it was inserted, replaced, or updated (the document post-image). - ``fullDocument`` is always included for ``insert`` events. - - * - ``fullDocumentBeforeChange`` - - document - - The document before it was replaced, updated, or deleted (the - document pre-image). - - To obtain ``fullDocumentBeforeChange``, you must enable the - ``changeStreamPreAndPostImages`` field for a collection using - :method:`db.createCollection()`, :dbcommand:`create`, or - :dbcommand:`collMod`. - - .. versionadded:: 6.0 - - * - ``ns`` - - document - - The namespace (database and or collection) affected by the event. - - * - ``ns.db`` - - string - - The name of the database. - - * - ``ns.coll`` - - string - - The name of the collection. - - For ``dropDatabase`` operations, this field is omitted. - - * - ``to`` - - document - - When ``operationType`` is ``rename``, this document displays the new name for - the ``ns`` collection. This document is omitted for all other values - of ``operationType``. - - * - ``to.db`` - - string - - The new name of the database. - - * - ``to.coll`` - - string - - The new name of the collection. - - * - ``documentKey`` - - document - - A document that contains the ``_id`` of the document created or modified by the ``insert``, - ``replace``, ``delete``, ``update`` operations (i.e. CRUD operations). - For sharded collections, also displays the full shard key for the - document. The ``_id`` field is not repeated if it is already a - part of the shard key. - - * - ``updateDescription`` - - document - - A document describing the fields that were updated or removed - by the update operation. - - This document and its fields only appears if the ``operationType`` is - ``update``. - - * - | ``updateDescription.`` - | ``updatedFields`` - - document - - A document whose keys correspond to the fields that were modified by the - update operation. The value of each field corresponds to the new - value of those fields, rather than the operation that resulted in the - new value. - - * - | ``updateDescription.`` - | ``removedFields`` - - array - - An array of fields that were removed by the update operation. - - * - | ``updateDescription.`` - | ``truncatedArrays`` - - array - - An array of documents which record array truncations performed - with pipeline-based updates using one or more of the following - stages: - - - :pipeline:`$addFields` - - :pipeline:`$set` - - :pipeline:`$replaceRoot` - - :pipeline:`$replaceWith` - - .. note:: - - If the entire array is replaced, the truncations will be - reported under ``updateDescription.updatedFields``. - - * - | ``updateDescription.`` - | ``truncatedArrays.`` - | ``field`` - - string - - The name of the truncated field. - - * - | ``updateDescription.`` - | ``truncatedArrays.`` - | ``newSize`` - - integer - - The number of elements in the truncated array. - * - ``operationDescription`` - - document - - A document describing the operation performed. - - This document and its fields only appears for certain ``operationType`` - values when the change stream uses - :ref:`expanded events `. - - .. versionadded:: 6.0 - * - ``operationDescription.dropTarget`` - - UUID - - Provides the UUID of the collection that was dropped in the rename - operation. + * - :data:`create` + - Occurs on the creation of a collection. - This field only appears when the ``operationType`` value is ``rename`` - and when the rename operation sets a ``dropTarget`` value. + Requires that you set the :ref:`showExpandedEvents + ` option to ``true``. .. versionadded:: 6.0 - * - ``operationDescription.idIndex`` - - document - - The primary key index for a new collection. - This field only appears when the ``operationType`` value is ``create``. + * - :data:`createIndexes` + - Occurs on the creation of indexes on the collection. - .. versionadded:: 6.0 - - * - ``operationDescription.index`` - - document - - Describes the index that was modified. - - This field only appears when the ``operationType`` value is ``modify``. + Requires that you set the :ref:`showExpandedEvents + ` option to ``true``. .. versionadded:: 6.0 - * - ``operationDescription.indexes`` - - array - - An array of documents listing the indexes that were created or dropped - by the operation. - This field only appears when the ``operationType`` value is ``createIndexes`` - or ``dropIndexes``. + * - :data:`delete` + - Occurs when a document is removed from the collection. - .. versionadded:: 6.0 - * - ``operationDescription.numInitialChunks`` - - long - - Numbers of chunks created on each shard during a :dbcommand:`shardCollection` - operation. + * - :data:`drop` + - Occurs when a collection is dropped from a database. - This field only appears when the ``operationType`` value is ``shardCollection``. + .. versionadded:: 4.0.1 - .. versionadded:: 6.0 - * - ``operationDescription.presplitHashedZones`` - - boolean - - Indicates whether the shards are pre-split into zones. + * - :data:`dropDatabase` + - Occurs when a database is dropped. - This field only appears when the ``operationType`` value is ``shardCollection``. + .. versionadded:: 4.0.1 - .. versionadded:: 6.0 - * - ``operationDescription.shardKey`` - - document - - Document showing the :ref:`shard key ` for the collection. + * - :data:`dropIndexes` + - Occurs when an index is dropped from the collection. - This field only appears when the ``operationType`` value is ``shardCollection``. + Requires that you set the :ref:`showExpandedEvents + ` option to ``true``. .. versionadded:: 6.0 - * - ``operationDescription.to`` - - document - - When ``operationType : rename``, this document displays the new name for - the ``ns`` collection. This document is omitted for all other - values of ``operationType``. - .. versionadded:: 6.0 - - * - ``operationDescription.to.db`` - - string - - Indicates the new dataname name of the renamed collection. + * - :data:`insert` + - Occurs when an operation adds documents to a collection. - .. versionadded:: 6.0 - * - ``operationDescription.to.coll`` - - string - - Indicates the new collection name of the renamed collection. + * - :data:`invalidate` + - Occurs when an operation renders the change stream + invalid. - .. versionadded:: 6.0 - * - ``operationDescription.unique`` - - boolean - - Indicates whether shard chunks were :ref:`pre-split - ` according to zones - when the collection became sharded. + * - :data:`modify` + - Occurs when a collection is modified. - This field only appears when the ``operationType`` value is ``shardCollection``. + Requires that you set the :ref:`showExpandedEvents + ` option to ``true``. .. versionadded:: 6.0 - * - ``collectionUUID`` - - UUID - - UUID identifying the collection. - - .. versionadded:: 6.0 - * - ``clusterTime`` + * - :data:`rename` + - Occurs when a collection is renamed. - - Timestamp + .. versionadded:: 4.0.1 - - The timestamp from the oplog entry associated with the event. - For events that happened as part of a :doc:`multi-document - transaction `, the associated change stream - notifications will have the same ``clusterTime`` value, namely - the time when the transaction was committed. + * - :data:`replace` + - Occurs when an update operation removes a document from + a collection and replaces it with a new document. - On a sharded cluster, events that occur on different shards can - have the same ``clusterTime`` but be associated with different - transactions or even not be associated with any transaction. To - identify events for a single transaction, you can use the - combination of ``lsid`` and ``txnNumber`` in the change stream - event document. - .. versionadded:: 4.0 + * - :data:`shardCollection` + - Occurs when a collection is sharded. - * - ``wallTime`` - - :term:`ISODate` - - The server date and time of the database operation. ``wallTime`` - differs from ``clusterTime``: ``clusterTime`` is the timestamp - from the oplog entry associated with the database operation - event. + Requires that you set the :ref:`showExpandedEvents + ` option to ``true``. .. versionadded:: 6.0 - * - ``txnNumber`` - - NumberLong - - - The transaction number. - - Only present if the operation is part of a :doc:`multi-document - transaction `. - - .. versionadded:: 4.0 - - * - ``lsid`` - - - Document - - - The identifier for the session associated with the transaction. - - Only present if the operation is part of a :doc:`multi-document - transaction `. - - .. versionadded:: 4.0 - -``insert`` Event ----------------- - -The following example illustrates an ``insert`` event: - -.. code-block:: none - - { - _id: { < Resume Token > }, - operationType: 'insert', - clusterTime: , - wallTime: , - ns: { - db: 'engineering', - coll: 'users' - }, - documentKey: { - userName: 'alice123', - _id: ObjectId("599af247bb69cd89961c986d") - }, - fullDocument: { - _id: ObjectId("599af247bb69cd89961c986d"), - userName: 'alice123', - name: 'Alice' - } - } - -The ``documentKey`` field includes both the ``_id`` and the ``userName`` -field. This indicates that the ``engineering.users`` collection is sharded, -with a shard key on ``userName`` and ``_id``. - -The ``fullDocument`` document represents the version of the document at the -time of the insert. - -.. _change-streams-update-event: - -``update`` Event ----------------- - -The following example illustrates an ``update`` event: - -.. code-block:: none - - { - _id: { < Resume Token > }, - operationType: 'update', - clusterTime: , - wallTime: , - ns: { - db: 'engineering', - coll: 'users' - }, - documentKey: { - _id: ObjectId("58a4eb4a30c75625e00d2820") - }, - updateDescription: { - updatedFields: { - email: 'alice@10gen.com' - }, - removedFields: ['phoneNumber'], - truncatedArrays: [ { - "field" : "vacation_time", - "newSize" : 36 - } ] - } - } - -The following example illustrates an ``update`` event for change streams -opened with the ``fullDocument : updateLookup`` option: - -.. code-block:: none - - { - _id: { < Resume Token > }, - operationType: 'update', - clusterTime: , - wallTime: , - ns: { - db: 'engineering', - coll: 'users' - }, - documentKey: { - _id: ObjectId("58a4eb4a30c75625e00d2820") - }, - updateDescription: { - updatedFields: { - email: 'alice@10gen.com' - }, - removedFields: ['phoneNumber'], - truncatedArrays: [ { - "field" : "vacation_time", - "newSize" : 36 - } ] - }, - fullDocument: { - _id: ObjectId("58a4eb4a30c75625e00d2820"), - name: 'Alice', - userName: 'alice123', - email: 'alice@10gen.com', - team: 'replication' - } - } - -The ``fullDocument`` document represents the most current majority-committed -version of the updated document. The ``fullDocument`` document may vary from -the document at the time of the update operation depending on the number of -interleaving majority-committed operations that occur between the update -operation and the document lookup. - -.. include:: /includes/change-stream-pre-and-post-images-change-events.rst - -.. include:: /includes/change-stream-pre-and-post-images-additional-information.rst - -``replace`` Event ------------------ - -The following example illustrates a ``replace`` event: - -.. code-block:: none - - { - _id: { < Resume Token > }, - operationType: 'replace', - clusterTime: , - wallTime: , - ns: { - db: 'engineering', - coll: 'users' - }, - documentKey: { - _id: ObjectId("599af247bb69cd89961c986d") - }, - fullDocument: { - _id: ObjectId("599af247bb69cd89961c986d"), - userName: 'alice123', - name: 'Alice' - } - } - -A ``replace`` operation uses the update command, and consists of two stages: - -- Delete the original document with the ``documentKey`` and -- Insert the new document using the same ``documentKey`` - -The ``fullDocument`` of a ``replace`` event represents the document after the -insert of the replacement document. - -.. include:: /includes/change-stream-pre-and-post-images-change-events.rst - -.. include:: /includes/change-stream-pre-and-post-images-additional-information.rst - -``delete`` Event ----------------- - -The following example illustrates a ``delete`` event: - -.. code-block:: none - { - _id: { < Resume Token > }, - operationType: 'delete', - clusterTime: , - wallTime: , - ns: { - db: 'engineering', - coll: 'users' - }, - documentKey: { - _id: ObjectId("599af247bb69cd89961c986d") - } - } - -The ``fullDocument`` document is omitted as the document no longer exists at the -time the change stream cursor sends the ``delete`` event to the client. - -.. include:: /includes/change-stream-pre-and-post-images-change-events.rst - -.. include:: /includes/change-stream-pre-and-post-images-additional-information.rst - -.. _change-streams-drop-event: - -``drop`` Event ----------------- - -.. versionadded:: 4.0.1 - -A ``drop`` event occurs when a collection is dropped from a database. The -following example illustrates a ``drop`` event: - -.. code-block:: none - - { - _id: { < Resume Token > }, - operationType: 'drop', - clusterTime: , - wallTime: , - ns: { - db: 'engineering', - coll: 'users' - } - } - -A ``drop`` event leads to an :ref:`invalidate event ` -for change streams opened against its ``ns`` collection. - -.. _change-streams-rename-event: - -``rename`` Event ----------------- - -.. versionadded:: 4.0.1 - -A ``rename`` event occurs when a collection is renamed. The following example -illustrates a ``rename`` event: - -.. code-block:: none - - { - _id: { < Resume Token > }, - operationType: 'rename', - clusterTime: , - wallTime: , - ns: { - db: 'engineering', - coll: 'users' - }, - to: { - db: 'engineering', - coll: 'people' - }, - operationDescription: { - to: { - db: 'engineering', - coll: 'people' - } - } - } - -A ``rename`` event leads to an -:ref:`invalidate event ` for change streams opened -against its ``ns`` collection or ``to`` collection. - -.. versionchanged:: 6.0 - -Starting in MongoDB 6.0, when the :ref:`showExpandedEvents -` option is enabled for the change stream, the -``rename`` event includes an ``operationDescription`` document. This document -provides a ``to`` field showing the changed database and collection and a -``dropTarget`` field indicating whether the ``rename`` operation removed the -collection before the rename. - -.. _change-streams-dropDatabase-event: - -``dropDatabase`` Event ----------------------- - -.. versionadded:: 4.0.1 - -A ``dropDatabase`` event occurs when a database is dropped. The following -example illustrates a ``dropDatabase`` event: - -.. code-block:: none - - { - _id: { < Resume Token > }, - operationType: 'dropDatabase', - clusterTime: , - wallTime: , - ns: { - db: 'engineering' - } - } - -A :dbcommand:`dropDatabase` command generates a -:ref:`drop event ` for each collection in -the database before generating a ``dropDatabase`` event for the database. - -A ``dropDatabase`` event leads to an -:ref:`invalidate event ` for change streams opened -against its ``ns.db`` database. + * - :data:`update` + - Occurs when an operation updates a document in a collection. -.. _change-event-invalidate: +.. toctree:: + :hidden: -``invalidate`` Event --------------------- + create + createIndexes + delete + drop + dropDatabase + dropIndexes + insert + invalidate + modify + rename + replace + shardCollection + update -The following example illustrates an ``invalidate`` event: +.. _change-stream-event-id: -.. code-block:: none +Resume Token +------------ - { - _id: { < Resume Token > }, - operationType: 'invalidate', - clusterTime: , - wallTime: - } +Each change event includes an ``_id`` field, which contain a document. This +document can serve as the :ref:`resume token ` when +starting a change stream. -For change streams opened up against a collection, a -:ref:`drop event `, -:ref:`rename event `, or -:ref:`dropDatabase event ` that affects the -watched collection leads to an -:ref:`invalidate event `. +.. _change-streams-expanded-events: -For change streams opened up against a database, a -:ref:`dropDatabase event ` that affects the -watched database leads to an -:ref:`invalidate event `. - -``invalidate`` events close the change stream cursor. - -.. include:: /includes/extracts/changestream-invalid-events.rst - - -.. _change-event-createIndexes: - -``createIndexes`` Event ------------------------ - -.. versionadded:: 6.0 - -A ``createIndexes`` event occurs when an index is created on the collection and -the change stream has the ``showExpandedEvents`` option set to ``true``. - -The following example shows a ``createIndexes`` event: - -.. code-block:: text - - { - _id: { }, - operationType: 'createIndexes', - clusterTime: Timestamp({ t: 1651257835, i: 1 }), - collectionUUID: UUID("06bced37-7cc8-4267-96aa-a58a422153d8"), - wallTime: ISODate("2022-04-29T18:43:55.160Z"), - ns: { - db: 'test', - coll: 'authors' - }, - operationDescription: { - indexes: [ - { v: 2, key: { name: 1 }, name: 'name_1' } - ] - } - } - - -.. _change-event-dropIndexes: - -``dropIndexes`` Event ---------------------- +Expanded Events +--------------- .. versionadded:: 6.0 -A ``dropIndexes`` event occurs when an index is dropped from the collection and -the change stream has the ``showExpandedEvents`` option set to ``true``. - -The following example shows a ``dropIndexes`` event: - -.. code-block:: text - - { - _id: { }, - operationType: 'dropIndexes', - clusterTime: - collectionUUID: , - wallTime: , - ns: { - db: 'test', - coll: 'authors' }, - operationDescription: { - indexes: [ - { v: 2, key: { name: 1 }, name: 'name_1' } - ] - } - } - -.. _change-event-modify: - -``modify`` Event ----------------- - -.. versionadded:: 6.0 - -A ``modify`` event occurs when a collection is modified, such as when the -:dbcommand:`collMod` command adds or remove options from a collection or view. - -The following example shows a ``modify`` event: - -.. code-block:: text - - { - _id: { }, - operationType: 'modify', - clusterTime: Timestamp({ t: 1654878543, i: 1 }), - collectionUUID: UUID("47d6baac-eeaa-488b-98ae-893f3abaaf25"), - wallTime: ISODate("2022-06-10T16:29:03.704Z"), - ns: { - db: 'test', - coll: 'authors' }, - operationDescription: { - index: { - name: 'age_1', - hidden: true - } - }, - stateBeforeChange: { - collectionOptions: { uuid: UUID("47d6baac-eeaa-488b-98ae-893f3abaaf25") }, - indexOptions: { - hidden: false - } - } - } - -.. _change-event-create: +Starting in MongoDB 6.0, change streams support change notifications for DDL +events, like the :ref:`createIndexes ` and +:ref:`dropIndexes ` events. To include expanded +events in a change stream, create the change stream cursor using the +``showExpandedEvents`` option. -``create`` Event ------------------ +For example: -.. versionadded:: 6.0 +.. code-block:: javascript -A ``create`` event occurs when a collection is created, such as when the -:dbcommand:`create` command explicitly adds a collection to a database. - -The following example shows a ``create`` event: - -.. code-block:: text - - { - _id: { }, - operationType: 'create', - clusterTime: Timestamp({ t: 1654894547, i: 24 }), - collectionUUID: UUID("98046a1a-b649-4e5b-9c75-67594221ce19"), - wallTime: ISODate("2022-06-10T20:55:47.947Z"), - ns: { - db: 'test', - coll: 'names' - }, - operationDescription: { - idIndex: { v: 2, key: { _id: 1 }, name: '_id_' } + let cur = db.names.aggregate( [ + $changeStream: { + showExpandedEvents: true } - } + ] ) -.. _change-event-shardCollection: + cur.next() -``shardCollection`` Event -------------------------- -.. versionadded:: 6.0 - -A ``shardCollection`` event occurs when a collection is sharded. - -The following example shows a ``shardCollection`` event: - -.. code-block:: text - - { - _id: { }, - operationType: 'shardCollection', - clusterTime: Timestamp({ t: 1654894852, i: 52 }), - collectionUUID: UUID("98046a1a-b649-4e5b-9c75-67594221ce19"), - wallTime: ISODate("2022-06-10T21:00:52.854Z"), - ns: { - db: 'test', - coll: 'authors' - }, - operationDescription: { - shardKey: { age: 'hashed' }, - unique: false, - numInitialChunks: Long("0"), - presplitHashedZones: false - } - } diff --git a/source/reference/change-events/create.txt b/source/reference/change-events/create.txt new file mode 100644 index 00000000000..f11763ebf83 --- /dev/null +++ b/source/reference/change-events/create.txt @@ -0,0 +1,114 @@ +.. _change-event-create: + +============ +create Event +============ + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-create + +Summary +------- + +.. data:: create + + .. versionadded:: 6.0 + + A ``create`` event occurs when a collection is created on a watched + database and the change stream has the :ref:`showExpandedEvents + ` option set to ``true``. + + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``operationDescription`` + - document + - .. include:: /includes/change-stream/operationDescription + + * - | ``operationDescription.`` + | ``idIndex`` + - document + - .. include:: /includes/change-stream/od-idIndex + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``create`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + + +Example +------- + +The following example shows a ``create`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "create", + "clusterTime": Timestamp({ t: 1654894547, i: 24 }), + "collectionUUID": UUID("98046a1a-b649-4e5b-9c75-67594221ce19"), + "wallTime": ISODate("2022-06-10T20:55:47.947Z"), + "ns": { + "db": "test", + "coll": "names" + }, + "operationDescription": { + "idIndex": { "v": 2, "key": { _id: 1 }, "name": "_id_" } + } + } + diff --git a/source/reference/change-events/createIndexes.txt b/source/reference/change-events/createIndexes.txt new file mode 100644 index 00000000000..35e2d138089 --- /dev/null +++ b/source/reference/change-events/createIndexes.txt @@ -0,0 +1,123 @@ +.. _change-event-createIndexes: + +=================== +createIndexes Event +=================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-createIndexes + + +Summary +------- + +.. data:: createIndexes + + .. versionadded:: 6.0 + + A ``createIndexes`` event occurs when an index is created on the collection + and the change stream has the :ref:`showExpandedEvents + ` option set to ``true``. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db.rst + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll.rst + + * - ``operationDescription`` + - document + - .. include:: /includes/change-stream/operationDescription + + * - | ``operationDescription.`` + | ``indexes`` + - array + - An array of documents listing the indexes that were created + by the operation. + + .. versionadded:: 6.0 + + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``createIndexes`` for these change events. + + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Example +------- + +The following example shows a ``createIndexes`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "createIndexes", + "clusterTime": Timestamp({ t: 1651257835, i: 1 }), + "collectionUUID": UUID("06bced37-7cc8-4267-96aa-a58a422153d8"), + "wallTime": ISODate("2022-04-29T18:43:55.160Z"), + "ns": { + "db": "test", + "coll": "authors" + }, + "operationDescription": { + "indexes": [ + { "v": 2, "key": { "name": 1 }, "name": "name_1" } + ] + } + } diff --git a/source/reference/change-events/delete.txt b/source/reference/change-events/delete.txt new file mode 100644 index 00000000000..bc3976c544e --- /dev/null +++ b/source/reference/change-events/delete.txt @@ -0,0 +1,123 @@ +.. _change-events-delete: + +============ +delete Event +============ + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-delete + +Synopsis +-------- + +.. data:: delete + + A ``delete`` event occurs when operations remove documents from a collection, + such as when a user or application executes the :dbcommand:`delete` command. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``documentKey`` + - document + - .. include:: /includes/change-stream/documentKey + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``operationDescription`` + - document + - .. include:: /includes/change-stream/operationDescription + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``delete`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Behavior +-------- + +Document Pre- and Post-Images +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. include:: /includes/change-stream-pre-and-post-images-change-events.rst + +.. include:: /includes/change-stream-pre-and-post-images-additional-information.rst + + +Example +------- + +The following example illustrates a ``delete`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "delete", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering", + "coll": "users" + }, + "documentKey": { + "_id": ObjectId("599af247bb69cd89961c986d") + } + } + +The ``fullDocument`` document is omitted as the document no longer exists at the +time the change stream cursor sends the ``delete`` event to the client. + + + diff --git a/source/reference/change-events/drop.txt b/source/reference/change-events/drop.txt new file mode 100644 index 00000000000..406a513a092 --- /dev/null +++ b/source/reference/change-events/drop.txt @@ -0,0 +1,105 @@ +.. _change-event-drop: + +.. _change-streams-drop-event: + +========== +drop Event +========== + + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-drop + + +Synopsis +-------- + +.. data:: drop + + .. versionadded:: 4.0.1 + + A ``drop`` event occurs when a collection is dropped from a database. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``drop`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + + +Example +------- + +The following example illustrates a ``drop`` event: + +.. code-block:: json + :copyable: + + { + "_id": { }, + "operationType": "drop", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering", + "coll": "users" + } + } + +A ``drop`` event leads to an :data:`invalidate` event for change streams opened +against its own ``ns`` collection. + diff --git a/source/reference/change-events/dropDatabase.txt b/source/reference/change-events/dropDatabase.txt new file mode 100644 index 00000000000..6d33cf59db9 --- /dev/null +++ b/source/reference/change-events/dropDatabase.txt @@ -0,0 +1,101 @@ + +.. _change-event-dropDatabase: + +.. _change-streams-dropDatabase-event: + +============ +dropDatabase +============ + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-dropDatabase + + +Synopsis +-------- + +.. data:: dropDatabase + + .. versionadded:: 4.0.1 + + A ``dropDatabase`` event occurs when a database is dropped. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``dropDatabase`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Example +------- + +The following example illustrates a ``dropDatabase`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "dropDatabase", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering" + } + } + +A :dbcommand:`dropDatabase` command generates a +:ref:`drop event ` for each collection in +the database before generating a ``dropDatabase`` event for the database. + +A ``dropDatabase`` event leads to an :data:`invalidate` event for +change streams opened against its own ``ns.db`` database. + + diff --git a/source/reference/change-events/dropIndexes.txt b/source/reference/change-events/dropIndexes.txt new file mode 100644 index 00000000000..ba96b78eaae --- /dev/null +++ b/source/reference/change-events/dropIndexes.txt @@ -0,0 +1,122 @@ +.. _change-event-dropIndexes: + +=========== +dropIndexes +=========== + + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-dropIndexes + +Synopsis +-------- + +.. data:: dropIndexes + + .. versionadded:: 6.0 + + A ``dropIndexes`` event occurs when an index is dropped from the collection and + the change stream has the :ref:`showExpandedEvents ` + option set to ``true``. + +Descriptions +------------ + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``operationDescription`` + - document + - .. include:: /includes/change-stream/operationDescription + + * - | ``operationDescription.`` + | ``indexes`` + - array + - An array of documents listing the indexes that were dropped + by the operation. + + .. versionadded:: 6.0 + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``dropIndexes`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Example +------- + +The following example shows a ``dropIndexes`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "dropIndexes", + "clusterTime": + "collectionUUID": , + "wallTime": , + "ns": { + "db": "test", + "coll": "authors" }, + "operationDescription": { + "indexes": [ + { "v": 2, "key": { "name": 1 }, "name": "name_1" } + ] + } + } + diff --git a/source/reference/change-events/insert.txt b/source/reference/change-events/insert.txt new file mode 100644 index 00000000000..0aaf692a1b0 --- /dev/null +++ b/source/reference/change-events/insert.txt @@ -0,0 +1,123 @@ +.. _change-event-insert: + +====== +insert +====== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-insert + +Summary +------- + +.. data:: insert + + An ``insert`` event occurs when an operation adds documents to a collection. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + + * - ``documentKey`` + - document + - .. include:: /includes/change-stream/documentKey + + * - ``fullDocument`` + - document + - The document created by the operation. + + .. include:: /includes/change-stream/fullDocument-postimage + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``insert`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + + +Example +------- + +The following example illustrates an ``insert`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "insert", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering", + "coll": "users" + }, + "documentKey": { + "userName": "alice123", + "_id": ObjectId("599af247bb69cd89961c986d") + }, + "fullDocument": { + "_id": ObjectId("599af247bb69cd89961c986d"), + "userName": "alice123", + "name": "Alice" + } + } + +The ``documentKey`` field includes both the ``_id`` and the ``userName`` +field. This indicates that the ``engineering.users`` collection is sharded, +with a shard key on ``userName`` and ``_id``. + +The ``fullDocument`` document represents the version of the document at the +time of the insert. + diff --git a/source/reference/change-events/invalidate.txt b/source/reference/change-events/invalidate.txt new file mode 100644 index 00000000000..2a60b3217e7 --- /dev/null +++ b/source/reference/change-events/invalidate.txt @@ -0,0 +1,82 @@ +.. _change-event-invalidate: + +========== +invalidate +========== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-invalidate + +Summary +------- + +.. data:: invalidate + + An ``invalidate`` event occurs when an operation renders the change stream + invalid. For example, a change stream opened on a collection that was later + dropped or renamed would cause an ``invalidate`` event. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``invalidate`` for these change events. + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Example +------- + +The following example illustrates an ``invalidate`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "invalidate", + "clusterTime": , + "wallTime": + } + +Change streams opened on collections raise an ``invalidate`` event when a +:ref:`drop `, :ref:`rename `, +or :ref:`dropDatabase ` operation occurs +that affects the watched collection. + +Change streams opened on databases raise an ``invalidate`` event when a +:ref:`dropDatabase ` event occurs that affects +the watched database. + +``invalidate`` events close the change stream cursor. + +.. include:: /includes/extracts/changestream-invalid-events.rst + diff --git a/source/reference/change-events/modify.txt b/source/reference/change-events/modify.txt new file mode 100644 index 00000000000..4c944adf825 --- /dev/null +++ b/source/reference/change-events/modify.txt @@ -0,0 +1,152 @@ +.. _change-event-modify: + +================ +``modify`` Event +================ + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-modify + +Summary +------- + +.. data:: modify + + .. versionadded:: 6.0 + + A ``modify`` event occurs when a collection is modified, such as when the + :dbcommand:`collMod` command adds or remove options from a collection or + view. This event is received only if the change stream has the + :ref:`showExpandedEvents ` option + set to ``true``. + + .. note:: Disambiguation + + To learn more about events that occur when individual documents are + updated, see the :data:`update` event. + + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``operationDescription`` + - document + - .. include:: /includes/change-stream/operationDescription + + * - | ``operationDescription.`` + | ``index`` + - document + - .. include:: /includes/change-stream/od-index + + * - | ``operationDescription.`` + | ``indexes`` + - array + - An array of documents listing the indexes that were changed + by the operation. + + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``modify`` for these change events. + + * - ``stateBeforeChange`` + - document + - .. include:: /includes/change-stream/stateBeforeChange + + * - | ``stateBeforeChange.`` + | ``collectionOptions`` + - document + - .. include:: /includes/change-stream/stateBeforeChange.collectionOptions + + * - | ``stateBeforeChange.`` + | ``indexOptions`` + - document + - .. include:: /includes/change-stream/stateBeforeChange.indexOptions + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + + +Example +------- + +The following example shows a ``modify`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "modify", + "clusterTime": Timestamp({ t: 1654878543, i: 1 }), + "collectionUUID": UUID("47d6baac-eeaa-488b-98ae-893f3abaaf25"), + "wallTime": ISODate("2022-06-10T16:29:03.704Z"), + "ns": { + "db": "test", + "coll": "authors" }, + "operationDescription": { + "index": { + "name": "age_1", + "hidden": true + } + }, + "stateBeforeChange": { + "collectionOptions": { + "uuid": UUID("47d6baac-eeaa-488b-98ae-893f3abaaf25") + }, + "indexOptions": { + "hidden": false + } + } + } + diff --git a/source/reference/change-events/rename.txt b/source/reference/change-events/rename.txt new file mode 100644 index 00000000000..008de9916f0 --- /dev/null +++ b/source/reference/change-events/rename.txt @@ -0,0 +1,162 @@ +.. _change-event-rename: +.. _change-streams-rename-event: + +================ +``rename`` Event +================ + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-rename + +Summary +------- + +.. data:: rename + + .. versionadded:: 4.0.1 + + A ``rename`` event occurs when a collection is renamed. + + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``operationDescription`` + - document + - .. include:: /includes/change-stream/operationDescription + + * - | ``operationDescription.`` + | ``dropTarget`` + - UUID + - .. include:: /includes/change-stream/od-dropTarget + + * - | ``operationDescription.`` + | ``to`` + - document + - .. include:: /includes/change-stream/od-to + + * - | ``operationDescription.`` + | ``to.coll`` + - document + - .. include:: /includes/change-stream/od-to-coll + + * - | ``operationDescription.`` + | ``to.db`` + - document + - .. include:: /includes/change-stream/od-to-db + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``rename`` for these change events. + + * - ``to`` + - document + - .. include:: /includes/change-stream/to + + * - ``to.coll`` + - document + - .. include:: /includes/change-stream/to.coll + + * - ``to.db`` + - document + - .. include:: /includes/change-stream/to.db + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Behavior +-------- + +Expanded Event Information +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionchanged:: 6.0 + +Starting in MongoDB 6.0, when the :ref:`showExpandedEvents +` option is set to ``true`` for the change +stream, the ``rename`` event includes an ``operationDescription`` document. +This document provides a ``to`` field showing the changed database and +collection and a ``dropTarget`` field indicating whether the ``rename`` +operation removed the collection before the rename. + + +Example +------- + +The following example illustrates a ``rename`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "rename", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering", + "coll": "users" + }, + "to": { + "db": "engineering", + "coll": "people" + }, + "operationDescription": { + "to": { + "db": "engineering", + "coll": "people" + } + } + } + +A ``rename`` event leads to an +:ref:`invalidate event ` for change streams opened +against its ``ns`` collection or ``to`` collection. + diff --git a/source/reference/change-events/replace.txt b/source/reference/change-events/replace.txt new file mode 100644 index 00000000000..66f64013207 --- /dev/null +++ b/source/reference/change-events/replace.txt @@ -0,0 +1,139 @@ +.. _change-stream-replace: + +================= +``replace`` Event +================= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-replace + +Summary +------- + +.. data:: replace + + A ``replace`` event occurs when an update operation removes a document from + a collection and replaces it with a new document, such as when the + :method:`replaceOne ` method is called. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + + * - ``documentKey`` + - document + - .. include:: /includes/change-stream/documentKey + + + * - ``fullDocument`` + - document + - The new document created by the operation. + + .. include:: /includes/change-stream/fullDocument-postimage + + * - ``fullDocumentBeforeChange`` + - document + - .. include:: /includes/change-stream/fullDocumentBeforeChange + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``replace`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Behavior +-------- + +Document Pre- and Post-Images +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. include:: /includes/change-stream-pre-and-post-images-change-events.rst + +.. include:: /includes/change-stream-pre-and-post-images-additional-information.rst + + +Examples +-------- + +The following example illustrates a ``replace`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "replace", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering", + "coll": "users" + }, + "documentKey": { + "_id": ObjectId("599af247bb69cd89961c986d") + }, + "fullDocument": { + "_id": ObjectId("599af247bb69cd89961c986d"), + "userName": "alice123", + "name": "Alice" + } + } + +A ``replace`` operation uses the update command, and consists of two stages: + +- Delete the original document with the ``documentKey`` and +- Insert the new document using the same ``documentKey`` + +The ``fullDocument`` of a ``replace`` event represents the document after the +insert of the replacement document. + diff --git a/source/reference/change-events/shardCollection.txt b/source/reference/change-events/shardCollection.txt new file mode 100644 index 00000000000..3419dc414e6 --- /dev/null +++ b/source/reference/change-events/shardCollection.txt @@ -0,0 +1,131 @@ + +.. _change-event-shardCollection: + +========================= +``shardCollection`` Event +========================= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-shardCollection + +Summary +------- + +.. data:: shardCollection + + .. versionadded:: 6.0 + + A ``shardCollection`` event occurs when a collection is sharded. + + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``operationDescription`` + - document + - .. include:: /includes/change-stream/operationDescription + + * - | ``operationDescription.`` + | ``numInitialChunks`` + - long + - .. include:: /includes/change-stream/od-numInitialChunks + + * - | ``operationDescription.`` + | ``presplitHashedZones`` + - boolean + - .. include:: /includes/change-stream/od-presplitHashedZones + + * - | ``operationDescription.`` + | ``shardKey`` + - document + - .. include:: /includes/change-stream/od-shardKey + + + * - | ``operationDescription.`` + | ``unique`` + - boolean + - .. include:: /includes/change-stream/od-unique + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``shardCollection`` for these change events. + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Example +------- + +The following example shows a ``shardCollection`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "shardCollection", + "clusterTime": Timestamp({ t: 1654894852, i: 52 }), + "collectionUUID": UUID("98046a1a-b649-4e5b-9c75-67594221ce19"), + "wallTime": ISODate("2022-06-10T21:00:52.854Z"), + "ns": { + "db": "test", + "coll": "authors" + }, + "operationDescription": { + "shardKey": { "age": "hashed" }, + "unique": false, + "numInitialChunks": Long("0"), + "presplitHashedZones": false + } + } + diff --git a/source/reference/change-events/update.txt b/source/reference/change-events/update.txt new file mode 100644 index 00000000000..d70231dbe6d --- /dev/null +++ b/source/reference/change-events/update.txt @@ -0,0 +1,216 @@ +.. _change-event-update: +.. _change-streams-update-event: + +================ +``update`` Event +================ + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. |idref| replace:: ce-update + +Summary +------- + +.. data:: update + + An ``update`` event occurs when an operation updates a document + in a collection. + + .. note:: Disambiguation + + To learn more about events that occur when collection options are + modified, see the :data:`modify` event. + +Description +----------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - ``_id`` + - Document + - .. include:: /includes/change-stream/id + + * - ``clusterTime`` + - Timestamp + - .. include:: /includes/change-stream/clusterTime + + * - ``collectionUUID`` + - UUID + - .. include:: /includes/change-stream/collectionUUID + + * - ``documentKey`` + - document + - .. include:: /includes/change-stream/documentKey + + + * - ``fullDocument`` + - document + - .. include:: /includes/change-stream/fullDocument + + .. include:: /includes/change-stream/fullDocument-update + + .. include:: /includes/change-stream/fullDocument-postimage + + * - ``fullDocumentBeforeChange`` + - document + - .. include:: /includes/change-stream/fullDocumentBeforeChange + + * - ``lsid`` + - document + - .. include:: /includes/change-stream/lsid + + * - ``ns`` + - document + - .. include:: /includes/change-stream/ns + + * - ``ns.coll`` + - string + - .. include:: /includes/change-stream/ns.coll + + * - ``ns.db`` + - string + - .. include:: /includes/change-stream/ns.db + + * - ``operationType`` + - string + - .. include:: /includes/change-stream/operationType + + Returns a value of ``update`` for these change events. + + * - ``updateDescription`` + - document + - .. include:: /includes/change-stream/updateDescription + + * - | ``updateDescription.`` + | ``removedFields`` + - array + - .. include:: /includes/change-stream/ud-removedFields + + * - | ``updateDescription.`` + | ``truncatedArrays`` + - array + - .. include:: /includes/change-stream/ud-truncatedArrays + + * - | ``updateDescription.`` + | ``trucatedArrays.`` + | ``field`` + - string + - .. include:: /includes/change-stream/ud-ta-field + + * - | ``updateDescription.`` + | ``trucatedArrays.`` + | ``newSize`` + - integer + - .. include:: /includes/change-stream/ud-ta-newSize + + * - | ``updateDescription.`` + | ``updatedFields`` + - document + - .. include:: /includes/change-stream/ud-updatedFields + + * - ``txnNumber`` + - NumberLong + - .. include:: /includes/change-stream/txnNumber + + * - ``wallTime`` + - :term:`ISODate` + - .. include:: /includes/change-stream/wallTime + +Behavior +-------- + +Document Pre- and Post-Images +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. include:: /includes/change-stream-pre-and-post-images-change-events.rst + +.. include:: /includes/change-stream-pre-and-post-images-additional-information.rst + + +Example +------- + +The following example illustrates an ``update`` event: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "update", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering", + "coll": "users" + }, + "documentKey": { + "_id": ObjectId("58a4eb4a30c75625e00d2820") + }, + "updateDescription": { + "updatedFields": { + "email": "alice@10gen.com" + }, + "removedFields": ["phoneNumber"], + "truncatedArrays": [ { + "field" : "vacation_time", + "newSize" : 36 + } ] + } + } + +The following example illustrates an ``update`` event for change streams +opened with the ``fullDocument : updateLookup`` option: + +.. code-block:: json + :copyable: false + + { + "_id": { }, + "operationType": "update", + "clusterTime": , + "wallTime": , + "ns": { + "db": "engineering", + "coll": "users" + }, + "documentKey": { + "_id": ObjectId("58a4eb4a30c75625e00d2820") + }, + "updateDescription": { + "updatedFields": { + "email": "alice@10gen.com" + }, + "removedFields": ["phoneNumber"], + "truncatedArrays": [ { + "field" : "vacation_time", + "newSize" : 36 + } ] + }, + "fullDocument": { + "_id": ObjectId("58a4eb4a30c75625e00d2820"), + "name": "Alice", + "userName": "alice123", + "email": "alice@10gen.com", + "team": "replication" + } + } + +The ``fullDocument`` document represents the most current majority-committed +version of the updated document. The ``fullDocument`` document may vary from +the document at the time of the update operation depending on the number of +interleaving majority-committed operations that occur between the update +operation and the document lookup. + diff --git a/source/reference/command/collMod.txt b/source/reference/command/collMod.txt index 6f48a369a9c..283b0ea3622 100644 --- a/source/reference/command/collMod.txt +++ b/source/reference/command/collMod.txt @@ -414,6 +414,8 @@ Resource Locking Examples -------- +.. _ex-change-exp-value: + Change Expiration Value for Indexes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/reference/command/compact.txt b/source/reference/command/compact.txt index 7683996badf..10d730e5cef 100644 --- a/source/reference/command/compact.txt +++ b/source/reference/command/compact.txt @@ -28,16 +28,16 @@ The command has the following syntax: .. code-block:: javascript - db.adminCommand( + db.runCommand( { compact: } ) Command Fields -~~~~~~~~~~~~~~ +-------------- -:dbcommand:`compact` takes the following fields: +The command takes the following fields: .. note:: Starting in MongoDB 4.2 @@ -52,21 +52,15 @@ Command Fields :widths: 20 20 80 * - Field - - Type - - Description * - ``compact`` - - string - - The name of the collection. * - ``force`` - - flag - - .. versionchanged:: 4.4 Optional. Starting in v4.4, if specified, forces @@ -82,11 +76,8 @@ Command Fields :ref:`crud` on the database it is compacting. * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 diff --git a/source/reference/command/dataSize.txt b/source/reference/command/dataSize.txt index c43843a09a6..5ab2ef025de 100644 --- a/source/reference/command/dataSize.txt +++ b/source/reference/command/dataSize.txt @@ -16,82 +16,69 @@ Definition .. dbcommand:: dataSize The :dbcommand:`dataSize` command returns the size in bytes for - the specified data: + the specified data. - .. code-block:: javascript +Syntax +------ - { - dataSize: , - keyPattern: , - min: , - max: , - estimate: - } - - The command takes the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``dataSize`` - - - string - - - The name of the target collection. - - - - * - ``keyPattern`` - - - document - - - Optional. The collection's key pattern to examine. - - The collection must have an index with the corresponding pattern. - Otherwise :dbcommand:`dataSize` returns an error message. - - - - * - ``min`` - - - document - - - Optional. The lower bound of the key range to be examined. - - - - * - ``max`` - - - document - - - Optional. The upper bound of the key range to be examined. - - - - * - ``estimate`` - - - boolean - - - Optional. When ``true``, :dbcommand:`dataSize` estimates the data size by - assuming that all documents in the specified range are uniformly - sized as per the collection's average object size. The collection's - average object size is obtained from the ``avgObjSize`` field in - the output of the :dbcommand:`collStats` command. - - Defaults to false. - - - +The command has the following syntax: +.. code-block:: javascript + db.runCommand( + { + dataSize: , + keyPattern: , + min: , + max: , + estimate: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``dataSize`` + - string + - The name of the target collection. + + * - ``keyPattern`` + - document + - Optional. The collection's key pattern to examine. + + The collection must have an index with the corresponding pattern. + Otherwise :dbcommand:`dataSize` returns an error message. + + * - ``min`` + - document + - Optional. The lower bound of the key range to be examined. + + + * - ``max`` + - document + - Optional. The upper bound of the key range to be examined. + + * - ``estimate`` + - boolean + - Optional. When ``true``, :dbcommand:`dataSize` estimates the data size by + assuming that all documents in the specified range are uniformly + sized as per the collection's average object size. The collection's + average object size is obtained from the ``avgObjSize`` field in + the output of the :dbcommand:`collStats` command. + + Defaults to false. + Example ------- diff --git a/source/reference/command/dbHash.txt b/source/reference/command/dbHash.txt index 83d51e97095..6f98265c6ea 100644 --- a/source/reference/command/dbHash.txt +++ b/source/reference/command/dbHash.txt @@ -20,45 +20,51 @@ Definition to compare databases across :binary:`~bin.mongod` instances, such as across members of replica sets. - :dbcommand:`dbHash` has the following syntax: +.. warning:: - .. code-block:: javascript + The :dbcommand:`dbHash` command obtains a shared (S) lock on the + database, which prevents writes until the command completes. - db.runCommand ( { dbHash: 1, collections: [ , ... ] } ) +Syntax +------ +The command has the following syntax: - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``dbHash`` - - - Any type - - - The command to run. Specify any value. - - - - * - ``collections`` - - - array - - - Optional. An array of collection names. - - Either specify the collections for which to return the hash values, - or omit or specify an empty array to return the hash values for all - collections in the database. - - - +.. code-block:: javascript + db.runCommand( + { + dbHash: 1, + collections: [ , ... ] + } + ) +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``dbHash`` + - Any type + - The command to run. Specify any value. + + * - ``collections`` + - array + - Optional. An array of collection names. + + Either specify the collections for which to return the hash values, + or omit or specify an empty array to return the hash values for all + collections in the database. + + Behavior -------- diff --git a/source/reference/command/dbStats.txt b/source/reference/command/dbStats.txt index 3a1e851a8fe..e280db72db0 100644 --- a/source/reference/command/dbStats.txt +++ b/source/reference/command/dbStats.txt @@ -16,59 +16,69 @@ Definition .. dbcommand:: dbStats The :dbcommand:`dbStats` command returns storage statistics for a - given database. The command has the following syntax: - - .. _scale-argument: - - .. code-block:: javascript - - db.runCommand( { - dbStats: 1, - scale: , - freeStorage: 0 - } ) - - The :dbcommand:`dbStats` command takes the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 80 - - * - Fields - - Description - - * - :dbcommand:`dbStats` - - 1 - - * - :ref:`scale ` - - .. _dbStats-scale: - - Optional. The scale factor for the various size data. The - ``scale`` defaults to 1 to return size data in bytes. To - display kilobytes rather than bytes, specify a ``scale`` - value of ``1024``. - - If you specify a non-integer scale factor, MongoDB uses the - integer part of the specified factor. For example, if you - specify a scale factor of ``1023.999``, MongoDB uses ``1023`` - as the scale factor. - - .. include:: /includes/extracts/4.2-changes-stats-scaleFactor.rst - - * - :ref:`freeStorage ` - - .. _dbStats-freeStorage: - - Optional. To return details on free space allocated to - collections, set ``freeStorage`` to 1. - - If the instance has a large number of collections or indexes, - obtaining free space usage data may cause processing delays. - To gather :dbcommand:`dbStats` information without free space - details, either set ``freeStorage`` to 0 or do not include - the field. - - In :binary:`~bin.mongosh`, the :method:`db.stats()` function - provides a wrapper around :dbcommand:`dbStats`. + given database. + +Syntax +------ + +The command has the following syntax: + +.. _scale-argument: + +.. code-block:: javascript + + db.runCommand( + { + dbStats: 1, + scale: , + freeStorage: 0 + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Fields + - Description + + * - :dbcommand:`dbStats` + - 1 + + * - :ref:`scale ` + - .. _dbStats-scale: + + Optional. The scale factor for the various size data. The + ``scale`` defaults to 1 to return size data in bytes. To + display kilobytes rather than bytes, specify a ``scale`` + value of ``1024``. + + If you specify a non-integer scale factor, MongoDB uses the + integer part of the specified factor. For example, if you + specify a scale factor of ``1023.999``, MongoDB uses ``1023`` + as the scale factor. + + .. include:: /includes/extracts/4.2-changes-stats-scaleFactor.rst + + * - :ref:`freeStorage ` + - .. _dbStats-freeStorage: + + Optional. To return details on free space allocated to + collections, set ``freeStorage`` to 1. + + If the instance has a large number of collections or indexes, + obtaining free space usage data may cause processing delays. + To gather :dbcommand:`dbStats` information without free space + details, either set ``freeStorage`` to 0 or do not include + the field. + +In :binary:`~bin.mongosh`, the :method:`db.stats()` function +provides a wrapper around :dbcommand:`dbStats`. Behavior -------- diff --git a/source/reference/command/delete.txt b/source/reference/command/delete.txt index 95a2b10c141..d1b7344f6b6 100644 --- a/source/reference/command/delete.txt +++ b/source/reference/command/delete.txt @@ -23,195 +23,162 @@ Definition .. versionchanged:: 5.0 - .. _delete-syntax: - - The :dbcommand:`delete` command has the following syntax: - - .. code-block:: none - - { - delete: , - deletes: [ - { - q : , - limit : , - collation: , - hint: - }, - ... - ], - comment: , - let: , // Added in MongoDB 5.0 - ordered: , - writeConcern: { } - } + :returns: + + A document that contains the status of the operation. + See :ref:`delete-command-output` for details. - The command takes the following fields: +Syntax +------ +.. _delete-syntax: - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - :ref:`delete ` - - - string - - - .. _delete-command-delete: - - The name of the target collection. - - - - * - :ref:`deletes ` - - - array - - - .. _delete-command-deletes: - - An array of one or more delete statements to perform in the named - collection. - - - * - ``comment`` +The command has the following syntax: - - any +.. code-block:: javascript - - .. include:: /includes/extracts/comment-content.rst + db.runCommand( + { + delete: , + deletes: [ + { + q : , + limit : , + collation: , + hint: + }, + ... + ], + comment: , + let: , // Added in MongoDB 5.0 + ordered: , + writeConcern: { } + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - :ref:`delete ` + - string + - .. _delete-command-delete: + + The name of the target collection. + + * - :ref:`deletes ` + - array + - .. _delete-command-deletes: + + An array of one or more delete statements to perform in the named + collection. - .. versionadded:: 4.4 - - - * - :ref:`let ` - - - document - - - .. _delete-let-syntax: - - Optional. + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + + * - :ref:`let ` + - document + - .. _delete-let-syntax: - .. include:: /includes/let-variables-syntax.rst - - .. include:: /includes/let-variables-syntax-note.rst - - For a complete example using ``let`` and variables, - see :ref:`delete-let-example`. - - .. versionadded:: 5.0 - - * - :ref:`ordered ` - - - boolean - - - .. _delete-command-ordered: - - Optional. If ``true``, then when a delete statement fails, return without - performing the remaining delete statements. If ``false``, then when a - delete statement fails, continue with the remaining delete - statements, if any. Defaults to ``true``. - - - - * - :ref:`writeConcern ` - - - document - - - .. _delete-command-wc: - - Optional. A document expressing the :doc:`write concern ` - of the :dbcommand:`delete` command. Omit to use the default write - concern. - - .. include:: /includes/extracts/transactions-operations-write-concern.rst - - - - - .. |operation| replace:: delete - - .. |operations| replace:: delete statements - - - - Each element of the ``deletes`` array contains the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - :ref:`q ` - - - document - - - .. _deletes-array-q: - - The query that matches documents to delete. - - - - * - :ref:`limit ` - - - integer - - - .. _deletes-array-limit: - - The number of matching documents to delete. Specify either a ``0`` to - delete all matching documents or ``1`` to delete a single document. - - - - * - :ref:`collation ` - - - document - - - .. _deletes-array-collation: - - Optional. - - .. include:: /includes/extracts/collation-option.rst - - * - :ref:`hint ` - - - Document or string - - - .. _deletes-array-hint: - - Optional. A document or string that specifies the :doc:`index - ` to use to support the :ref:`query predicate - `. - - The option can take an index specification document or the - index name string. - - If you specify an index that does not exist, the operation - errors. - - For an example, see :ref:`ex-delete-command-hint`. - - .. versionadded:: 4.4 - - - - - - :returns: - - A document that contains the status of the operation. - See :ref:`delete-command-output` for details. - + Optional. + + .. include:: /includes/let-variables-syntax.rst + + .. include:: /includes/let-variables-syntax-note.rst + + For a complete example using ``let`` and variables, + see :ref:`delete-let-example`. + + .. versionadded:: 5.0 + + * - :ref:`ordered ` + - boolean + - .. _delete-command-ordered: + + Optional. If ``true``, then when a delete statement fails, return without + performing the remaining delete statements. If ``false``, then when a + delete statement fails, continue with the remaining delete + statements, if any. Defaults to ``true``. + + * - :ref:`writeConcern ` + - document + - .. _delete-command-wc: + + Optional. A document expressing the :doc:`write concern ` + of the :dbcommand:`delete` command. Omit to use the default write + concern. + + .. include:: /includes/extracts/transactions-operations-write-concern.rst + + +.. |operation| replace:: delete + +.. |operations| replace:: delete statements + + +Each element of the ``deletes`` array contains the following fields: + + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - :ref:`q ` + - document + - .. _deletes-array-q: + + The query that matches documents to delete. + + * - :ref:`limit ` + - integer + - .. _deletes-array-limit: + + The number of matching documents to delete. Specify either a ``0`` to + delete all matching documents or ``1`` to delete a single document. + + * - :ref:`collation ` + - document + - .. _deletes-array-collation: + + Optional. + + .. include:: /includes/extracts/collation-option.rst + + * - :ref:`hint ` + - Document or string + - .. _deletes-array-hint: + + Optional. A document or string that specifies the :doc:`index + ` to use to support the :ref:`query predicate + `. + + The option can take an index specification document or the + index name string. + + If you specify an index that does not exist, the operation + errors. + + For an example, see :ref:`ex-delete-command-hint`. + + .. versionadded:: 4.4 + + Behavior -------- diff --git a/source/reference/command/distinct.txt b/source/reference/command/distinct.txt index 01cb3c78b80..0347fcfbe24 100644 --- a/source/reference/command/distinct.txt +++ b/source/reference/command/distinct.txt @@ -20,10 +20,14 @@ Definition an array of the distinct values. The return document also contains an embedded document with query statistics and the query plan. - The command takes the following form +Syntax +------ - .. code-block:: javascript +The command has the following syntax: +.. code-block:: javascript + + db.runCommand( { distinct: "", key: "", @@ -32,82 +36,61 @@ Definition collation: , comment: } + ) - The command contains the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``distinct`` - - - string - - - The name of the collection to query for distinct values. - - - - * - ``key`` - - - string - - - The field for which to return distinct values. - - - - * - ``query`` - - - document - - - Optional. A query that specifies the documents from which to retrieve the - distinct values. - - - - * - ``readConcern`` - - - document - - - Optional. Specifies the :term:`read concern`. - - .. include:: /includes/fact-readConcern-syntax.rst - - .. include:: /includes/fact-readConcern-option-description.rst - - - - * - ``collation`` - - - document - - - Optional. - - .. include:: /includes/extracts/collation-option.rst - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``distinct`` + - string + - The name of the collection to query for distinct values. + + * - ``key`` + - string + - The field for which to return distinct values. - .. versionadded:: 4.4 - - - - - .. include:: /includes/note-distinct-bson-limit-agg-alternative.rst - - MongoDB also provides the shell wrapper method - :method:`db.collection.distinct()` for the :dbcommand:`distinct` - command. Additionally, many MongoDB :term:`drivers ` - provide a wrapper method. Refer to the specific driver documentation. + * - ``query`` + - document + - Optional. A query that specifies the documents from which to retrieve the + distinct values. + + * - ``readConcern`` + - document + - Optional. Specifies the :term:`read concern`. + + .. include:: /includes/fact-readConcern-syntax.rst + + .. include:: /includes/fact-readConcern-option-description.rst + + * - ``collation`` + - document + - Optional. + + .. include:: /includes/extracts/collation-option.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + + +.. include:: /includes/note-distinct-bson-limit-agg-alternative.rst + +MongoDB also provides the shell wrapper method +:method:`db.collection.distinct()` for the :dbcommand:`distinct` +command. Additionally, many MongoDB :term:`drivers ` +provide a wrapper method. Refer to the specific driver documentation. Behavior -------- diff --git a/source/reference/command/drop.txt b/source/reference/command/drop.txt index 79893286317..06a71eaa2c5 100644 --- a/source/reference/command/drop.txt +++ b/source/reference/command/drop.txt @@ -10,43 +10,60 @@ drop :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: drop The :dbcommand:`drop` command removes an entire collection from a - database. The command has following syntax: - - .. code-block:: javascript - - { drop: , writeConcern: , comment: } - - The command takes the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 80 - - * - Field - - Description - - * - ``drop`` - - The name of the collection to drop. - - * - ``writeConcern`` - - - Optional. A document expressing the :doc:`write concern - ` of the :dbcommand:`drop` command. - Omit to use the default write concern. - - .. include:: /includes/extracts/mongos-operations-wc-drop.rst - - * - ``comment`` - - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 - - :binary:`~bin.mongosh` provides the equivalent helper method - :method:`db.collection.drop()`. + database. + +Syntax +------ + +The command has following syntax: + +.. code-block:: javascript + + db.runCommand( + { + drop: , + writeConcern: , + comment: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Field + - Description + + * - ``drop`` + - The name of the collection to drop. + + * - ``writeConcern`` + + - Optional. A document expressing the :doc:`write concern + ` of the :dbcommand:`drop` command. + Omit to use the default write concern. + + .. include:: /includes/extracts/mongos-operations-wc-drop.rst + + * - ``comment`` + + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + +:binary:`~bin.mongosh` provides the equivalent helper method +:method:`db.collection.drop()`. Behavior -------- diff --git a/source/reference/command/dropAllRolesFromDatabase.txt b/source/reference/command/dropAllRolesFromDatabase.txt index 3c24b4a88f7..3dfc2306a39 100644 --- a/source/reference/command/dropAllRolesFromDatabase.txt +++ b/source/reference/command/dropAllRolesFromDatabase.txt @@ -23,40 +23,49 @@ Definition The :dbcommand:`dropAllRolesFromDatabase` removes *all* :ref:`user-defined ` roles from the database. - The :dbcommand:`dropAllRolesFromDatabase` command takes the following - form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { - dropAllRolesFromDatabase: 1, - writeConcern: { }, - comment: - } - - The command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``dropAllRolesFromDatabase`` - - integer - - Specify ``1`` to drop all :ref:`user-defined ` - roles from the database where the command is run. - * - ``writeConcern`` - - document - - /includes/source/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 +.. code-block:: javascript + db.runCommand( + { + dropAllRolesFromDatabase: 1, + writeConcern: { }, + comment: + } + ) + +Command Fields +-------------- + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``dropAllRolesFromDatabase`` + - integer + - Specify ``1`` to drop all :ref:`user-defined ` + roles from the database where the command is run. + + * - ``writeConcern`` + - document + - /includes/source/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Required Access --------------- diff --git a/source/reference/command/dropAllUsersFromDatabase.txt b/source/reference/command/dropAllUsersFromDatabase.txt index 10fea512e8e..792c4c2a0e7 100644 --- a/source/reference/command/dropAllUsersFromDatabase.txt +++ b/source/reference/command/dropAllUsersFromDatabase.txt @@ -22,39 +22,48 @@ Definition The :dbcommand:`dropAllUsersFromDatabase` removes all users from the database. - The :dbcommand:`dropAllUsersFromDatabase` command has the following - syntax: - - .. code-block:: javascript - - { dropAllUsersFromDatabase: 1, - writeConcern: { }, - comment: - } - - The :dbcommand:`dropAllUsersFromDatabase` document has the following - fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``dropAllUsersFromDatabase`` - - integer - - Specify ``1`` to drop all the users from the current database. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 +Syntax +------ +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + dropAllUsersFromDatabase: 1, + writeConcern: { }, + comment: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``dropAllUsersFromDatabase`` + - integer + - Specify ``1`` to drop all the users from the current database. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Required Access --------------- diff --git a/source/reference/command/dropConnections.txt b/source/reference/command/dropConnections.txt index 0d86c4bedad..64906131c33 100644 --- a/source/reference/command/dropConnections.txt +++ b/source/reference/command/dropConnections.txt @@ -10,6 +10,9 @@ dropConnections :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: dropConnections .. versionadded:: 4.2 @@ -19,41 +22,45 @@ dropConnections connections to the specified hosts. The :dbcommand:`dropConnections` must be run against the ``admin`` database. - The command has following syntax: +Syntax +------ + +The command has following syntax: - .. code-block:: javascript +.. code-block:: javascript - db.adminCommand({ + db.adminCommand( + { dropConnections: 1, hostAndPort : [ "host1:port1", "host2:port2", ... ], comment: - }) - - The command requires the following field: - - .. list-table:: - :header-rows: 1 - :widths: 20 10 70 - - * - Field - - Type - - Description - - * - ``hostAndPort`` - - - array - - - Each array element represents the hostname and - port of a remote machine. - - * - ``comment`` - - - any + } + ) - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 +Command Fields +-------------- +The command requires the following field: + +.. list-table:: + :header-rows: 1 + :widths: 20 10 70 + + * - Field + - Type + - Description + + * - ``hostAndPort`` + - array + - Each array element represents the hostname and + port of a remote machine. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Access Control -------------- diff --git a/source/reference/command/dropDatabase.txt b/source/reference/command/dropDatabase.txt index bb1cb963e95..f5472c7ce3c 100644 --- a/source/reference/command/dropDatabase.txt +++ b/source/reference/command/dropDatabase.txt @@ -18,52 +18,62 @@ Definition The :dbcommand:`dropDatabase` command drops the current database, deleting the associated data files. - The command has the following form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { dropDatabase: 1, writeConcern: , comment: } - - The command takes the following optional field: - - .. list-table:: - :header-rows: 1 - :widths: 20 80 - - * - Field - - Description - - * - ``writeConcern`` - - - Optional. A document expressing the :doc:`write concern - ` to use if greater than - :writeconcern:`"majority"` - - .. code-block:: javascript - - { w: , j: , wtimeout: } - - Omit to use the default/minimum write concern of - :writeconcern:`"majority"`. - - When issued on a replica set, if the specified write concern - results in fewer member acknowledgements than write concern - :writeconcern:`"majority"`, the operation uses - :writeconcern:`"majority"`. Otherwise, the specified write - concern is used. - - .. include:: /includes/extracts/mongos-operations-wc-drop-database.rst - - See also :ref:`Behavior `. - - * - ``comment`` - - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 - - :binary:`~bin.mongosh` also provides the helper method - :method:`db.dropDatabase()`. +.. code-block:: javascript + + db.runCommand( + { + dropDatabase: 1, + writeConcern: , + comment: + } + ) + +Command Fields +-------------- + +The command takes the following optional fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Field + - Description + + * - ``writeConcern`` + - Optional. A document expressing the :doc:`write concern + ` to use if greater than + :writeconcern:`"majority"` + + .. code-block:: javascript + + { w: , j: , wtimeout: } + + Omit to use the default/minimum write concern of + :writeconcern:`"majority"`. + + When issued on a replica set, if the specified write concern + results in fewer member acknowledgements than write concern + :writeconcern:`"majority"`, the operation uses + :writeconcern:`"majority"`. Otherwise, the specified write + concern is used. + + .. include:: /includes/extracts/mongos-operations-wc-drop-database.rst + + See also :ref:`Behavior `. + + * - ``comment`` + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + +:binary:`~bin.mongosh` also provides the helper method +:method:`db.dropDatabase()`. Behavior -------- diff --git a/source/reference/command/dropIndexes.txt b/source/reference/command/dropIndexes.txt index eab58c8059c..7e790b85e62 100644 --- a/source/reference/command/dropIndexes.txt +++ b/source/reference/command/dropIndexes.txt @@ -10,6 +10,9 @@ dropIndexes :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: dropIndexes .. versionchanged:: 6.0 @@ -18,62 +21,69 @@ dropIndexes (except the index on the ``_id`` field and the last remaining shard key index, if one exists) from the specified collection. - The command has the following form: - - .. code-block:: javascript - - { dropIndexes: , index: , writeConcern: , comment: } - - The command takes the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 10 20 70 - - * - Field - - Type - - Description - - * - dropIndexes - - String - - The name of the collection whose indexes to drop. - - * - index - - - string or document or array of strings +Syntax +------ - - The index or indexes to drop. - - - To drop all indexes except the ``_id`` index and the last - remaining shard key index from the collection if one - exists, specify ``"*"``. - - - To drop a single index, specify either the index name, - the index specification document (unless the index is a - :doc:`text ` index), or an array of the - index name. To drop a :doc:`text ` index, - specify the index names instead of the index specification - document. If this index is the last remaining shard key - index, ``dropIndexes`` raises an error. +The command has the following syntax: - - To drop multiple indexes (Available starting in MongoDB - 4.2), specify an array of the index names. - - * - writeConcern - - document - - - Optional. A document expressing the :doc:`write concern - ` of the :dbcommand:`drop` command. - Omit to use the default write concern. - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 - +.. code-block:: javascript + + db.runCommand( + { + dropIndexes: , + index: , + writeConcern: , comment: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 10 20 70 + + * - Field + - Type + - Description + + * - dropIndexes + - String + - The name of the collection whose indexes to drop. + + * - index + - string or document or array of strings + - The index or indexes to drop. + + - To drop all indexes except the ``_id`` index and the last + remaining shard key index from the collection if one + exists, specify ``"*"``. + + - To drop a single index, specify either the index name, + the index specification document (unless the index is a + :doc:`text ` index), or an array of the + index name. To drop a :doc:`text ` index, + specify the index names instead of the index specification + document. If this index is the last remaining shard key + index, ``dropIndexes`` raises an error. + + - To drop multiple indexes (Available starting in MongoDB + 4.2), specify an array of the index names. + + * - writeConcern + - document + - Optional. A document expressing the :doc:`write concern + ` of the :dbcommand:`drop` command. + Omit to use the default write concern. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Behavior -------- diff --git a/source/reference/command/dropRole.txt b/source/reference/command/dropRole.txt index 195be10be44..146a629fc49 100644 --- a/source/reference/command/dropRole.txt +++ b/source/reference/command/dropRole.txt @@ -18,38 +18,49 @@ Definition Deletes a :ref:`user-defined ` role from the database on which you run the command. - The :dbcommand:`dropRole` command uses the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: +.. code-block:: javascript + + db.runCommand( { dropRole: "", writeConcern: { }, comment: } + ) - The :dbcommand:`dropRole` command has the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``dropRole`` - - string - - The name of the :ref:`user-defined role ` to remove - from the database. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 - +Command Fields +-------------- + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``dropRole`` + - string + - The name of the :ref:`user-defined role ` to remove + from the database. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Required Access --------------- diff --git a/source/reference/command/dropUser.txt b/source/reference/command/dropUser.txt index 4bcc2a93afb..6910a0d7d19 100644 --- a/source/reference/command/dropUser.txt +++ b/source/reference/command/dropUser.txt @@ -15,44 +15,53 @@ Definition .. dbcommand:: dropUser - Removes the user from the database on which you run the command. The - :dbcommand:`dropUser` command has the following syntax: + Removes the user from the database on which you run the command. - .. code-block:: javascript +Syntax +------ +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( { dropUser: "", writeConcern: { }, comment: } - - The :dbcommand:`dropUser` command document has the following - fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``dropUser`` - - string - - The name of the user to delete. You must issue the - :dbcommand:`dropUser` command while using the database where the - user exists. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 - - - .. include:: /includes/check-before-dropping-useradmin.rst + ) + +Command Fields +-------------- + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``dropUser`` + - string + - The name of the user to delete. You must issue the + :dbcommand:`dropUser` command while using the database where the + user exists. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + +.. include:: /includes/check-before-dropping-useradmin.rst Required Access --------------- diff --git a/source/reference/command/enableSharding.txt b/source/reference/command/enableSharding.txt index eb2d9e50116..f63f109a3a8 100644 --- a/source/reference/command/enableSharding.txt +++ b/source/reference/command/enableSharding.txt @@ -30,15 +30,17 @@ Definition Syntax ------ -The :dbcommand:`enableSharding` command has the following syntax: +The command has the following syntax: - *Recommended*. Specify the database to create: .. code-block:: javascript - db.adminCommand( { - enableSharding: "" - } ) + db.adminCommand( + { + enableSharding: "" + } + ) - Optionally, starting in MongoDB 4.2.2 (and 4.0.14), you can include the primary shard specification in the command, although this @@ -46,16 +48,18 @@ The :dbcommand:`enableSharding` command has the following syntax: .. code-block:: javascript - db.adminCommand( { - enableSharding: "", - primaryShard: "" // Available starting in MongoDB 4.2.2 (and 4.0.14) - } ) + db.adminCommand( + { + enableSharding: "", + primaryShard: "" // Available starting in MongoDB 4.2.2 (and 4.0.14) + } + ) You can only run the :dbcommand:`enableSharding` command on the ``admin`` database from a :binary:`~bin.mongos` instance. -Fields -~~~~~~ +Command Fields +-------------- The command takes the following fields: @@ -68,18 +72,14 @@ The command takes the following fields: - Description * - :ref:`enableSharding ` - - String - - .. _cmd-enableSharding-db: The database you want to use. The database is created if it does not exist. * - :ref:`primaryShard ` - - String - - .. _cmd-enableSharding-primaryShard: Optional. The :ref:`primary shard ` for the diff --git a/source/reference/command/endSessions.txt b/source/reference/command/endSessions.txt index 59b3e9695a1..17302425757 100644 --- a/source/reference/command/endSessions.txt +++ b/source/reference/command/endSessions.txt @@ -19,19 +19,30 @@ Definition The command overrides the timeout period that sessions wait before expiring. - :dbcommand:`endSessions` has the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { endSessions: [ { id : }, ... ] } ) +.. code-block:: javascript - .. include:: /includes/fact-dbcommand.rst + db.runCommand( + { + endSessions: [ { id : }, ... ] + } + ) - .. |command| replace:: :dbcommand:`endSessions` +.. include:: /includes/fact-dbcommand.rst - .. code-block:: javascript +.. |command| replace:: :dbcommand:`endSessions` - db.runCommand( { endSessions: [ { id : }, ... ] } ) +.. code-block:: javascript + + db.runCommand( + { + endSessions: [ { id : }, ... ] + } + ) Behavior -------- diff --git a/source/reference/command/explain.txt b/source/reference/command/explain.txt index 42e336856e5..01b99968be3 100644 --- a/source/reference/command/explain.txt +++ b/source/reference/command/explain.txt @@ -25,68 +25,65 @@ Definition preferred method for running :dbcommand:`explain` is to use the :method:`db.collection.explain()` and :method:`cursor.explain()` helpers. - The :dbcommand:`explain` command has the following syntax: +Syntax +------ + +The command has the following syntax: - .. code-block:: javascript +.. code-block:: javascript + db.runCommand( { - explain: , - verbosity: , - comment: + explain: , + verbosity: , + comment: } + ) - The command takes the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``explain`` - - - document - - - A document specifying the command for which to return the execution - information. For details on the specific command document, see :dbcommand:`aggregate`, :dbcommand:`count`, - :dbcommand:`distinct`, :dbcommand:`find`, - :dbcommand:`findAndModify`, :dbcommand:`delete`, :dbcommand:`mapReduce`, and :dbcommand:`update`. - - - * - ``verbosity`` - - - string - - - Optional. A string specifying the mode in which to run :dbcommand:`explain`. - The mode affects the behavior of :dbcommand:`explain` and determines - the amount of information to return. - - The possible modes are: - - - ``"queryPlanner"`` - - ``"executionStats"`` - - ``"allPlansExecution"`` (Default) - - For more information on the modes, see :ref:`explain behavior - `. - +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``explain`` + - document + - A document specifying the command for which to return the execution + information. For details on the specific command document, see :dbcommand:`aggregate`, :dbcommand:`count`, + :dbcommand:`distinct`, :dbcommand:`find`, + :dbcommand:`findAndModify`, :dbcommand:`delete`, :dbcommand:`mapReduce`, and :dbcommand:`update`. + + * - ``verbosity`` + - string + - Optional. A string specifying the mode in which to run :dbcommand:`explain`. + The mode affects the behavior of :dbcommand:`explain` and determines + the amount of information to return. + + The possible modes are: - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst + - ``"queryPlanner"`` + - ``"executionStats"`` + - ``"allPlansExecution"`` (Default) - .. note:: - - If you specify ``explain`` without a ``comment``, it inherits - any ``comment`` in the command specified to ``explain``. - + For more information on the modes, see :ref:`explain behavior + `. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. note:: + + If you specify ``explain`` without a ``comment``, it inherits + any ``comment`` in the command specified to ``explain``. + .. _explain-command-behavior: Behavior diff --git a/source/reference/command/filemd5.txt b/source/reference/command/filemd5.txt index b8da1f9108f..e9f7c80f86e 100644 --- a/source/reference/command/filemd5.txt +++ b/source/reference/command/filemd5.txt @@ -10,19 +10,32 @@ filemd5 :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: filemd5 The :dbcommand:`filemd5` command returns the :term:`md5` hash for a single file stored using the :term:`GridFS` specification. Client libraries use this command to verify that files are correctly written to MongoDB. The command takes the ``files_id`` of the file in question and the - name of the GridFS root collection as arguments. For example: + name of the GridFS root collection as arguments. + +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { filemd5: ObjectId("4f1f10e37671b50e4ecd2776"), root: "fs" } +.. code-block:: javascript + + db.runCommand( + { + filemd5: ObjectId("4f1f10e37671b50e4ecd2776"), + root: "fs" + } + ) - .. read-lock +.. read-lock - MongoDB computes the ``filemd5`` using all data in the GridFS file object - pulled sequentially from each chunk in the ``chunks`` collection. +MongoDB computes the ``filemd5`` using all data in the GridFS file object +pulled sequentially from each chunk in the ``chunks`` collection. diff --git a/source/reference/command/find.txt b/source/reference/command/find.txt index 7fd9d5905bd..aca97b5ee8a 100644 --- a/source/reference/command/find.txt +++ b/source/reference/command/find.txt @@ -44,30 +44,30 @@ The :dbcommand:`find` command has the following syntax: db.runCommand( { - "find": , - "filter": , - "sort": , - "projection": , - "hint": , - "skip": , - "limit": , - "batchSize": , - "singleBatch": , - "comment": , - "maxTimeMS": , - "readConcern": , - "max": , - "min": , - "returnKey": , - "showRecordId": , - "tailable": , - "oplogReplay": , - "noCursorTimeout": , - "awaitData": , - "allowPartialResults": , - "collation": , - "allowDiskUse" : , - "let": // Added in MongoDB 5.0 + find: , + filter: , + sort: , + projection: , + hint: , + skip: , + limit: , + batchSize: , + singleBatch: , + comment: , + maxTimeMS: , + readConcern: , + max: , + min: , + returnKey: , + showRecordId: , + tailable: , + oplogReplay: , + noCursorTimeout: , + awaitData: , + allowPartialResults: , + collation: , + allowDiskUse : , + let: // Added in MongoDB 5.0 } ) @@ -84,42 +84,26 @@ The command accepts the following fields: :widths: 20 20 80 * - Field - - Type - - Description * - ``find`` - - string - - The name of the collection or :doc:`view ` to query. - - * - ``filter`` - - document - - Optional. The query predicate. If unspecified, then all documents in the collection will match the predicate. - - * - .. _find-cmd-sort: :ref:`sort ` - - document - - Optional. The sort specification for the ordering of the results. - - * - ``projection`` - - document - - Optional. The :ref:`projection specification ` to determine which fields to include in the returned documents. See :ref:`find-projection` and :doc:`/reference/operator/projection`. @@ -127,9 +111,7 @@ The command accepts the following fields: .. include:: /includes/extracts/views-unsupported-projection-operators.rst * - ``hint`` - - string or document - - Optional. Index specification. Specify either the index name as a string or the index key pattern. If specified, then the query system will only consider plans using the hinted index. @@ -140,51 +122,32 @@ The command accepts the following fields: the ``filter`` is an equality condition on the ``_id`` field ``{ _id: }``. - - * - ``skip`` - - Positive integer - - Optional. Number of documents to skip. Defaults to 0. - - * - ``limit`` - - Non-negative integer - - Optional. The maximum number of documents to return. If unspecified, then defaults to no limit. A limit of 0 is equivalent to setting no limit. - - * - ``batchSize`` - - non-negative integer - - Optional. The number of documents to return in the first batch. Defaults to 101. A batchSize of 0 means that the cursor will be established, but no documents will be returned in the first batch. Unlike the previous wire protocol version, a batchSize of 1 for the :dbcommand:`find` command does not close the cursor. - - * - ``singleBatch`` - - boolean - - Optional. Determines whether to close the cursor after the first batch. Defaults to false. - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst .. note:: @@ -196,21 +159,15 @@ The command accepts the following fields: *Changed in version 4.4.* Prior to 4.4, comments could only be strings. * - ``maxTimeMS`` - - positive integer - - Optional. The cumulative time limit in milliseconds for processing operations on the cursor. MongoDB aborts the operation at the earliest following :term:`interrupt point`. .. include:: /includes/extracts/maxTimeMS-readConcern.rst - - * - ``readConcern`` - - document - - Optional. Specifies the :term:`read concern`. .. include:: /includes/fact-readConcern-syntax.rst @@ -220,12 +177,8 @@ The command accepts the following fields: The :dbcommand:`getMore` command uses the ``readConcern`` level specified in the originating ``find`` command. - - * - ``max`` - - document - - Optional. The *exclusive* upper bound for a specific index. See :method:`cursor.max()` for details. @@ -233,12 +186,8 @@ The command accepts the following fields: also use ``hint`` unless the specified ``filter`` is an equality condition on the ``_id`` field ``{ _id: }``. - - * - ``min`` - - document - - Optional. The *inclusive* lower bound for a specific index. See :method:`cursor.min()` for details. @@ -246,50 +195,30 @@ The command accepts the following fields: also use ``hint`` unless the specified ``filter`` is an equality condition on the ``_id`` field ``{ _id: }``. - - * - ``returnKey`` - - boolean - - Optional. If true, returns only the index keys in the resulting documents. Default value is false. If returnKey is true and the :dbcommand:`find` command does not use an index, the returned documents will be empty. - - * - ``showRecordId`` - - boolean - - Optional. Determines whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents. - - * - ``tailable`` - - boolean - - Optional. Returns a :term:`tailable cursor` for a capped collections. - - * - ``awaitData`` - - boolean - - Optional. Use in conjunction with the tailable option to block a :dbcommand:`getMore` command on the cursor temporarily if at the end of data rather than returning no data. After a timeout period, :dbcommand:`find` returns as normal. - - * - ``oplogReplay`` - - boolean - - .. deprecated:: 4.4 Optional. An internal command for replaying a :ref:`replica set's oplog @@ -328,18 +257,12 @@ The command accepts the following fields: flag for backwards compatibility, but the flag has no effect. * - ``noCursorTimeout`` - - boolean - - Optional. Prevents the server from timing out idle cursors after an inactivity period (10 minutes). - - * - :ref:`allowPartialResults ` - - boolean - - .. _cmd-find-allowPartialResults: Optional. For queries against a sharded collection, allows the @@ -361,21 +284,16 @@ The command accepts the following fields: flag in the output. * - ``collation`` - - document - - Optional. .. include:: /includes/extracts/collation-option.rst - - * - .. _find-cmd-allowDiskUse: :ref:`allowDiskUse ` - boolean - - Optional. .. include:: /includes/fact-allowDiskUse-option-6.0.rst @@ -392,12 +310,8 @@ The command accepts the following fields: .. versionadded:: 4.4 - - * - :ref:`let ` - - document - - .. _find-let-syntax: Optional. diff --git a/source/reference/command/findAndModify.txt b/source/reference/command/findAndModify.txt index b4ddd48ce47..4e5504b3c7f 100644 --- a/source/reference/command/findAndModify.txt +++ b/source/reference/command/findAndModify.txt @@ -28,10 +28,14 @@ Definition .. versionchanged:: 5.0 - The command has the following syntax: +Syntax +------ - .. code-block:: none +The command has the following syntax: +.. code-block:: javascript + + db.runCommand( { findAndModify: , query: , @@ -48,228 +52,174 @@ Definition hint: , comment: , let: // Added in MongoDB 5.0 - } - - The :dbcommand:`findAndModify` command takes the following - fields: - - .. |operation| replace:: :dbcommand:`findAndModify` - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``query`` - - - document - - - Optional. The selection criteria for the modification. The ``query`` field - employs the same :ref:`query selectors ` as used in - the :method:`db.collection.find()` method. Although the query may - match multiple documents, |operation| - **will only select one document to modify**. - - If unspecified, defaults to an empty document. - - Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation - errors if the query argument is not a document. - - - - * - .. _findandmodify-command-consistent-sorting: - - ``sort`` - - - document - - - Optional. Determines which document the operation modifies if the query selects - multiple documents. |operation| modifies - the first document in the sort order specified by this argument. - - Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation - errors if the sort argument is not a document. - - .. include:: /includes/fact-sort-consistency.rst - - See :ref:`sort-cursor-consistent-sorting` for more information. - - - - * - ``remove`` - - - boolean - - - Must specify either the ``remove`` or the ``update`` field. Removes - the document specified in the ``query`` field. Set this to ``true`` - to remove the selected document . The default is ``false``. - - - - * - ``update`` - - - document or array - - - Must specify either the ``remove`` or the ``update`` field. Performs - an update of the selected document. - - - If passed a document with :ref:`update operator expressions - `, |operation| performs the specified - modification. - - - If passed a replacement document ``{ : , ...}``, - the |operation| performs a replacement. - - - Starting in MongoDB 4.2, if passed an :doc:`aggregation pipeline - ` ``[ , , ... ]``, - |operation| modifies the document per the pipeline. The pipeline - can consist of the following stages: - - .. include:: /includes/list-update-agg-stages.rst - - - - * - ``new`` - - - boolean - - - Optional. When ``true``, returns the modified document rather than the original. - The |operation| method ignores the - ``new`` option for ``remove`` operations. The default is ``false``. - - - - * - ``fields`` - - - document - - - Optional. A subset of fields to return. The ``fields`` document specifies an - inclusion of a field with ``1``, as in: ``fields: { : 1, - : 1, ... }``. See :ref:`find-projection`. - - Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation - errors if the fields argument is not a document. - - - - * - ``upsert`` - - - boolean - - - .. include:: /includes/extracts/findAndModify-behavior-command.rst - - - - * - ``bypassDocumentValidation`` - - - boolean - - - Optional. Enables :dbcommand:`findAndModify` to bypass document validation - during the operation. This lets you update documents that do not - meet the validation requirements. - - - - * - ``writeConcern`` - - - document - - - Optional. A document expressing the :doc:`write concern `. - Omit to use the default write concern. - - .. include:: /includes/extracts/transactions-operations-write-concern.rst - - - - * - ``maxTimeMS`` - - - integer - - - Optional. Specifies a time limit in milliseconds for processing the operation. - - - - * - ``findAndModify`` - - - string - - - The collection against which to run the command. - - - - * - ``collation`` - - - document - - - Optional. - - .. include:: /includes/extracts/collation-option.rst - - - - * - ``arrayFilters`` - - - array - - - Optional. An array of filter documents that determine which array elements to - modify for an update operation on an array field. - - .. include:: /includes/extracts/arrayFilters-details.rst - - - For examples, see :ref:`findAndModify-command-arrayFilters`. - - .. note:: - - .. include:: /includes/extracts/arrayFilters-update-aggregation-restriction.rst - - * - ``hint`` - - - document or string - - - Optional. A document or string that specifies the - :doc:`index ` to use to support the ``query``. - - The option can take an index specification document or the - index name string. - - If you specify an index that does not exist, the operation - errors. + } + ) - For an example, see :ref:`ex-findAndModify-hint`. +Command Fields +-------------- - .. versionadded:: 4.4 +The command takes the following fields: - * - ``comment`` +.. |operation| replace:: :dbcommand:`findAndModify` - - any - - .. include:: /includes/extracts/comment-content.rst +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``query`` + - document + - Optional. The selection criteria for the modification. The ``query`` field + employs the same :ref:`query selectors ` as used in + the :method:`db.collection.find()` method. Although the query may + match multiple documents, |operation| + **will only select one document to modify**. - .. versionadded:: 4.4 - - * - :ref:`let ` - - - document - - - .. _findAndModify-let-syntax: - - Optional. - - .. include:: /includes/let-variables-syntax.rst - - .. include:: /includes/let-variables-syntax-note.rst - - For a complete example using ``let`` and variables, - see :ref:`findAndModify-let-example`. - - .. versionadded:: 5.0 + If unspecified, defaults to an empty document. + + Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation + errors if the query argument is not a document. + + * - .. _findandmodify-command-consistent-sorting: + + ``sort`` + + - document + - Optional. Determines which document the operation modifies if the query selects + multiple documents. |operation| modifies + the first document in the sort order specified by this argument. + + Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation + errors if the sort argument is not a document. + + .. include:: /includes/fact-sort-consistency.rst + + See :ref:`sort-cursor-consistent-sorting` for more information. + + * - ``remove`` + - boolean + - Must specify either the ``remove`` or the ``update`` field. Removes + the document specified in the ``query`` field. Set this to ``true`` + to remove the selected document . The default is ``false``. + + * - ``update`` + - document or array + - Must specify either the ``remove`` or the ``update`` field. Performs + an update of the selected document. + + - If passed a document with :ref:`update operator expressions + `, |operation| performs the specified + modification. + + - If passed a replacement document ``{ : , ...}``, + the |operation| performs a replacement. + + - Starting in MongoDB 4.2, if passed an :doc:`aggregation pipeline + ` ``[ , , ... ]``, + |operation| modifies the document per the pipeline. The pipeline + can consist of the following stages: + + .. include:: /includes/list-update-agg-stages.rst + + * - ``new`` + - boolean + - Optional. When ``true``, returns the modified document rather than the original. + The |operation| method ignores the + ``new`` option for ``remove`` operations. The default is ``false``. + + * - ``fields`` + - document + - Optional. A subset of fields to return. The ``fields`` document specifies an + inclusion of a field with ``1``, as in: ``fields: { : 1, + : 1, ... }``. See :ref:`find-projection`. + + Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation + errors if the fields argument is not a document. + + * - ``upsert`` + - boolean + - .. include:: /includes/extracts/findAndModify-behavior-command.rst + + * - ``bypassDocumentValidation`` + - boolean + - Optional. Enables :dbcommand:`findAndModify` to bypass document validation + during the operation. This lets you update documents that do not + meet the validation requirements. + + * - ``writeConcern`` + - document + - Optional. A document expressing the :doc:`write concern `. + Omit to use the default write concern. + + .. include:: /includes/extracts/transactions-operations-write-concern.rst + + * - ``maxTimeMS`` + - integer + - Optional. Specifies a time limit in milliseconds for processing the operation. + + * - ``findAndModify`` + - string + - The collection against which to run the command. + + * - ``collation`` + - document + - Optional. + + .. include:: /includes/extracts/collation-option.rst + + * - ``arrayFilters`` + - array + - Optional. An array of filter documents that determine which array elements to + modify for an update operation on an array field. + + .. include:: /includes/extracts/arrayFilters-details.rst + + + For examples, see :ref:`findAndModify-command-arrayFilters`. + + .. note:: + + .. include:: /includes/extracts/arrayFilters-update-aggregation-restriction.rst + + * - ``hint`` + - document or string + - Optional. A document or string that specifies the + :doc:`index ` to use to support the ``query``. + + The option can take an index specification document or the + index name string. + + If you specify an index that does not exist, the operation + errors. + + For an example, see :ref:`ex-findAndModify-hint`. + + .. versionadded:: 4.4 + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + + * - :ref:`let ` + - document + - .. _findAndModify-let-syntax: + + Optional. + + .. include:: /includes/let-variables-syntax.rst + + .. include:: /includes/let-variables-syntax-note.rst + + For a complete example using ``let`` and variables, + see :ref:`findAndModify-let-example`. + + .. versionadded:: 5.0 Output ------ @@ -283,39 +233,24 @@ following fields: :widths: 20 20 80 * - Field - - Type - - Description * - ``value`` - - document - - Contains the command's returned value. See :ref:`findandmodify-value-field` for details. - - * - ``lastErrorObject`` - - document - - Contains information about updated documents. See :ref:`findandmodify-lastErrorObject` for details. - - * - ``ok`` - - number - - Contains the command's execution status. ``1`` on success, or ``0`` if an error occurred. - - - .. _findandmodify-lastErrorObject: diff --git a/source/reference/command/flushRouterConfig.txt b/source/reference/command/flushRouterConfig.txt index 808d66dc9d5..a0badc7aca3 100644 --- a/source/reference/command/flushRouterConfig.txt +++ b/source/reference/command/flushRouterConfig.txt @@ -44,14 +44,22 @@ following syntax: .. code-block:: javascript - db.adminCommand({ flushRouterConfig: "" } ) + db.adminCommand( + { + flushRouterConfig: "" + } + ) - Flush the cache for a specified database and all of its collections when passed in a database namespace parameter: .. code-block:: javascript - db.adminCommand({ flushRouterConfig: "" } ) + db.adminCommand( + { + flushRouterConfig: "" + } + ) - Flush the cache for all databases and their collections when run without a parameter or passed in a non-string scalar value @@ -60,7 +68,11 @@ following syntax: .. code-block:: javascript db.adminCommand("flushRouterConfig") - db.adminCommand( { flushRouterConfig: 1 } ) + db.adminCommand( + { + flushRouterConfig: 1 + } + ) .. note:: @@ -72,7 +84,11 @@ following syntax: .. code-block:: javascript db.adminCommand("flushRouterConfig") - db.adminCommand( { flushRouterConfig: 1 } ) + db.adminCommand( + { + flushRouterConfig: 1 + } + ) .. _flushrouterconfig-considerations: diff --git a/source/reference/command/fsync.txt b/source/reference/command/fsync.txt index 5c762287599..e9b2a52435d 100644 --- a/source/reference/command/fsync.txt +++ b/source/reference/command/fsync.txt @@ -32,56 +32,56 @@ Definition interval, which is 60 seconds by default. Run :dbcommand:`fsync` when you want to flush writes to disk ahead of that interval. +Syntax +------ - The :dbcommand:`fsync` command has the following syntax: - - .. code-block:: javascript - - { fsync: 1, lock: , comment: } - - The :dbcommand:`fsync` command has the following fields: +The command has the following syntax: +.. code-block:: javascript - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``fsync`` - - - integer - - - Enter "1" to apply :dbcommand:`fsync`. - - * - ``lock`` - - - boolean - - - Optional. Takes a lock on the :binary:`~bin.mongod` instance and blocks all - write operations. Each :dbcommand:`fsync` with ``lock`` operation - takes a lock. - - - * - ``comment`` + db.runCommand( + { + fsync: 1, + lock: , + comment: + } + ) - - any +Command Fields +-------------- - - .. include:: /includes/extracts/comment-content.rst +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``fsync`` + - integer + - Enter "1" to apply :dbcommand:`fsync`. + + * - ``lock`` + - boolean + - Optional. Takes a lock on the :binary:`~bin.mongod` instance and blocks all + write operations. Each :dbcommand:`fsync` with ``lock`` operation + takes a lock. - .. versionadded:: 4.4 - + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + +To run the :dbcommand:`fsync` command, use the +:method:`db.adminCommand()` method: - To run the :dbcommand:`fsync` command, use the - :method:`db.adminCommand()` method: - - .. code-block:: javascript +.. code-block:: javascript - db.adminCommand( { fsync: 1, ... } ) + db.adminCommand( { fsync: 1, ... } ) Considerations -------------- diff --git a/source/reference/command/fsyncUnlock.txt b/source/reference/command/fsyncUnlock.txt index 0a34a51ef65..a0f95334aff 100644 --- a/source/reference/command/fsyncUnlock.txt +++ b/source/reference/command/fsyncUnlock.txt @@ -39,40 +39,49 @@ Definition you will use :dbcommand:`fsyncUnlock` following a database :doc:`backup operation `. - To run the :dbcommand:`fsyncUnlock` command, use the - :method:`db.adminCommand()` method: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - db.adminCommand( { fsyncUnlock: 1, comment: } ) - - The ``comment`` field is optional and may contain a comment of any data - type. - - The operation returns a document with the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 30 70 - - * - Field - - - Description - - * - ``info`` - - Information on the status of the operation - - * - ``lockCount`` (*New in version 3.4*) - - The number of locks remaining on the instance after the operation. - - * - ``ok`` - - The status code. - - .. tip:: - - :binary:`~bin.mongosh` provides the helper method - :method:`db.fsyncUnlock()`. +.. code-block:: javascript + db.adminCommand( + { + fsyncUnlock: 1, + comment: + } + ) + +The ``comment`` field is optional and may contain a comment of any data +type. + +Results +------- + +The operation returns a document with the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Field + - Description + + * - ``info`` + - Information on the status of the operation + + * - ``lockCount`` (*New in version 3.4*) + - The number of locks remaining on the instance after the operation. + + * - ``ok`` + - The status code. + +.. tip:: + + :binary:`~bin.mongosh` provides the helper method + :method:`db.fsyncUnlock()`. + Examples -------- diff --git a/source/reference/command/getAuditConfig.txt b/source/reference/command/getAuditConfig.txt index 6b4373f2ea3..fa5ed095952 100644 --- a/source/reference/command/getAuditConfig.txt +++ b/source/reference/command/getAuditConfig.txt @@ -21,13 +21,18 @@ Definition retrieves audit configurations from :binary:`~bin.mongod` and :binary:`~bin.mongos` server instances. - Use the - :method:`db.adminCommand( { command } )` method - to run :dbcommand:`getAuditConfig` against the ``admin`` database. +Syntax +------ - .. code-block:: javascript +The command has the following syntax: + +.. code-block:: javascript - db.adminCommand( { getAuditConfig: 1 } ) + db.adminCommand( + { + getAuditConfig: 1 + } + ) Behavior -------- diff --git a/source/reference/command/getClusterParameter.txt b/source/reference/command/getClusterParameter.txt index a3ad7b6550d..75463099637 100644 --- a/source/reference/command/getClusterParameter.txt +++ b/source/reference/command/getClusterParameter.txt @@ -10,6 +10,9 @@ getClusterParameter :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: getClusterParameter :dbcommand:`getClusterParameter` is an administrative command for @@ -19,40 +22,43 @@ getClusterParameter To run ``getClusterParameter``, use the ``db.adminCommand( { command } )`` method. - Syntax - ------ +Syntax +------ - The ``getClusterParameter`` command has the following syntax: - - .. code-block:: javascript - - { getClusterParameter: | [, ] | "'*'" } - - The command takes the following fields: +The command has the following syntax: - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ```` - - - String or array of strings +.. code-block:: javascript - - You can specify one of the following: - - - The name of the parameter you want to retrieve. - - - An array with the names of multiple parameters. - - - ``'*'``, to return values for all parameters available to - ``getClusterParameter``. - + db.adminCommand( + { + getClusterParameter: | [, ] | "'*'" + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ```` + - String or array of strings + - You can specify one of the following: + + - The name of the parameter you want to retrieve. + + - An array with the names of multiple parameters. + + - ``'*'``, to return values for all parameters available to + ``getClusterParameter``. + Behavior -------- diff --git a/source/reference/command/getCmdLineOpts.txt b/source/reference/command/getCmdLineOpts.txt index da1590478e7..2af853f1a6e 100644 --- a/source/reference/command/getCmdLineOpts.txt +++ b/source/reference/command/getCmdLineOpts.txt @@ -10,6 +10,9 @@ getCmdLineOpts :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: getCmdLineOpts The :dbcommand:`getCmdLineOpts` command returns a document @@ -17,46 +20,58 @@ getCmdLineOpts :binary:`~bin.mongod` or :binary:`~bin.mongos`. Run :dbcommand:`getCmdLineOpts` in the ``admin`` database. - .. code-block:: javascript - - db.adminCommand( { getCmdLineOpts: 1 } ) - - This command returns a document with two fields, ``argv`` and - ``parsed``. The ``argv`` field contains an array with each item from - the command string used to invoke :binary:`~bin.mongod` or - :binary:`~bin.mongos`. The document in the ``parsed`` field includes all - runtime options, including those parsed from the command line and - those specified in the configuration file, if specified. - - Consider the following example output of - :dbcommand:`getCmdLineOpts`: - - .. code-block:: javascript - - { - "argv" : [ - "/usr/bin/mongod", - "--config", - "/etc/mongod.conf" - ], - "parsed" : { - "config" : "/etc/mongod.conf", - "net" : { - "bindIp" : "127.0.0.1", - "port" : 27017 - }, - "processManagement" : { - "fork" : true - }, - "storage" : { - "dbPath" : "/data/db" - }, - "systemLog" : { - "destination" : "file", - "logAppend" : true, - "path" : "/var/log/mongodb/mongod.log" - } - }, - "ok" : 1 - } +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript + + db.adminCommand( + { + getCmdLineOpts: 1 + } + ) + +Output +------ +This command returns a document with two fields, ``argv`` and +``parsed``. The ``argv`` field contains an array with each item from +the command string used to invoke :binary:`~bin.mongod` or +:binary:`~bin.mongos`. The document in the ``parsed`` field includes all +runtime options, including those parsed from the command line and +those specified in the configuration file, if specified. + +Consider the following example output of +:dbcommand:`getCmdLineOpts`: + +.. code-block:: javascript + + { + "argv" : [ + "/usr/bin/mongod", + "--config", + "/etc/mongod.conf" + ], + "parsed" : { + "config" : "/etc/mongod.conf", + "net" : { + "bindIp" : "127.0.0.1", + "port" : 27017 + }, + "processManagement" : { + "fork" : true + }, + "storage" : { + "dbPath" : "/data/db" + }, + "systemLog" : { + "destination" : "file", + "logAppend" : true, + "path" : "/var/log/mongodb/mongod.log" + } + }, + "ok" : 1 + } + diff --git a/source/reference/command/getDefaultRWConcern.txt b/source/reference/command/getDefaultRWConcern.txt index 1f256701c02..baa16680e53 100644 --- a/source/reference/command/getDefaultRWConcern.txt +++ b/source/reference/command/getDefaultRWConcern.txt @@ -23,139 +23,128 @@ Definition - For sharded clusters, issue the :dbcommand:`getDefaultRWConcern` on a :binary:`~bin.mongos`. - :dbcommand:`getDefaultRWConcern` must be run against the ``admin`` - database. :dbcommand:`getDefaultRWConcern` has the following form: +Syntax +------ - .. code-block:: javascript +The command has the following form: - db.adminCommand( { getDefaultRWConcern : 1 , inMemory: , comment: } ) - - :dbcommand:`getDefaultRWConcern` has the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - :ref:`getDefaultRWConcern ` - - - int - - - .. _getDefaultRWConcern-cmd-getDefaultRWConcern: - - Set to ``1``. - - * - :ref:`inMemory ` - - - boolean - - - .. _getDefaultRWConcern-cmd-inMemory: - - Optional. - - Set to ``true`` to return the in-memory cached copy of the - global default read or write concern settings. The instance - uses the in-memory copy when applying the global defaults - to an operation. - - Set to ``false`` to return the on-disk copy of the - deployment's global default read or write concern. Defaults to - ``false``. - - * - ``comment`` - - - any +.. code-block:: javascript - - .. include:: /includes/extracts/comment-content.rst + db.adminCommand( + { + getDefaultRWConcern: 1 , + inMemory: , + comment: + } + ) + +Command Fields +-------------- + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - :ref:`getDefaultRWConcern ` + - int + - .. _getDefaultRWConcern-cmd-getDefaultRWConcern: + + Set to ``1``. + + * - :ref:`inMemory ` + - boolean + - .. _getDefaultRWConcern-cmd-inMemory: + + Optional. - .. versionadded:: 4.4 - - :dbcommand:`getDefaultRWConcern` output includes the following - fields. - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - :ref:`defaultWriteConcern ` - - - ``object`` - - - .. _getDefaultRWConcern-cmd-defaultWriteConcern: - - The global default :ref:`write concern ` - configuration. If this field is absent, the deployment has no - global default write concern settings. - - * - :ref:`defaultReadConcern ` - - - ``object`` - - - .. _getDefaultRWConcern-cmd-defaultReadConcern: - - The global default :ref:`read concern ` - configuration. If this field is absent, the deployment has no - global default read concern settings. - - * - :ref:`defaultWriteConcernSource ` - - - String - - - .. _getDefaultRWConcern-cmd-defaultWriteConcernSource: - - .. include:: /includes/fact-defaultWriteConcernSource-possible-values.rst - - * - :ref:`defaultReadConcernSource ` - - - String - - - .. _getDefaultRWConcern-cmd-defaultReadConcernSource: - - .. include:: /includes/fact-defaultReadConcernSource-possible-values.rst - - * - :ref:`updateOpTime ` - - - Timestamp - - - .. _getDefaultRWConcern-cmd-updateOpTime: - - The operation timestamp of when any global default read or - write concern setting was last modified. Present if a default - has ever been set for the cluster. - - * - :ref:`updateWallClockTime ` - - - Date - - - .. _getDefaultRWConcern-cmd-updateWallClockTime: - - The wall clock date when an administrator last set the global - default read or write concern. This value is informational and - should not be used for any recency comparisons. - - * - :ref:`localUpdateWallClockTime ` - - - Date - - - .. _getDefaultRWConcern-cmd-localUpdateWallClockTime: - - The wall clock date when the :binary:`~bin.mongod` or - :binary:`~bin.mongos` last updated its local copy of the - global default read and write concern settings. This value is - informational and should not be used for any recency - comparisons. - + Set to ``true`` to return the in-memory cached copy of the + global default read or write concern settings. The instance + uses the in-memory copy when applying the global defaults + to an operation. + + Set to ``false`` to return the on-disk copy of the + deployment's global default read or write concern. Defaults to + ``false``. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + +Output +------ + +The output includes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - :ref:`defaultWriteConcern ` + - ``object`` + - .. _getDefaultRWConcern-cmd-defaultWriteConcern: + + The global default :ref:`write concern ` + configuration. If this field is absent, the deployment has no + global default write concern settings. + + * - :ref:`defaultReadConcern ` + - ``object`` + - .. _getDefaultRWConcern-cmd-defaultReadConcern: + + The global default :ref:`read concern ` + configuration. If this field is absent, the deployment has no + global default read concern settings. + + * - :ref:`defaultWriteConcernSource ` + - String + - .. _getDefaultRWConcern-cmd-defaultWriteConcernSource: + + .. include:: /includes/fact-defaultWriteConcernSource-possible-values.rst + + * - :ref:`defaultReadConcernSource ` + - String + - .. _getDefaultRWConcern-cmd-defaultReadConcernSource: + + .. include:: /includes/fact-defaultReadConcernSource-possible-values.rst + + * - :ref:`updateOpTime ` + - Timestamp + - .. _getDefaultRWConcern-cmd-updateOpTime: + + The operation timestamp of when any global default read or + write concern setting was last modified. Present if a default + has ever been set for the cluster. + + * - :ref:`updateWallClockTime ` + - Date + - .. _getDefaultRWConcern-cmd-updateWallClockTime: + + The wall clock date when an administrator last set the global + default read or write concern. This value is informational and + should not be used for any recency comparisons. + + * - :ref:`localUpdateWallClockTime ` + - Date + - .. _getDefaultRWConcern-cmd-localUpdateWallClockTime: + + The wall clock date when the :binary:`~bin.mongod` or + :binary:`~bin.mongos` last updated its local copy of the + global default read and write concern settings. This value is + informational and should not be used for any recency + comparisons. + .. seealso:: :dbcommand:`setDefaultRWConcern` diff --git a/source/reference/command/getFreeMonitoringStatus.txt b/source/reference/command/getFreeMonitoringStatus.txt index 61d895f5e96..6975fd3ef8a 100644 --- a/source/reference/command/getFreeMonitoringStatus.txt +++ b/source/reference/command/getFreeMonitoringStatus.txt @@ -10,6 +10,9 @@ getFreeMonitoringStatus :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: getFreeMonitoringStatus .. versionadded:: 4.0 @@ -18,14 +21,21 @@ getFreeMonitoringStatus ` is enabled for standalone or replica sets (including shards). - The command is run against the ``admin`` database and has the form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - db.adminCommand( { getFreeMonitoringStatus: 1 } ) +.. code-block:: javascript - :binary:`~bin.mongosh` provides the - :method:`db.getFreeMonitoringStatus()` helper for the command. + db.adminCommand( + { + getFreeMonitoringStatus: 1 + } + ) + +:binary:`~bin.mongosh` provides the +:method:`db.getFreeMonitoringStatus()` helper for the command. Access Control -------------- @@ -55,16 +65,13 @@ The command returns a document with the following fields: - Description * - ``state`` - - The free monitoring enablement state. Values are either: ``"enabled"`` or ``"disabled"``. * - ``message`` - - Any informational message related to your state. * - ``url`` - - The unique URL at which your monitoring data can be accessed. .. note:: @@ -77,10 +84,8 @@ The command returns a document with the following fields: collected less than 24 hours ago. * - ``userReminder`` - - Any informational message related to your state. - * - ``ok`` ``operationTime`` ``$clusterTime`` diff --git a/source/reference/command/getLog.txt b/source/reference/command/getLog.txt index f340cb71180..087f3f66e89 100644 --- a/source/reference/command/getLog.txt +++ b/source/reference/command/getLog.txt @@ -10,6 +10,9 @@ getLog :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: getLog :dbcommand:`getLog` is an administrative command that returns the most @@ -26,14 +29,18 @@ getLog Syntax ------ -The :dbcommand:`getLog` command has the following syntax: +The command has the following syntax: .. code-block:: javascript - db.adminCommand( { getLog: } ) + db.adminCommand( + { + getLog: + } + ) Command Fields -~~~~~~~~~~~~~~ +-------------- The possible values for :dbcommand:`getLog` are: @@ -45,16 +52,13 @@ The possible values for :dbcommand:`getLog` are: - Description * - ``*`` - - Returns a list of the available values to the :dbcommand:`getLog` command. * - ``global`` - - Returns the combined output of all recent log entries. * - ``startupWarnings`` - - Returns log entries that *may* contain errors or warnings from MongoDB's log from when the current process started. If :binary:`~bin.mongod` started without warnings, this filter @@ -71,7 +75,7 @@ The possible values for :dbcommand:`getLog` are: parsing examples that filter on the component field. Output -~~~~~~ +------ If specified ``*``, then the command returns a document with the names of the other acceptable values. diff --git a/source/reference/command/getMore.txt b/source/reference/command/getMore.txt index 71f124cbc46..c1b18af014b 100644 --- a/source/reference/command/getMore.txt +++ b/source/reference/command/getMore.txt @@ -22,22 +22,22 @@ Definition Syntax ------ -The :dbcommand:`getMore` command has the following form: +The command has the following syntax: .. code-block:: javascript db.runCommand( { - "getMore": , - "collection": , - "batchSize": , - "maxTimeMS": , - "comment": + getMore: , + collection: , + batchSize: , + maxTimeMS: , + comment: } ) Command Fields -~~~~~~~~~~~~~~ +-------------- The command accepts the following fields: @@ -46,39 +46,23 @@ The command accepts the following fields: :widths: 20 20 80 * - Field - - Type - - Description * - ``getMore`` - - long - - The cursor id. - - * - ``collection`` - - string - - The name of the collection over which the cursor is operating. - - * - ``batchSize`` - - positive integer - - Optional. The number of documents to return in the batch. - - * - ``maxTimeMS`` - - non-negative integer - - Optional. Specifies a time limit in milliseconds for processing operations on a cursor. If you do not specify a value for maxTimeMS, operations will not time out. A value of ``0`` explicitly @@ -89,11 +73,8 @@ The command accepts the following fields: terminates an operation at one of its designated :term:`interrupt points `. - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst .. note:: @@ -104,7 +85,7 @@ The command accepts the following fields: .. versionadded:: 4.4 Output -~~~~~~ +------ The command returns a document that contains the cursor information as well as the next batch. diff --git a/source/reference/command/getParameter.txt b/source/reference/command/getParameter.txt index 55a19127f70..c84f42f2375 100644 --- a/source/reference/command/getParameter.txt +++ b/source/reference/command/getParameter.txt @@ -10,6 +10,9 @@ getParameter :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: getParameter :dbcommand:`getParameter` is an administrative command for @@ -17,75 +20,72 @@ getParameter { command } )` method to run the :dbcommand:`getParameter` command in the ``admin`` database. - The :dbcommand:`getParameter` command has the following syntax: +Syntax +------ + +The command has the following syntax: - .. code-block:: javascript +.. code-block:: javascript + db.adminCommand( { - getParameter: , - : , - comment: + getParameter: , + : , + comment: } + ) - The command takes the following fields: +Command Fields +-------------- +The command takes the following fields: - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``getParameter`` - - - int, string, document - - - Specify a value of: - - - ``1`` (or any integer value) to return the value for the - specified ````. - - - ``'*'`` to return values for all parameters available to - :dbcommand:`getParameter`, ignoring the ```` field. - - - ``{ showDetails: true }`` to return a document containing: - - .. _showdetails-fields: - - - ``value``, the value that ```` is set to - - ``settableAtRuntime``, whether or not ```` can - be set at runtime - - ``settableAtStartup``, whether or not ```` can - be set at startup - - - ``{ showDetails: true, allParameters: true }`` to return a - document containing :ref:`showDetails fields - ` for **all** parameters. - - - * - ```` - - - string - - - String name of the parameter to retrieve. - - The value for ```` does not affect output. - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``getParameter`` + - int, string, document + - Specify a value of: - .. versionadded:: 4.4 - - + - ``1`` (or any integer value) to return the value for the + specified ````. + + - ``'*'`` to return values for all parameters available to + :dbcommand:`getParameter`, ignoring the ```` field. + + - ``{ showDetails: true }`` to return a document containing: + + .. _showdetails-fields: + + - ``value``, the value that ```` is set to + - ``settableAtRuntime``, whether or not ```` can + be set at runtime + - ``settableAtStartup``, whether or not ```` can + be set at startup + + - ``{ showDetails: true, allParameters: true }`` to return a + document containing :ref:`showDetails fields + ` for **all** parameters. + + * - ```` + - string + - String name of the parameter to retrieve. + + The value for ```` does not affect output. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + + Behavior -------- diff --git a/source/reference/command/grantPrivilegesToRole.txt b/source/reference/command/grantPrivilegesToRole.txt index 1107d83b05b..39ec4a5fb95 100644 --- a/source/reference/command/grantPrivilegesToRole.txt +++ b/source/reference/command/grantPrivilegesToRole.txt @@ -20,46 +20,53 @@ Definition command is run. The :dbcommand:`grantPrivilegesToRole` command uses the following syntax: - .. code-block:: javascript +.. code-block:: javascript + db.runCommand( { grantPrivilegesToRole: "", privileges: [ - { - resource: { }, actions: [ "", ... ] - }, - ... + { + resource: { }, actions: [ "", ... ] + }, + ... ], writeConcern: { }, comment: } + ) + +Command Fields +-------------- + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``grantPrivilegesToRole`` + - string + - The name of the user-defined role to grant privileges to. + + * - ``privileges`` + - array + - The privileges to add to the role. For the format of a privilege, see + :data:`~admin.system.roles.privileges`. - The :dbcommand:`grantPrivilegesToRole` command has the following - fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``grantPrivilegesToRole`` - - string - - The name of the user-defined role to grant privileges to. - * - ``privileges`` - - array - - The privileges to add to the role. For the format of a privilege, see - :data:`~admin.system.roles.privileges`. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 + Behavior -------- diff --git a/source/reference/command/grantRolesToRole.txt b/source/reference/command/grantRolesToRole.txt index 060d6cf1e5e..62fbc707112 100644 --- a/source/reference/command/grantRolesToRole.txt +++ b/source/reference/command/grantRolesToRole.txt @@ -18,12 +18,15 @@ Definition Grants roles to a :ref:`user-defined role `. The :dbcommand:`grantRolesToRole` command affects roles on the - database where the command runs. :dbcommand:`grantRolesToRole` has - the following syntax: + database where the command runs. - .. code-block:: javascript +The command has the following syntax: - { grantRolesToRole: "", +.. code-block:: javascript + + db.runCommand( + { + grantRolesToRole: "", roles: [ { role: "", db: "" }, ... @@ -31,34 +34,38 @@ Definition writeConcern: { }, comment: } - - The :dbcommand:`grantRolesToRole` command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``grantRolesToRole`` - - string - - The name of a role to add subsidiary roles. - * - ``roles`` - - array - - An array of roles from which to inherit. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 - - - .. |local-cmd-name| replace:: :dbcommand:`grantRolesToRole` - .. include:: /includes/fact-roles-array-contents.rst + ) + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``grantRolesToRole`` + - string + - The name of a role to add subsidiary roles. + + * - ``roles`` + - array + - An array of roles from which to inherit. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 + + +.. |local-cmd-name| replace:: :dbcommand:`grantRolesToRole` +.. include:: /includes/fact-roles-array-contents.rst Behavior -------- diff --git a/source/reference/command/grantRolesToUser.txt b/source/reference/command/grantRolesToUser.txt index 904dcf3b3f6..b720f7d3757 100644 --- a/source/reference/command/grantRolesToUser.txt +++ b/source/reference/command/grantRolesToUser.txt @@ -17,42 +17,54 @@ Definition Grants additional roles to a user. - The :dbcommand:`grantRolesToUser` command uses the following syntax: +Syntax +------ - .. code-block:: javascript +The :dbcommand:`grantRolesToUser` command uses the following syntax: - { grantRolesToUser: "", +.. code-block:: javascript + + db.runCommand( + { + grantRolesToUser: "", roles: [ ], writeConcern: { }, comment: } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``grantRolesToUser`` + - string + - The name of the user to give additional roles. + + * - ``roles`` + - array + - An array of additional roles to grant to the user. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 - The command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``grantRolesToUser`` - - string - - The name of the user to give additional roles. - * - ``roles`` - - array - - An array of additional roles to grant to the user. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 - - .. |local-cmd-name| replace:: :dbcommand:`grantRolesToUser` - .. include:: /includes/fact-roles-array-contents.rst +.. |local-cmd-name| replace:: :dbcommand:`grantRolesToUser` +.. include:: /includes/fact-roles-array-contents.rst Required Access --------------- diff --git a/source/reference/command/hello.txt b/source/reference/command/hello.txt index e694d9a81bf..3094f0954f7 100644 --- a/source/reference/command/hello.txt +++ b/source/reference/command/hello.txt @@ -43,11 +43,15 @@ Definition Syntax ------ -The command takes the following form: +The command has the following syntax: .. code-block:: javascript - db.runCommand( { hello: 1 } ) + db.runCommand( + { + hello: 1 + } + ) The :dbcommand:`hello` command accepts optional fields ``saslSupportedMechs: `` to return an additional field @@ -56,7 +60,13 @@ add a log comment associated with the command. .. code-block:: javascript - db.runCommand( { hello: 1, saslSupportedMechs: "", comment: } ) + db.runCommand( + { + hello: 1, + saslSupportedMechs: "", + comment: + } + ) The :method:`db.hello()` method in :binary:`~bin.mongosh` provides a wrapper around :dbcommand:`hello`. diff --git a/source/reference/command/hostInfo.txt b/source/reference/command/hostInfo.txt index 1af1fb6be5e..fdf9e698620 100644 --- a/source/reference/command/hostInfo.txt +++ b/source/reference/command/hostInfo.txt @@ -10,6 +10,9 @@ hostInfo :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: hostInfo :returns: A document with information about the underlying system @@ -18,54 +21,62 @@ hostInfo platforms. You must run the :dbcommand:`hostInfo` command, which takes no - arguments, against the ``admin`` database. Consider the following - invocations of :dbcommand:`hostInfo`: - - .. code-block:: javascript - - db.hostInfo() - db.adminCommand( { "hostInfo" : 1 } ) - - In :binary:`~bin.mongosh` you can use :method:`db.hostInfo()` - as a helper to access :dbcommand:`hostInfo`. The output of - :dbcommand:`hostInfo` on a Linux system will resemble the - following: - - .. code-block:: javascript - - { - "system" : { - "currentTime" : ISODate(""), - "hostname" : "", - "cpuAddrSize" : , - "memSizeMB" : , - "memLimitMB" : , // Available starting in MongoDB 4.0.9 (and 3.6.13) - "numCores" : , - "cpuArch" : "", - "numaEnabled" : - }, - "os" : { - "type" : "", - "name" : "", - "version" : "" - }, - "extra" : { - "versionString" : "", - "libcVersion" : "", - "kernelVersion" : "", - "cpuFrequencyMHz" : "", - "cpuFeatures" : "", - "pageSize" : , - "numPages" : , - "maxOpenFiles" : - }, - "ok" : - } + arguments, against the ``admin`` database. + +Syntax +------ +.. code-block:: javascript + + db.adminCommand( + { + hostInfo: 1 + } + ) Output ------ +In :binary:`~bin.mongosh` you can use :method:`db.hostInfo()` +as a helper to access :dbcommand:`hostInfo`. The output of +:dbcommand:`hostInfo` on a Linux system will resemble the +following: + +.. code-block:: javascript + + { + "system" : { + "currentTime" : ISODate(""), + "hostname" : "", + "cpuAddrSize" : , + "memSizeMB" : , + "memLimitMB" : , // Available starting in MongoDB 4.0.9 (and 3.6.13) + "numCores" : , + "cpuArch" : "", + "numaEnabled" : + }, + "os" : { + "type" : "", + "name" : "", + "version" : "" + }, + "extra" : { + "versionString" : "", + "libcVersion" : "", + "kernelVersion" : "", + "cpuFrequencyMHz" : "", + "cpuFeatures" : "", + "pageSize" : , + "numPages" : , + "maxOpenFiles" : + }, + "ok" : + } + + +Output Fields +~~~~~~~~~~~~~ + .. data:: hostInfo The document returned by the :dbcommand:`hostInfo`. diff --git a/source/reference/command/insert.txt b/source/reference/command/insert.txt index 0b6e76dab91..19c902de5d8 100644 --- a/source/reference/command/insert.txt +++ b/source/reference/command/insert.txt @@ -19,10 +19,19 @@ Definition returns a document containing the status of all inserts. The insert methods provided by the MongoDB drivers use this command internally. - The command has the following syntax: + :returns: + + A document that contains the status of the operation. + See :ref:`insert-command-output` for details. + +Syntax +------ - .. code-block:: javascript +The command has the following syntax: +.. code-block:: javascript + + db.runCommand( { insert: , documents: [ , , , ... ], @@ -31,82 +40,56 @@ Definition bypassDocumentValidation: , comment: } - - The :dbcommand:`insert` command takes the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``insert`` - - - string - - - The name of the target collection. - - - - * - ``documents`` - - - array - - - An array of one or more documents to insert into the named collection. - - - - * - ``ordered`` - - - boolean - - - Optional. If ``true``, then when an insert of a document fails, return without - inserting any remaining documents listed in the ``inserts`` array. If - ``false``, then when an insert of a document fails, continue to insert the - remaining documents. Defaults to ``true``. - - - - * - ``writeConcern`` - - - document - - - Optional. A document that expresses the :doc:`write concern ` - of the :dbcommand:`insert` command. Omit to use the default write - concern. - - .. include:: /includes/extracts/transactions-operations-write-concern.rst - - - - * - ``bypassDocumentValidation`` - - - boolean - - - Optional. Enables :dbcommand:`insert` to bypass document validation - during the operation. This lets you insert documents that do not - meet the validation requirements. - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``insert`` + - string + - The name of the target collection. + + * - ``documents`` + - array + - An array of one or more documents to insert into the named collection. + + * - ``ordered`` + - boolean + - Optional. If ``true``, then when an insert of a document fails, return without + inserting any remaining documents listed in the ``inserts`` array. If + ``false``, then when an insert of a document fails, continue to insert the + remaining documents. Defaults to ``true``. - .. versionadded:: 4.4 - - - :returns: - - A document that contains the status of the operation. - See :ref:`insert-command-output` for details. - + * - ``writeConcern`` + - document + - Optional. A document that expresses the :doc:`write concern ` + of the :dbcommand:`insert` command. Omit to use the default write + concern. + + .. include:: /includes/extracts/transactions-operations-write-concern.rst + + * - ``bypassDocumentValidation`` + - boolean + - Optional. Enables :dbcommand:`insert` to bypass document validation + during the operation. This lets you insert documents that do not + meet the validation requirements. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Behavior -------- diff --git a/source/reference/command/invalidateUserCache.txt b/source/reference/command/invalidateUserCache.txt index 16527beac61..fcac34e1efb 100644 --- a/source/reference/command/invalidateUserCache.txt +++ b/source/reference/command/invalidateUserCache.txt @@ -20,11 +20,19 @@ Definition at any given moment, regardless of the interval set in the :parameter:`userCacheInvalidationIntervalSecs` parameter. - :dbcommand:`invalidateUserCache` has the following syntax: - .. code-block:: javascript +Syntax +------ - db.runCommand( { invalidateUserCache: 1 } ) +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + invalidateUserCache: 1 + } + ) Required Access --------------- diff --git a/source/reference/command/isdbgrid.txt b/source/reference/command/isdbgrid.txt index 2179b70480c..c3c3c0a9dc0 100644 --- a/source/reference/command/isdbgrid.txt +++ b/source/reference/command/isdbgrid.txt @@ -10,37 +10,58 @@ isdbgrid :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: isdbgrid This command verifies that a process is a :binary:`~bin.mongos`. If you issue the :dbcommand:`isdbgrid` command when connected to a :binary:`~bin.mongos`, the response document includes the ``isdbgrid`` - field set to ``1``. The returned document is similar to the - following: - - .. code-block:: javascript + field set to ``1``. - { "isdbgrid" : 1, "hostname" : "app.example.net", "ok" : 1 } +Syntax +------ - If you issue the :dbcommand:`isdbgrid` command when connected to a - :binary:`~bin.mongod`, MongoDB returns an error document. The - :dbcommand:`isdbgrid` command is not available to :binary:`~bin.mongod`. - The error document, however, also includes a line that reads - ``"isdbgrid" : 1``, just as in the document returned for a - :binary:`~bin.mongos`. The error document is similar to the following: +The command has the following syntax: - .. code-block:: javascript +.. code-block:: javascript + db.runCommand( { - "errmsg" : "no such cmd: isdbgrid", - "bad cmd" : { - "isdbgrid" : 1 - }, - "ok" : 0 + isdbgrid: 1 } + ) + + +Output +------ + +The returned document is similar to the following: + +.. code-block:: javascript + + { "isdbgrid" : 1, "hostname" : "app.example.net", "ok" : 1 } + +If you issue the :dbcommand:`isdbgrid` command when connected to a +:binary:`~bin.mongod`, MongoDB returns an error document. The +:dbcommand:`isdbgrid` command is not available to :binary:`~bin.mongod`. +The error document, however, also includes a line that reads +``"isdbgrid" : 1``, just as in the document returned for a +:binary:`~bin.mongos`. The error document is similar to the following: + +.. code-block:: javascript - You can instead use the :dbcommand:`hello` command to determine - connection to a :binary:`~bin.mongos`. When connected to a - :binary:`~bin.mongos`, the :dbcommand:`hello` command returns a document that - contains the string ``isdbgrid`` in the ``msg`` field. + { + "errmsg" : "no such cmd: isdbgrid", + "bad cmd" : { + "isdbgrid" : 1 + }, + "ok" : 0 + } + +You can instead use the :dbcommand:`hello` command to determine +connection to a :binary:`~bin.mongos`. When connected to a +:binary:`~bin.mongos`, the :dbcommand:`hello` command returns a document that +contains the string ``isdbgrid`` in the ``msg`` field. diff --git a/source/reference/command/killAllSessions.txt b/source/reference/command/killAllSessions.txt index dc753beb408..7cd53b9463f 100644 --- a/source/reference/command/killAllSessions.txt +++ b/source/reference/command/killAllSessions.txt @@ -25,12 +25,22 @@ The command has the following syntax: .. code-block:: javascript - db.runCommand( { killAllSessions: [ { user: , db: }, ... ] } ) + db.runCommand( + { + killAllSessions: [ { user: , db: }, ... ] + } + ) + +Command Fields +-------------- The command takes an array of documents where each document specifies the user and the user's authentication database. Specify an empty array to kill all sessions for all users in the system. [#exception]_ +View Existing Sesssions +----------------------- + To view existing sessions, see :pipeline:`$listSessions` operation or :pipeline:`$listLocalSessions`. diff --git a/source/reference/command/killAllSessionsByPattern.txt b/source/reference/command/killAllSessionsByPattern.txt index 2fe52b03232..229598eff18 100644 --- a/source/reference/command/killAllSessionsByPattern.txt +++ b/source/reference/command/killAllSessionsByPattern.txt @@ -25,7 +25,14 @@ The command has the following syntax: .. code-block:: javascript - db.runCommand( { killAllSessionsByPattern: [ , ... ] } ) + db.runCommand( + { + killAllSessionsByPattern: [ , ... ] + } + ) + +Command Fields +-------------- The command takes an array of documents that specify the patterns to match: @@ -37,21 +44,17 @@ match: - Description * - ``{ lsid: { id : } }`` - - Specify the UUID portion of the session id to kill. * - ``{ uid: }`` - - Specifies the hash of the owner of the sessions to kill. * - ``{ users: [ { user: , db: }, ... ] }`` - - Specifies the owners of the sessions to kill. Requires additional privileges. See :ref:`killAllSessionsByPattern-auth`. * - ``{ roles: [ { role: , db: }, ... ] }`` - - Specifies the roles assigned to the owners of the sessions to kill. Requires additional privileges. See :ref:`killAllSessionsByPattern-auth`. diff --git a/source/reference/command/killCursors.txt b/source/reference/command/killCursors.txt index 2b56d03d8f6..c9e604e4357 100644 --- a/source/reference/command/killCursors.txt +++ b/source/reference/command/killCursors.txt @@ -31,46 +31,47 @@ Definition .. include:: /includes/fact-dbcommand.rst - The command has the following form: - - .. code-block:: javascript - - db.runCommand( { "killCursors": , "cursors": [ , ... ], comment: } ) - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``killCursors`` - - - string - - - The name of the collection. - - - - * - ``cursors`` - - - array - - - The ids of the cursors to kill. - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript + db.runCommand( + { + killCursors: , + cursors: [ , ... ], comment: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``killCursors`` + - string + - The name of the collection. + + * - ``cursors`` + - array + - The ids of the cursors to kill. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Required Access --------------- diff --git a/source/reference/command/killOp.txt b/source/reference/command/killOp.txt index f2f93cf0ad1..47c4f5e20da 100644 --- a/source/reference/command/killOp.txt +++ b/source/reference/command/killOp.txt @@ -27,40 +27,44 @@ Definition .. include:: /includes/fact-dbcommand.rst - The command has the following form: +Syntax +------ - .. code-block:: javascript +The command has the following form: - { "killOp": 1, "op": , comment: } - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Parameter - - - Type - - - Description - - * - ``op`` - - - number - - - An operation ID. - - - * - ``comment`` - - - any +.. code-block:: javascript - - .. include:: /includes/extracts/comment-content.rst + db.adminCommand( + { + killOp: 1, + op: , + comment: + } + ) + +Command Fields +-------------- + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Parameter + - Type + - Description + + * - ``op`` + - number + - An operation ID. - .. versionadded:: 4.4 - - - .. include:: /includes/extracts/warning-terminating-ops-command.rst + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + + +.. include:: /includes/extracts/warning-terminating-ops-command.rst Behavior -------- diff --git a/source/reference/command/killSessions.txt b/source/reference/command/killSessions.txt index e7538dc9961..617893fd4db 100644 --- a/source/reference/command/killSessions.txt +++ b/source/reference/command/killSessions.txt @@ -26,13 +26,22 @@ The command has the following syntax: .. code-block:: javascript - db.runCommand( { killSessions: [ { id : }, ... ] } ) + db.runCommand( + { + killSessions: [ { id : }, ... ] + } + ) + +Command Fields +-------------- The command takes an array of documents that specify the UUID portion of the session id. Specify an empty array ``[ ]`` to kill all sessions, or if access control is enabled, all sessions owned by the user. [#exception]_ +View Existing Sessions +---------------------- To view existing sessions, see :pipeline:`$listSessions` operation or :pipeline:`$listLocalSessions`. diff --git a/source/reference/command/listCollections.txt b/source/reference/command/listCollections.txt index 02f67f62043..a9915802d6b 100644 --- a/source/reference/command/listCollections.txt +++ b/source/reference/command/listCollections.txt @@ -22,100 +22,96 @@ Definition provides the :method:`db.getCollectionInfos()` and the :method:`db.getCollectionNames()` helper methods. - The command has the following form: - - .. code-block:: javascript - - { listCollections: 1, filter: , nameOnly: , authorizedCollections: , comment: } +Syntax +------ - The :dbcommand:`listCollections` command can take the following - optional field: +The command has the following syntax: +.. code-block:: javascript - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 + db.runCommand( + { + listCollections: 1, + filter: , + nameOnly: , + authorizedCollections: , + comment: + } + ) + +Command Fields +-------------- + +The command can take the following optional fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``filter`` + - document + - Optional. A query expression to filter the list of collections. + + You can specify a query expression on any of the :ref:`fields + returned ` by :dbcommand:`listCollections`. + + * - ``nameOnly`` + - boolean + - Optional. A flag to indicate whether the command should return just the + collection/view names and type or return both the name and other information. + + Returning just the name and type (``view`` or ``collection``) does + not take collection-level locks whereas returning full collection + information locks each collection in the database. + + The default value is ``false``. + + .. note:: + + When ``nameOnly`` is ``true``, your ``filter`` expression can only + filter based on a collection's name and type. No other fields are + available. + + .. versionadded:: 4.0 + + * - ``authorizedCollections`` + - boolean + - Optional. A flag, when set to ``true`` and used with ``nameOnly: true``, that + allows a user without the required privilege (i.e. + :authaction:`listCollections` action on the database) to run the + command when access control is enforced. + + When both ``authorizedCollections`` and ``nameOnly`` options are set + to true, the command returns only those collections for which the user + has privileges. For example, if a user has :authaction:`find` action + on specific collections, the command returns only those collections; or, + if a user has :authaction:`find` or any other action, on the + database resource, the command lists all collections in the database. + + The default value is ``false``. That is, the user must have + :authaction:`listCollections` action on the database to run the + command. + + For a user who has :authaction:`listCollections` action on the + database, this option has no effect since the user has privileges to + list the collections in the database. + + When used without ``nameOnly: true``, this option has no effect. + That is, the user must have the required privileges to run the + command when access control is enforced. Otherwise, the user is + unauthorized to run the command. + + .. versionadded:: 4.0 + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst - * - Field - - - Type - - - Description - - * - ``filter`` - - - document - - - Optional. A query expression to filter the list of collections. - - You can specify a query expression on any of the :ref:`fields - returned ` by :dbcommand:`listCollections`. - - - - * - ``nameOnly`` - - - boolean - - - Optional. A flag to indicate whether the command should return just the - collection/view names and type or return both the name and other information. - - Returning just the name and type (``view`` or ``collection``) does - not take collection-level locks whereas returning full collection - information locks each collection in the database. - - The default value is ``false``. - - .. note:: - - When ``nameOnly`` is ``true``, your ``filter`` expression can only - filter based on a collection's name and type. No other fields are - available. - - .. versionadded:: 4.0 - - - - * - ``authorizedCollections`` - - - boolean - - - Optional. A flag, when set to ``true`` and used with ``nameOnly: true``, that - allows a user without the required privilege (i.e. - :authaction:`listCollections` action on the database) to run the - command when access control is enforced. - - When both ``authorizedCollections`` and ``nameOnly`` options are set - to true, the command returns only those collections for which the user - has privileges. For example, if a user has :authaction:`find` action - on specific collections, the command returns only those collections; or, - if a user has :authaction:`find` or any other action, on the - database resource, the command lists all collections in the database. - - The default value is ``false``. That is, the user must have - :authaction:`listCollections` action on the database to run the - command. - - For a user who has :authaction:`listCollections` action on the - database, this option has no effect since the user has privileges to - list the collections in the database. - - When used without ``nameOnly: true``, this option has no effect. - That is, the user must have the required privileges to run the - command when access control is enforced. Otherwise, the user is - unauthorized to run the command. - - .. versionadded:: 4.0 - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 - + .. versionadded:: 4.4 .. _listCollections-behavior: diff --git a/source/reference/command/listCommands.txt b/source/reference/command/listCommands.txt index 9c7bd88ecd8..2fd6166f400 100644 --- a/source/reference/command/listCommands.txt +++ b/source/reference/command/listCommands.txt @@ -10,14 +10,26 @@ listCommands :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: listCommands The :dbcommand:`listCommands` command generates a list of all database commands implemented for the current :binary:`~bin.mongod` or :binary:`~bin.mongos` instance. - .. code-block:: javascript +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript - db.runCommand( { listCommands: 1 } ) + db.runCommand( + { + listCommands: 1 + } + ) - .. slave-ok +.. slave-ok diff --git a/source/reference/command/listDatabases.txt b/source/reference/command/listDatabases.txt index 051a4e8690f..7cfa6780a66 100644 --- a/source/reference/command/listDatabases.txt +++ b/source/reference/command/listDatabases.txt @@ -20,82 +20,75 @@ Definition :dbcommand:`listDatabases` must run against the ``admin`` database, as in the following example: - .. code-block:: javascript +Syntax +------ - db.adminCommand( { listDatabases: 1 } ) +.. code-block:: javascript - The value (e.g. ``1``) does not affect the output of the - command. + db.adminCommand( + { + listDatabases: 1 + } + ) - The :dbcommand:`listDatabases` command can take the following - optional fields: +The value (e.g. ``1``) does not affect the output of the +command. +Command Fields +-------------- - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``filter`` - - - document - - - Optional. A query predicate that determines which databases are listed. - - You can specify a condition on any of the fields in the output of - :dbcommand:`listDatabases`: - - - ``name`` - - - ``sizeOnDisk`` - - - ``empty`` - - - ``shards`` - - - - * - ``nameOnly`` - - - boolean - - - Optional. A flag to indicate whether the command should return just the - database names, or return both database names and size information. - - Returning size information requires locking each database one at a - time, while returning only names does not require locking any database. - - The default value is ``false``, so :dbcommand:`listDatabases` returns - the name and size information of each database. - - - - * - ``authorizedDatabases`` - - - boolean - - - Optional. A flag that determines which databases are returned based on the - user privileges when access control is enabled. - - .. include:: /includes/extracts/listDatabases-auth-privileges.rst - - For more information, see :ref:`listDatabases-behavior`. - - .. versionadded:: 4.0.5 - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst +The command can take the following optional fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``filter`` + - document + - Optional. A query predicate that determines which databases are listed. + + You can specify a condition on any of the fields in the output of + :dbcommand:`listDatabases`: + + - ``name`` + + - ``sizeOnDisk`` + + - ``empty`` + + - ``shards`` + + * - ``nameOnly`` + - boolean + - Optional. A flag to indicate whether the command should return just the + database names, or return both database names and size information. + + Returning size information requires locking each database one at a + time, while returning only names does not require locking any database. + + The default value is ``false``, so :dbcommand:`listDatabases` returns + the name and size information of each database. + + * - ``authorizedDatabases`` + - boolean + - Optional. A flag that determines which databases are returned based on the + user privileges when access control is enabled. + + .. include:: /includes/extracts/listDatabases-auth-privileges.rst + + For more information, see :ref:`listDatabases-behavior`. + + .. versionadded:: 4.0.5 - .. versionadded:: 4.4 + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 .. _listDatabases-behavior: diff --git a/source/reference/command/listIndexes.txt b/source/reference/command/listIndexes.txt index db0acefbc40..883808c1828 100644 --- a/source/reference/command/listIndexes.txt +++ b/source/reference/command/listIndexes.txt @@ -24,7 +24,7 @@ Definition Syntax ------ -The command has the following form: +The command has the following syntax: .. code-block:: javascript @@ -37,9 +37,9 @@ The command has the following form: ) Command Fields -~~~~~~~~~~~~~~ +-------------- -``listIndexes`` takes the following fields: +The command takes the following fields: .. list-table:: :header-rows: 1 diff --git a/source/reference/command/listShards.txt b/source/reference/command/listShards.txt index 97059115665..d437223c3f4 100644 --- a/source/reference/command/listShards.txt +++ b/source/reference/command/listShards.txt @@ -20,11 +20,18 @@ Definition available on :binary:`~bin.mongos` instances and must be issued against the ``admin`` database. - The command takes the following form: +Syntax +------ + +The command has the following syntax: - .. code-block:: javascript +.. code-block:: javascript - { listShards: 1 } + db.runCommand( + { + listShards: 1 + } + ) Example ------- diff --git a/source/reference/command/lockInfo.txt b/source/reference/command/lockInfo.txt index 89d55e932df..7d213562195 100644 --- a/source/reference/command/lockInfo.txt +++ b/source/reference/command/lockInfo.txt @@ -22,11 +22,15 @@ Definition Syntax ------ -To run, issue the command against the ``admin`` database: +The command has the following syntax: .. code-block:: javascript - db.adminCommand( { lockInfo: 1 } ) + db.adminCommand( + { + lockInfo: 1 + } + ) Output Example -------------- diff --git a/source/reference/command/logApplicationMessage.txt b/source/reference/command/logApplicationMessage.txt index 4257ce727a9..16f10d176d2 100644 --- a/source/reference/command/logApplicationMessage.txt +++ b/source/reference/command/logApplicationMessage.txt @@ -10,6 +10,9 @@ logApplicationMessage :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: logApplicationMessage .. include:: /includes/note-audit-in-enterprise-only.rst @@ -20,12 +23,22 @@ logApplicationMessage role, or roles that inherit from :authrole:`clusterAdmin`, to run the command. - The :dbcommand:`logApplicationMessage` has the following syntax: +Syntax +------ + +The command has the following syntax: - .. code-block:: javascript +.. code-block:: javascript + + db.runCommand( + { + logApplicationMessage: + } + ) - { logApplicationMessage: } +Behavior +-------- - MongoDB associates these custom messages with the :ref:`audit - operation ` ``applicationMessage``, - and the messages are subject to any :ref:`filtering `. +MongoDB associates these custom messages with the :ref:`audit +operation ` ``applicationMessage``, +and the messages are subject to any :ref:`filtering `. diff --git a/source/reference/command/logRotate.txt b/source/reference/command/logRotate.txt index 8fce145b181..bfc77fdb279 100644 --- a/source/reference/command/logRotate.txt +++ b/source/reference/command/logRotate.txt @@ -20,51 +20,57 @@ Definition prevent a single logfile from consuming too much disk space. You must issue the :dbcommand:`logRotate` command against the - :term:`admin database` in the form: + :term:`admin database`. - .. code-block:: javascript +Syntax +------ - db.adminCommand({logRotate: }) +The command has the following syntax: - The :dbcommand:`logRotate` command takes the following parameters: - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Parameter - - - Type - - - Description - - * - ```` - - - string - - - The log or logs to rotate, according to the following: - - - ``1`` -- Rotates both the server and audit logs - - ``server`` -- Rotates only the server log - - ``audit`` -- Rotates only the audit log - - * - ``comment`` - - - any - - - *optional* A message logged by the server to the log file and - audit file at time of log rotation. - - You may also rotate the logs by sending a ``SIGUSR1`` signal to the - :binary:`~bin.mongod` process. - - For example, if a running :binary:`~bin.mongod` instance has a - process ID (PID) of ``2200``, the following command rotates the log - file for that instance on Linux: - - .. code-block:: bash +.. code-block:: javascript - kill -SIGUSR1 2200 + db.adminCommand( + { + logRotate: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Parameter + - Type + - Description + + * - ```` + - string + - The log or logs to rotate, according to the following: + + - ``1`` -- Rotates both the server and audit logs + - ``server`` -- Rotates only the server log + - ``audit`` -- Rotates only the audit log + + * - ``comment`` + - any + - *optional* A message logged by the server to the log file and + audit file at time of log rotation. + +You may also rotate the logs by sending a ``SIGUSR1`` signal to the +:binary:`~bin.mongod` process. + +For example, if a running :binary:`~bin.mongod` instance has a +process ID (PID) of ``2200``, the following command rotates the log +file for that instance on Linux: + +.. code-block:: bash + + kill -SIGUSR1 2200 Limitations ----------- diff --git a/source/reference/command/logout.txt b/source/reference/command/logout.txt index efb208065d4..71924dcd15b 100644 --- a/source/reference/command/logout.txt +++ b/source/reference/command/logout.txt @@ -10,6 +10,9 @@ logout :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: logout .. deprecated:: 5.0 @@ -19,25 +22,35 @@ logout This command will be removed in a future release. - The :dbcommand:`logout` command terminates the current - authenticated session: +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + logout: 1 + } + ) - .. code-block:: javascript - { logout: 1 } +Example +------- - .. |operation-name| replace:: :dbcommand:`logout` - .. include:: /includes/note-logout-namespace.rst +.. |operation-name| replace:: :dbcommand:`logout` +.. include:: /includes/note-logout-namespace.rst - .. example:: +.. example:: - .. include:: /includes/fact-change-database-context.rst + .. include:: /includes/fact-change-database-context.rst - When you have set the database context and ``db`` object, you - can use the |operation-name| to log out of database as in the - following operation: + When you have set the database context and ``db`` object, you + can use the |operation-name| to log out of database as in the + following operation: - .. code-block:: javascript + .. code-block:: javascript - db.runCommand( { logout: 1 } ) + db.runCommand( { logout: 1 } ) diff --git a/source/reference/command/mapReduce.txt b/source/reference/command/mapReduce.txt index 0ada1dfd9f9..01201056c8e 100644 --- a/source/reference/command/mapReduce.txt +++ b/source/reference/command/mapReduce.txt @@ -31,11 +31,12 @@ Syntax .. include:: /includes/extracts/4.2-changes-map-reduce-deprecation.rst -The :dbcommand:`mapReduce` command has the following syntax: +The command has the following syntax: .. code-block:: javascript - db.runCommand( { + db.runCommand( + { mapReduce: , map: , reduce: , @@ -51,10 +52,11 @@ The :dbcommand:`mapReduce` command has the following syntax: collation: , writeConcern: , comment: - } ) + } + ) Command Fields -~~~~~~~~~~~~~~ +-------------- The command takes the following fields as arguments: @@ -63,15 +65,11 @@ The command takes the following fields as arguments: :widths: 20 20 80 * - Field - - Type - - Description * - :ref:`mapReduce ` - - string - - .. _cmd-mapreduce-collection: The name of the collection on which you want to perform map-reduce. @@ -82,11 +80,8 @@ The command takes the following fields as arguments: .. include:: /includes/extracts/views-unsupported-mapReduce.rst - * - :ref:`map ` - - JavaScript or String - - .. _cmd-mapreduce-map: A JavaScript function that associates or "maps" a ``value`` @@ -97,12 +92,8 @@ The command takes the following fields as arguments: See :ref:`mapreduce-map-cmd` for more information. - - * - :ref:`reduce ` - - JavaScript or String - - .. _cmd-mapreduce-reduce: A JavaScript function that "reduces" to a single object all @@ -113,12 +104,8 @@ The command takes the following fields as arguments: See :ref:`mapreduce-reduce-cmd` for more information. - - * - :ref:`out ` - - string or document - - .. _cmd-mapreduce-out: Specifies where to output the result of the map-reduce operation. You @@ -129,24 +116,16 @@ The command takes the following fields as arguments: See :ref:`mapreduce-out-cmd` for more information. - - * - :ref:`query ` - - document - - .. _cmd-mapreduce-query: Optional. Specifies the selection criteria using :doc:`query operators ` for determining the documents input to the ``map`` function. - - * - :ref:`sort ` - - document - - .. _cmd-mapreduce-sort: Optional. Sorts the *input* documents. This option is useful for @@ -154,23 +133,15 @@ The command takes the following fields as arguments: the emit key so that there are fewer reduce operations. The sort key must be in an existing index for this collection. - - * - :ref:`limit ` - - number - - .. _cmd-mapreduce-limit: Optional. Specifies a maximum number of documents for the input into the ``map`` function. - - * - :ref:`finalize ` - - JavaScript or String - - .. _cmd-mapreduce-finalize: Optional. A JavaScript function that modifies the output after @@ -181,23 +152,15 @@ The command takes the following fields as arguments: See :ref:`mapreduce-finalize-cmd` for more information. - - * - :ref:`scope ` - - document - - .. _cmd-mapreduce-scope: Optional. Specifies global variables that are accessible in the ``map``, ``reduce`` and ``finalize`` functions. - - * - :ref:`jsMode ` - - boolean - - .. _cmd-mapreduce-jsMode: Optional. Specifies whether to convert intermediate data into BSON @@ -229,12 +192,8 @@ The command takes the following fields as arguments: 500,000 distinct ``key`` arguments to the mapper's ``emit()`` function. - - * - :ref:`verbose ` - - boolean - - .. _cmd-mapreduce-verbose: Optional. Specifies whether to include the ``timing`` information in the @@ -251,16 +210,13 @@ The command takes the following fields as arguments: ``verbosity`` modes. * - :ref:`bypassDocumentValidation ` - - boolean - - .. _cmd-mapreduce-bypassDocumentValidation: Optional. Enables :dbcommand:`mapReduce` to bypass document validation during the operation. This lets you insert documents that do not meet the validation requirements. - .. note:: If the :ref:`output option ` is set to @@ -271,42 +227,30 @@ The command takes the following fields as arguments: documents unless the ``bypassDocumentValidation`` parameter is set to true. - - - * - :ref:`collation ` - - document - - .. _cmd-mapreduce-collation: Optional. .. include:: /includes/extracts/collation-option.rst - - * - :ref:`writeConcern ` - - document - - .. _cmd-mapreduce-writeConcern: Optional. A document that expresses the :doc:`write concern ` to use when outputing to a collection. Omit to use the default write concern. - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst .. versionadded:: 4.4 Usage -~~~~~ +----- The following is a prototype usage of the :dbcommand:`mapReduce` command: diff --git a/source/reference/command/mergeChunks.txt b/source/reference/command/mergeChunks.txt index 8c8726832fc..f9af28cb97e 100644 --- a/source/reference/command/mergeChunks.txt +++ b/source/reference/command/mergeChunks.txt @@ -23,13 +23,19 @@ Definition Syntax ------ -:dbcommand:`mergeChunks` has the following form: +The command has the following syntax: .. code-block:: javascript - db.adminCommand( { mergeChunks : , - bounds : [ { : }, - { : } ] } ) + db.adminCommand( + { + mergeChunks: , + bounds : [ + { : }, + { : } + ] + } + ) For compound shard keys, you must include the full shard key in the ``bounds`` specification. For example, if the shard key is ``{ x: 1, y: @@ -37,40 +43,37 @@ For compound shard keys, you must include the full shard key in the .. code-block:: javascript - db.adminCommand( { mergeChunks : , - bounds : [ { x: , y: }, - { x: , y: } ] } ) + db.adminCommand( + { + mergeChunks: , + bounds: [ + { x: , y: }, + { x: , y: } + ] + } + ) Command Fields -~~~~~~~~~~~~~~ - -The :dbcommand:`mergeChunks` command takes the following fields: +-------------- +The command takes the following fields: .. list-table:: :header-rows: 1 :widths: 20 20 80 * - Field - - Type - - Description * - ``mergeChunks`` - - namespace - - The fully qualified :term:`namespace` of the :term:`collection` where both :term:`chunks ` exist. Namespaces take form of ``.``. - - * - ``bounds`` - - array - - An array that contains the minimum and maximum key values of the new chunk. diff --git a/source/reference/command/ping.txt b/source/reference/command/ping.txt index 572b0b9cdd6..770c813052d 100644 --- a/source/reference/command/ping.txt +++ b/source/reference/command/ping.txt @@ -10,15 +10,27 @@ ping :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: ping The :dbcommand:`ping` command is a no-op used to test whether a server is responding to commands. This command will return immediately even if the server is write-locked: - .. code-block:: javascript +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript - { ping: 1 } + db.runCommand( + { + ping: 1 + } + ) - The value (e.g. ``1`` above) does not impact the behavior of the - command. +The value (e.g. ``1`` above) does not impact the behavior of the +command. diff --git a/source/reference/command/planCacheClear.txt b/source/reference/command/planCacheClear.txt index cba08ef1427..c2009c4adc0 100644 --- a/source/reference/command/planCacheClear.txt +++ b/source/reference/command/planCacheClear.txt @@ -19,69 +19,59 @@ Definition shape` to remove cached query plans for that shape. Omit the query shape to clear all cached query plans. - The command has the following syntax: - - .. code-block:: javascript - - db.runCommand( - { - planCacheClear: , - query: , - sort: , - projection: , - comment: - } - ) - - The :dbcommand:`planCacheClear` command has the following field: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``query`` - - - document - - - Optional. The query predicate of the :term:`query shape`. Only the structure - of the predicate, including the field names, are significant to the - shape; the values in the query predicate are insignificant. - - - - * - ``projection`` - - - document - - - Optional. The projection associated with the :term:`query shape`. - - - - * - ``sort`` - - - document - - - Optional. The sort associated with the :term:`query shape`. - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst - - .. versionadded:: 4.4 +Syntax +------ + +The command has the following syntax: +.. code-block:: javascript + + db.runCommand( + { + planCacheClear: , + query: , + sort: , + projection: , + comment: + } + ) - To see the query shapes for which cached query plans exist, see - :ref:`planCacheStats-list-query-shapes`. +Command Fields +-------------- + +The command takes the following optional fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``query`` + - document + - Optional. The query predicate of the :term:`query shape`. Only the structure + of the predicate, including the field names, are significant to the + shape; the values in the query predicate are insignificant. + + * - ``projection`` + - document + - Optional. The projection associated with the :term:`query shape`. + + * - ``sort`` + - document + - Optional. The sort associated with the :term:`query shape`. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + + +To see the query shapes for which cached query plans exist, see +:ref:`planCacheStats-list-query-shapes`. Required Access --------------- diff --git a/source/reference/command/planCacheListFilters.txt b/source/reference/command/planCacheListFilters.txt index 6042caecaef..3d3f3728f74 100644 --- a/source/reference/command/planCacheListFilters.txt +++ b/source/reference/command/planCacheListFilters.txt @@ -30,7 +30,11 @@ The command has the following syntax: .. code-block:: javascript - db.runCommand( { planCacheListFilters: } ) + db.runCommand( + { + planCacheListFilters: + } + ) Command Fields -------------- diff --git a/source/reference/command/profile.txt b/source/reference/command/profile.txt index aa343ac14ee..3dabb369c97 100644 --- a/source/reference/command/profile.txt +++ b/source/reference/command/profile.txt @@ -65,103 +65,101 @@ Definition .. include:: /includes/warning-profiler-performance.rst - The :dbcommand:`profile` command has the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { - profile: , - slowms: , - sampleRate: , - filter: - } +.. code-block:: javascript - .. _slowms-threshold-option: + db.runCommand( + { + profile: , + slowms: , + sampleRate: , + filter: + } + ) - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``profile`` - - - int - - - Configures the profiler level. - The following profiler levels are available: - - .. include:: /includes/database-profiler-levels.rst - - Since profiling is not available on :binary:`~bin.mongos`, the - :dbcommand:`profile` command cannot be used to set the profiling - level to a value other than ``0`` on a :binary:`~bin.mongos` instance. - - - - * - ``slowms`` - - - int - - - Optional. Default: 100 - - .. include:: /includes/dbcommand-slowms-definition.rst +.. _slowms-threshold-option: + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``profile`` + - int + - Configures the profiler level. + The following profiler levels are available: + + .. include:: /includes/database-profiler-levels.rst + + Since profiling is not available on :binary:`~bin.mongos`, the + :dbcommand:`profile` command cannot be used to set the profiling + level to a value other than ``0`` on a :binary:`~bin.mongos` instance. + + * - ``slowms`` + - int + - Optional. Default: 100 + + .. include:: /includes/dbcommand-slowms-definition.rst + + .. note:: + This argument affects the same setting as the configuration option + :setting:`operationProfiling.slowOpThresholdMs`. + + * - ``sampleRate`` + - double + - Optional. Default: 1.0 + + | The fraction of *slow* operations that should be profiled or logged. + | ``sampleRate`` accepts values between 0 and 1, inclusive. + + .. note:: + + This argument affects the same setting as the configuration option + :setting:`operationProfiling.slowOpSampleRate` and does not + affect the :ref:`slow oplog entry log messages on secondaries + (available starting in MongoDB 4.2) `. + + * - ``filter`` + - object + - .. _profile-filter-def: + + Optional. + A query that determines which operations are profiled or + logged. + + The filter query takes the following form: + + .. code-block:: javascript + + { : , ... } + + The query can be any legal :method:`~db.collection.find()` + operation where the query ```` matches a field in the + :ref:`profiler output `. + + .. note:: + + This argument affects the same setting as the + configuration option :setting:`operationProfiling.filter`. - .. note:: - This argument affects the same setting as the configuration option - :setting:`operationProfiling.slowOpThresholdMs`. - - - - * - ``sampleRate`` - - - double - - - Optional. Default: 1.0 - - | The fraction of *slow* operations that should be profiled or logged. - | ``sampleRate`` accepts values between 0 and 1, inclusive. - - .. note:: - - This argument affects the same setting as the configuration option - :setting:`operationProfiling.slowOpSampleRate` and does not - affect the :ref:`slow oplog entry log messages on secondaries - (available starting in MongoDB 4.2) `. - - * - ``filter`` - - object - - .. _profile-filter-def: - - Optional. - A query that determines which operations are profiled or - logged. - - The filter query takes the following form: - - .. code-block:: javascript - - { : , ... } - - The query can be any legal :method:`~db.collection.find()` - operation where the query ```` matches a field in the - :ref:`profiler output `. - - .. note:: - - This argument affects the same setting as the - configuration option :setting:`operationProfiling.filter`. - - When ``filter`` is set, the ``slowms`` and ``sampleRate`` - options are not used for profiling and slow-query log - lines. - - .. versionadded:: 4.4.2 - + When ``filter`` is set, the ``slowms`` and ``sampleRate`` + options are not used for profiling and slow-query log + lines. + + .. versionadded:: 4.4.2 + The :method:`db.getProfilingStatus()` and :method:`db.setProfilingLevel()` :ref:`shell methods ` provide wrappers around the diff --git a/source/reference/command/reIndex.txt b/source/reference/command/reIndex.txt index e11c6e24be9..396ca5e28ce 100644 --- a/source/reference/command/reIndex.txt +++ b/source/reference/command/reIndex.txt @@ -31,25 +31,35 @@ Definition instances. - For most users, the :dbcommand:`reIndex` command is unnecessary. - Use the following syntax: - - .. code-block:: javascript - - { reIndex: } - - The command takes the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 80 - - * - Field - - Description - - * - reIndex - - The name of the collection to reindex. - - :binary:`~bin.mongosh` provides a wrapper :method:`db.collection.reIndex()`. +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + reIndex: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Field + - Description + + * - reIndex + - The name of the collection to reindex. + +:binary:`~bin.mongosh` provides a wrapper :method:`db.collection.reIndex()`. Behavior -------- diff --git a/source/reference/command/refineCollectionShardKey.txt b/source/reference/command/refineCollectionShardKey.txt index f48773e3ff3..bad439bf272 100644 --- a/source/reference/command/refineCollectionShardKey.txt +++ b/source/reference/command/refineCollectionShardKey.txt @@ -46,45 +46,39 @@ Syntax cluster must have :ref:`feature compatibility version (fcv) ` of ``4.4``. -The :dbcommand:`refineCollectionShardKey` command must be run against -the ``admin`` database and has the following form: +The command has the following syntax: .. code-block:: javascript - db.adminCommand( { - refineCollectionShardKey: ".", - key: { , : <1|"hashed">, ... } - } ) + db.adminCommand( + { + refineCollectionShardKey: ".", + key: { , : <1|"hashed">, ... } + } + ) Command Fields -~~~~~~~~~~~~~~ - -The :dbcommand:`refineCollectionShardKey` command has the following fields: +-------------- +The command takes the following fields: .. list-table:: :header-rows: 1 :widths: 20 20 80 * - Field - - Type - - Description * - :ref:`refineCollectionShardKey ` - - string - - .. _refineCollectionShardKey-namespace: The :term:`namespace` of the sharded collection in the form ``"."``. * - :ref:`key ` - - document - - .. _refineCollectionShardKey-key: The document that specifies the field or fields to use as the diff --git a/source/reference/command/refreshSessions.txt b/source/reference/command/refreshSessions.txt index 612f44d66ae..da74b3d15b9 100644 --- a/source/reference/command/refreshSessions.txt +++ b/source/reference/command/refreshSessions.txt @@ -19,20 +19,34 @@ Definition for the specified sessions, thereby extending the active state of the sessions. - :dbcommand:`refreshSessions` has the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { refreshSessions: [ { id : }, ... ] } ) +.. code-block:: javascript - .. include:: /includes/fact-dbcommand.rst + db.runCommand( + { + refreshSessions: [ + { id : }, ... + ] + } + ) - .. |command| replace:: :dbcommand:`refreshSessions` +.. include:: /includes/fact-dbcommand.rst - .. code-block:: javascript +.. |command| replace:: :dbcommand:`refreshSessions` - db.runCommand( { refreshSessions: [ { id : }, ... ] } ) +.. code-block:: javascript + db.runCommand( + { + refreshSessions: [ + { id : }, ... + ] + } + ) Behavior -------- diff --git a/source/reference/command/removeShard.txt b/source/reference/command/removeShard.txt index c6f4bda3b61..dff6cc36ad9 100644 --- a/source/reference/command/removeShard.txt +++ b/source/reference/command/removeShard.txt @@ -10,6 +10,9 @@ removeShard :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: removeShard Removes a shard from a :term:`sharded cluster`. When you run @@ -18,14 +21,17 @@ removeShard drained, MongoDB removes the shard from the cluster. Syntax -------- +------ -To run, from a :binary:`~bin.mongos` instance, issue the command -against the ``admin`` database: +The command has the following syntax: .. code-block:: javascript - db.adminCommand( { removeShard : } ) + db.adminCommand( + { + removeShard : + } + ) Behavior -------- diff --git a/source/reference/command/removeShardFromZone.txt b/source/reference/command/removeShardFromZone.txt index fa6eafc8a1d..f366d2851b0 100644 --- a/source/reference/command/removeShardFromZone.txt +++ b/source/reference/command/removeShardFromZone.txt @@ -26,7 +26,7 @@ Syntax You can only run :dbcommand:`removeShardFromZone` on the ``admin`` database from a :binary:`~bin.mongos` instance. -The :dbcommand:`removeShardFromZone` command has the following syntax: +The command has the following syntax: .. code-block:: javascript @@ -37,41 +37,33 @@ The :dbcommand:`removeShardFromZone` command has the following syntax: } ) -The command takes the following fields: +Command Fields +-------------- +The command takes the following fields: .. list-table:: :header-rows: 1 :widths: 20 20 80 * - Field - - Type - - Description * - :ref:`removeShardFromZone ` - - string - - .. _cmd-removeShardFromZone-shard: The name of the shard from which to remove the :ref:`zone ` association. - - * - :ref:`zone ` - - string - - .. _cmd-removeShardFromZone-zone: The name of the zone whose association with the :ref:`shard ` you want to remove. - - :binary:`~bin.mongosh` provides the helper method :method:`sh.removeShardFromZone()`. diff --git a/source/reference/command/renameCollection.txt b/source/reference/command/renameCollection.txt index c35304fdd2c..e96205c3f35 100644 --- a/source/reference/command/renameCollection.txt +++ b/source/reference/command/renameCollection.txt @@ -22,75 +22,68 @@ Definition Issue the :dbcommand:`renameCollection` command against the :term:`admin database`. - The command takes the following form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { renameCollection: "", +.. code-block:: javascript + + db.runCommand( + { + renameCollection: "", to: "", dropTarget: , writeConcern: , - comment: } - - The command contains the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``renameCollection`` - - - string - - - The :term:`namespace` of the collection to rename. The namespace is a - combination of the database name and the name of the collection. - - * - ``to`` - - - string - - - The new namespace of the collection. If the new namespace specifies a - different database, the :dbcommand:`renameCollection` command copies - the collection to the new database and drops the source collection. - See :ref:`restrictions-on-db-names`. - - * - ``dropTarget`` - - - boolean - - - Optional. If ``true``, :binary:`~bin.mongod` will drop the ``target`` of - :dbcommand:`renameCollection` prior to renaming the collection. The - default value is ``false``. - - - - * - ``writeConcern`` - - - document - - - Optional. A document that expresses the :doc:`write concern ` - for the operation. Omit to use the default write - concern. - - .. include:: /includes/extracts/mongos-operations-wc-rename-collection.rst - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst + comment: + } + ) + +Command Fields +-------------- + +The command contains the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``renameCollection`` + - string + - The :term:`namespace` of the collection to rename. The namespace is a + combination of the database name and the name of the collection. + + * - ``to`` + - string + - The new namespace of the collection. If the new namespace specifies a + different database, the :dbcommand:`renameCollection` command copies + the collection to the new database and drops the source collection. + See :ref:`restrictions-on-db-names`. + + * - ``dropTarget`` + - boolean + - Optional. If ``true``, :binary:`~bin.mongod` will drop the ``target`` of + :dbcommand:`renameCollection` prior to renaming the collection. The + default value is ``false``. + + * - ``writeConcern`` + - document + - Optional. A document that expresses the :doc:`write concern ` + for the operation. Omit to use the default write + concern. - .. versionadded:: 4.4 - - - + .. include:: /includes/extracts/mongos-operations-wc-rename-collection.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Behavior -------- @@ -108,6 +101,13 @@ You can use :dbcommand:`renameCollection` to rename an unsharded collection in a sharded cluster as long as the source and target databases are on the same primary shard. +Time Series Collections +~~~~~~~~~~~~~~~~~~~~~~~ + +You **cannot** use :dbcommand:`renameCollection` to rename a time series +collection. For more information, see :ref:`Time Series Collection Limitations +`. + Existing Target Collection ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/reference/command/replSetAbortPrimaryCatchUp.txt b/source/reference/command/replSetAbortPrimaryCatchUp.txt index 4b1be901146..30dc8f7f34e 100644 --- a/source/reference/command/replSetAbortPrimaryCatchUp.txt +++ b/source/reference/command/replSetAbortPrimaryCatchUp.txt @@ -17,9 +17,17 @@ Definition The ``replSetAbortPrimaryCatchUp`` command forces the elected :term:`primary` member of the replica set to abort sync (catch up) - then complete the transition to primary. The command has the - following prototype form: + then complete the transition to primary. - .. code-block:: javascript +Syntax +------ - { replSetAbortPrimaryCatchUp: 1 } +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + replSetAbortPrimaryCatchUp: 1 + } + ) diff --git a/source/reference/command/replSetFreeze.txt b/source/reference/command/replSetFreeze.txt index 680f0a12a8d..a61b56323ee 100644 --- a/source/reference/command/replSetFreeze.txt +++ b/source/reference/command/replSetFreeze.txt @@ -10,6 +10,9 @@ replSetFreeze :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: replSetFreeze The :dbcommand:`replSetFreeze` command prevents a replica set @@ -18,24 +21,38 @@ replSetFreeze :dbcommand:`replSetStepDown` command to make a different node in the replica set a primary. - The :dbcommand:`replSetFreeze` command uses the following syntax: +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript - .. code-block:: javascript + db.runCommand( + { + replSetFreeze: + } + ) - { replSetFreeze: } +Behavior +-------- - If you want to unfreeze a replica set member before the specified number - of seconds has elapsed, you can issue the command with a seconds - value of ``0``: +If you want to unfreeze a replica set member before the specified number +of seconds has elapsed, you can issue the command with a seconds +value of ``0``: - .. code-block:: javascript +.. code-block:: javascript - { replSetFreeze: 0 } + db.runCommand( + { + replSetFreeze: 0 + } + ) - Restarting the :binary:`~bin.mongod` process also unfreezes a replica - set member. +Restarting the :binary:`~bin.mongod` process also unfreezes a replica +set member. - :dbcommand:`replSetFreeze` is an administrative command, and you - must issue it against the :term:`admin database`. +:dbcommand:`replSetFreeze` is an administrative command, and you +must issue it against the :term:`admin database`. - .. slave-ok, admin-only +.. slave-ok, admin-only diff --git a/source/reference/command/replSetGetConfig.txt b/source/reference/command/replSetGetConfig.txt index 8ee79327b3f..2f7151c7d5c 100644 --- a/source/reference/command/replSetGetConfig.txt +++ b/source/reference/command/replSetGetConfig.txt @@ -22,15 +22,20 @@ Syntax ------ To run, :dbcommand:`replSetGetConfig` must be issued against the -``admin`` database and has the following syntax: +``admin`` database. The command has the following syntax: .. code-block:: javascript - db.adminCommand( { - replSetGetConfig: 1, - commitmentStatus: , - comment: - } ); + db.adminCommand( + { + replSetGetConfig: 1, + commitmentStatus: , + comment: + } + ) + +Command Fields +-------------- .. list-table:: :header-rows: 1 @@ -45,9 +50,7 @@ To run, :dbcommand:`replSetGetConfig` must be issued against the - Any value * - :ref:`commitmentStatus ` - - boolean - - .. _replSetGetConfig-commitmentStatus: Optional. Specify ``true`` to include a :ref:`commitmentStatus @@ -66,9 +69,7 @@ To run, :dbcommand:`replSetGetConfig` must be issued against the .. versionadded:: 4.4 * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst .. versionadded:: 4.4 diff --git a/source/reference/command/replSetGetStatus.txt b/source/reference/command/replSetGetStatus.txt index 5d4e1302b11..5880b0bcd05 100644 --- a/source/reference/command/replSetGetStatus.txt +++ b/source/reference/command/replSetGetStatus.txt @@ -34,7 +34,11 @@ The command has the following syntax: .. code-block:: javascript - db.adminCommand( { replSetGetStatus: 1 } ) + db.adminCommand( + { + replSetGetStatus: 1 + } + ) - Starting in MongoDB 4.2.1 If you run :dbcommand:`replSetGetStatus` or the diff --git a/source/reference/command/replSetInitiate.txt b/source/reference/command/replSetInitiate.txt index 0366f18b81f..7d34696916e 100644 --- a/source/reference/command/replSetInitiate.txt +++ b/source/reference/command/replSetInitiate.txt @@ -10,6 +10,9 @@ replSetInitiate :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: replSetInitiate The :dbcommand:`replSetInitiate` command initializes a new replica set. @@ -23,28 +26,35 @@ replSetInitiate Run the command on only one of the :binary:`~bin.mongod` instances for the replica set. - Use the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: + +.. code-block:: javascript - { replSetInitiate : } + db.runCommand( + { + replSetInitiate : + } + ) - The ```` is a :term:`document` that specifies - the replica set's configuration. For instance, here's a config document - for creating a simple 3-member replica set: +The ```` is a :term:`document` that specifies +the replica set's configuration. For instance, here's a config document +for creating a simple 3-member replica set: - .. code-block:: javascript +.. code-block:: javascript - { - _id : , - members : [ - {_id : 0, host : }, - {_id : 1, host : }, - {_id : 2, host : }, - ] - } + { + _id : , + members : [ + {_id : 0, host : }, + {_id : 1, host : }, + {_id : 2, host : }, + ] + } - .. include:: /includes/important-hostnames.rst +.. include:: /includes/important-hostnames.rst IP Binding ---------- diff --git a/source/reference/command/replSetMaintenance.txt b/source/reference/command/replSetMaintenance.txt index e3504899fe1..571be71f0f0 100644 --- a/source/reference/command/replSetMaintenance.txt +++ b/source/reference/command/replSetMaintenance.txt @@ -19,11 +19,18 @@ Definition maintenance mode for a :term:`secondary` member of a :term:`replica set`. - The command has the following prototype form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { replSetMaintenance: } +.. code-block:: javascript + + db.runCommand( + { + replSetMaintenance: + } + ) Behavior -------- diff --git a/source/reference/command/replSetReconfig.txt b/source/reference/command/replSetReconfig.txt index b96b893647f..64a2cd5d3c3 100644 --- a/source/reference/command/replSetReconfig.txt +++ b/source/reference/command/replSetReconfig.txt @@ -10,6 +10,9 @@ replSetReconfig :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: replSetReconfig The :dbcommand:`replSetReconfig` administrative command modifies the @@ -18,54 +21,62 @@ replSetReconfig members. You must run this command on the ``admin`` database of the :term:`primary` replica set member. - The command has the following syntax: +Syntax +------ + +The command has the following syntax: - .. code-block:: javascript +.. code-block:: javascript - db.adminCommand({ + db.adminCommand( + { replSetReconfig: , force: , maxTimeMS: - }) - - The command takes the following optional field: - - .. list-table:: - :header-rows: 1 - :widths: 20 80 - - * - Field - - Description - - * - .. _replSetReconfig-cmd-force: - - :ref:`force ` - - - Defaults to ``false``. Specify ``true`` to force the - available replica set members to accept the new configuration. - - Force reconfiguration can result in unexpected or - undesired behavior, including :ref:`rollback - ` of :writeconcern:`"majority"` - committed writes. - - * - .. _replSetReconfig-cmd-maxTimeMS: - - :ref:`maxTimeMS ` - - - Optional. Specifies a cumulative time limit in milliseconds - for processing the :dbcommand:`replSetReconfig`. By default, - :dbcommand:`replSetReconfig` waits indefinitely for the - replica configuration to propagate to a majority of replica - set members. Setting ``maxTimeMS`` may result - in the operation failing *before* it can apply the new - configuration. See :ref:`replSetReconfig-cmd-majority-install` - for more information. - - .. versionadded:: 4.4 - - You may also run :dbcommand:`replSetReconfig` with the shell's - :method:`rs.reconfig()` method. + } + ) + +Command Fields +-------------- + +The command takes the following optional field: + +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Field + - Description + + * - .. _replSetReconfig-cmd-force: + + :ref:`force ` + + - Defaults to ``false``. Specify ``true`` to force the + available replica set members to accept the new configuration. + + Force reconfiguration can result in unexpected or + undesired behavior, including :ref:`rollback + ` of :writeconcern:`"majority"` + committed writes. + + * - .. _replSetReconfig-cmd-maxTimeMS: + + :ref:`maxTimeMS ` + + - Optional. Specifies a cumulative time limit in milliseconds + for processing the :dbcommand:`replSetReconfig`. By default, + :dbcommand:`replSetReconfig` waits indefinitely for the + replica configuration to propagate to a majority of replica + set members. Setting ``maxTimeMS`` may result + in the operation failing *before* it can apply the new + configuration. See :ref:`replSetReconfig-cmd-majority-install` + for more information. + + .. versionadded:: 4.4 + +You may also run :dbcommand:`replSetReconfig` with the shell's +:method:`rs.reconfig()` method. .. slave-ok, admin-only diff --git a/source/reference/command/replSetResizeOplog.txt b/source/reference/command/replSetResizeOplog.txt index 29a182c44ed..89a46717e0c 100644 --- a/source/reference/command/replSetResizeOplog.txt +++ b/source/reference/command/replSetResizeOplog.txt @@ -31,80 +31,78 @@ Definition You must run this command against the ``admin`` database. - The command has the following form: +Syntax +------ - .. code-block:: javascript - - db.adminCommand( - { - replSetResizeOplog: , - size: , - minRetentionHours: - } - ) - - :dbcommand:`replSetResizeOplog` takes the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``replSetResizeOplog`` - - - int - - - Set to ``1``. - - * - ``size`` - - - double - - - The maximum size of the oplog in megabytes. - - - The minimum size you can specify is 990 megabytes. +The command has the following form: - - The maximum size you can specify is 1 petabytes. - - - Explicitly cast the ``size`` as a double in - :binary:`~bin.mongosh` with ``Double()``. See - :ref:`oplog-ex-change-size`. - - * - :ref:`minRetentionHours ` - - - double - - - .. _replSetResizeOplog-minRetentionHours: - - *Optional*. The minimum number of hours to preserve an oplog - entry, where decimal values represent the fractions of an - hour. For example, a value of ``1.5`` represents one hour and - thirty minutes. - - The value must be greater than or equal to ``0``. A value of - ``0`` indicates that the :binary:`~bin.mongod` should - truncate the oplog starting with the oldest entries to - maintain the configured maximum oplog size. - - A :binary:`~bin.mongod` configured with - ``minRetentionHours`` only removes an oplog entry *if*: - - - The oplog has reached the maximum configured size, *and* - - - The oplog entry is older that the configured number of - hours based on the host system clock. - - To check the currently configured minimum oplog retention - period, see the - :serverstatus:`oplogTruncation.minRetentionHours` in the - output of the :dbcommand:`serverStatus` command. +.. code-block:: javascript - .. versionadded:: 4.4 + db.adminCommand( + { + replSetResizeOplog: , + size: , + minRetentionHours: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``replSetResizeOplog`` + - int + - Set to ``1``. + + * - ``size`` + - double + - The maximum size of the oplog in megabytes. + + - The minimum size you can specify is 990 megabytes. + + - The maximum size you can specify is 1 petabytes. + + - Explicitly cast the ``size`` as a double in + :binary:`~bin.mongosh` with ``Double()``. See + :ref:`oplog-ex-change-size`. + + * - :ref:`minRetentionHours ` + - double + - .. _replSetResizeOplog-minRetentionHours: + + *Optional*. The minimum number of hours to preserve an oplog + entry, where decimal values represent the fractions of an + hour. For example, a value of ``1.5`` represents one hour and + thirty minutes. + + The value must be greater than or equal to ``0``. A value of + ``0`` indicates that the :binary:`~bin.mongod` should + truncate the oplog starting with the oldest entries to + maintain the configured maximum oplog size. + + A :binary:`~bin.mongod` configured with + ``minRetentionHours`` only removes an oplog entry *if*: + + - The oplog has reached the maximum configured size, *and* + + - The oplog entry is older that the configured number of + hours based on the host system clock. + + To check the currently configured minimum oplog retention + period, see the + :serverstatus:`oplogTruncation.minRetentionHours` in the + output of the :dbcommand:`serverStatus` command. + + .. versionadded:: 4.4 .. seealso:: diff --git a/source/reference/command/replSetStepDown.txt b/source/reference/command/replSetStepDown.txt index 5c10befeb3f..e40796d6b14 100644 --- a/source/reference/command/replSetStepDown.txt +++ b/source/reference/command/replSetStepDown.txt @@ -21,78 +21,70 @@ Description .. include:: /includes/stepdown-intro.rst - The :dbcommand:`replSetStepDown` can only run on the ``admin`` database - and has the following prototype form: - - .. code-block:: javascript - - db.adminCommand( { - replSetStepDown: , - secondaryCatchUpPeriodSecs: , - force: - } ) - - :dbcommand:`replSetStepDown` takes the following fields as arguments: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``replSetStepDown`` - - - number - - - The number of seconds to step down the primary, during which time the - stepdown member is ineligible for becoming primary. If you specify a - non-numeric value, the command uses ``60`` seconds. - - The stepdown period starts from the time that the - :binary:`~bin.mongod` receives the command. The stepdown period must - be greater than the ``secondaryCatchUpPeriodSecs``. - - - - * - ``secondaryCatchUpPeriodSecs`` - - - number - - - Optional. The number of seconds that the :binary:`~bin.mongod` will wait for - an electable secondary to catch up to the primary. - - When specified, ``secondaryCatchUpPeriodSecs`` overrides the default - wait time of either ``10`` seconds or if ``force: true``, ``0`` - seconds. - - - - * - ``force`` - - - boolean - - - Optional. A boolean that determines whether the primary steps down if no electable - and up-to-date secondary exists within the wait period. - - If ``true``, the primary steps down even if no suitable secondary - member exists; this could lead to :doc:`rollbacks - ` if a secondary with replication lag - becomes the new primary. - - If ``false``, the primary does not step down if no suitable secondary - member exists and the command returns an error. - - Defaults to ``false``. - - - + The :dbcommand:`replSetStepDown` can only run on the ``admin`` database. +Syntax +------ +The command has the following syntax: + +.. code-block:: javascript + + db.adminCommand( + { + replSetStepDown: , + secondaryCatchUpPeriodSecs: , + force: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``replSetStepDown`` + - number + - The number of seconds to step down the primary, during which time the + stepdown member is ineligible for becoming primary. If you specify a + non-numeric value, the command uses ``60`` seconds. + + The stepdown period starts from the time that the + :binary:`~bin.mongod` receives the command. The stepdown period must + be greater than the ``secondaryCatchUpPeriodSecs``. + + * - ``secondaryCatchUpPeriodSecs`` + - number + - Optional. The number of seconds that the :binary:`~bin.mongod` will wait for + an electable secondary to catch up to the primary. + + When specified, ``secondaryCatchUpPeriodSecs`` overrides the default + wait time of either ``10`` seconds or if ``force: true``, ``0`` + seconds. + + * - ``force`` + - boolean + - Optional. A boolean that determines whether the primary steps down if no electable + and up-to-date secondary exists within the wait period. + + If ``true``, the primary steps down even if no suitable secondary + member exists; this could lead to :doc:`rollbacks + ` if a secondary with replication lag + becomes the new primary. + + If ``false``, the primary does not step down if no suitable secondary + member exists and the command returns an error. + + Defaults to ``false``. + .. _replSetStepDown-behavior: Behavior diff --git a/source/reference/command/replSetSyncFrom.txt b/source/reference/command/replSetSyncFrom.txt index 1f13df320bb..9178645f2f7 100644 --- a/source/reference/command/replSetSyncFrom.txt +++ b/source/reference/command/replSetSyncFrom.txt @@ -26,40 +26,41 @@ Description Run :dbcommand:`replSetSyncFrom` in the ``admin`` database. - The :dbcommand:`replSetSyncFrom` command has the following form: - - .. code-block:: javascript - - db.adminCommand( { replSetSyncFrom: "hostname<:port>" }) - - The :dbcommand:`replSetSyncFrom` command has the following field: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``replSetSyncFrom`` - - - string - - - The name and port number of the replica set member that this member - should replicate from. Use the ``[hostname]:[port]`` form. - - .. versionchanged:: 3.2 - - .. include:: /includes/fact-voting-node-sync-incompatibility.rst - - - - - +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript + + db.adminCommand( + { + replSetSyncFrom: "hostname<:port>" + } + ) + +Command Fields +-------------- + +The command takes the following field: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``replSetSyncFrom`` + - string + - The name and port number of the replica set member that this member + should replicate from. Use the ``[hostname]:[port]`` form. + + .. versionchanged:: 3.2 + + .. include:: /includes/fact-voting-node-sync-incompatibility.rst + Behavior -------- diff --git a/source/reference/command/reshardCollection.txt b/source/reference/command/reshardCollection.txt index 016cefa28c1..49059bbe054 100644 --- a/source/reference/command/reshardCollection.txt +++ b/source/reference/command/reshardCollection.txt @@ -20,10 +20,14 @@ Definition The :dbcommand:`reshardCollection` command changes the shard key for a collection and changes the distribution of your data. - The command has the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: +.. code-block:: javascript + + db.runCommand( { reshardCollection: ".", key: , @@ -39,82 +43,72 @@ Definition ... ] } - - The command takes the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 25 20 75 - - * - Field - - - Type - - - Description - - * - ``reshardCollection`` - - - string - - - The :term:`namespace` of the collection to be resharded. Takes - the form ``.``. - - * - ``key`` - - - document - - - The document that specifies the new field or fields to use as the - :doc:`shard key `. - - ``{ : <1|"hashed">, ... }`` - - Set the field values to either: - - - ``1`` for :doc:`ranged based sharding ` - - - ``"hashed"`` to specify a - :ref:`hashed shard key `. - - See also :ref:`sharding-shard-key-indexes` - - * - ``unique`` - - - boolean - - - Optional. Specify whether there is a :doc:`uniqueness - ` constraint on the shard key. Only - ``false`` is supported. Defaults to ``false``. - - * - ``numInitialChunks`` - - - integer - - - Optional. Specifies the initial number of chunks to create - across all shards in the cluster when resharding a collection. - The default is the number of chunks that exist for the - collection under the current shard key pattern. MongoDB will - then create and balance chunks across the cluster. The - ``numInitialChunks`` must result in less than ``8192`` per shard. - - * - ``collation`` - - - document - - - Optional. If the collection specified to ``reshardCollection`` - has a default :doc:`collation `, - you *must* include a collation document with - ``{ locale : "simple" }``, or the ``reshardCollection`` - command fails. - - * - ``zones`` - - - array - - - Optional. To maintain or add :ref:`zones `, - specify the zones for your collection in an array. - - The :binary:`~bin.mongosh` provides a wrapper method - :method:`sh.reshardCollection()`. + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 25 20 75 + + * - Field + - Type + - Description + + * - ``reshardCollection`` + - string + - The :term:`namespace` of the collection to be resharded. Takes + the form ``.``. + + * - ``key`` + - document + - The document that specifies the new field or fields to use as the + :doc:`shard key `. + + ``{ : <1|"hashed">, ... }`` + + Set the field values to either: + + - ``1`` for :doc:`ranged based sharding ` + + - ``"hashed"`` to specify a + :ref:`hashed shard key `. + + See also :ref:`sharding-shard-key-indexes` + + * - ``unique`` + - boolean + - Optional. Specify whether there is a :doc:`uniqueness + ` constraint on the shard key. Only + ``false`` is supported. Defaults to ``false``. + + * - ``numInitialChunks`` + - integer + - Optional. Specifies the initial number of chunks to create + across all shards in the cluster when resharding a collection. + The default is the number of chunks that exist for the + collection under the current shard key pattern. MongoDB will + then create and balance chunks across the cluster. The + ``numInitialChunks`` must result in less than ``8192`` per shard. + + * - ``collation`` + - document + - Optional. If the collection specified to ``reshardCollection`` + has a default :doc:`collation `, + you *must* include a collation document with + ``{ locale : "simple" }``, or the ``reshardCollection`` + command fails. + + * - ``zones`` + - array + - Optional. To maintain or add :ref:`zones `, + specify the zones for your collection in an array. + +The :binary:`~bin.mongosh` provides a wrapper method +:method:`sh.reshardCollection()`. Resharding Process ------------------ diff --git a/source/reference/command/revokePrivilegesFromRole.txt b/source/reference/command/revokePrivilegesFromRole.txt index e5f42646b06..1dc83a64163 100644 --- a/source/reference/command/revokePrivilegesFromRole.txt +++ b/source/reference/command/revokePrivilegesFromRole.txt @@ -17,50 +17,60 @@ Definition Removes the specified privileges from the :ref:`user-defined ` role on the database where the - command is run. The :dbcommand:`revokePrivilegesFromRole` command - has the following syntax: + command is run. - .. code-block:: javascript +Syntax +------ +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( { revokePrivilegesFromRole: "", - privileges: - [ - { resource: { }, actions: [ "", ... ] }, - ... - ], + privileges: [ + { resource: { }, actions: [ "", ... ] }, + ... + ], writeConcern: , comment: } + ) - The :dbcommand:`revokePrivilegesFromRole` command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``revokePrivilegesFromRole`` - - string - - The :ref:`user-defined ` role to revoke - privileges from. - * - ``privileges`` - - array - - An array of privileges to remove from the role. See - :data:`~admin.system.roles.privileges` for more information on the - format of the privileges. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 - - +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``revokePrivilegesFromRole`` + - string + - The :ref:`user-defined ` role to revoke + privileges from. + + * - ``privileges`` + - array + - An array of privileges to remove from the role. See + :data:`~admin.system.roles.privileges` for more information on the + format of the privileges. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 + Behavior -------- diff --git a/source/reference/command/revokeRolesFromRole.txt b/source/reference/command/revokeRolesFromRole.txt index f93ac151c4c..892ada8d856 100644 --- a/source/reference/command/revokeRolesFromRole.txt +++ b/source/reference/command/revokeRolesFromRole.txt @@ -15,12 +15,18 @@ Definition .. dbcommand:: revokeRolesFromRole - Removes the specified inherited roles from a role. The - :dbcommand:`revokeRolesFromRole` command has the following syntax: + Removes the specified inherited roles from a role. - .. code-block:: javascript +Syntax +------ - { revokeRolesFromRole: "", +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + revokeRolesFromRole: "", roles: [ { role: "", db: "" } | "", ... @@ -28,34 +34,41 @@ Definition writeConcern: { }, comment: } + ) + +Command Fields +-------------- + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``revokeRolesFromRole`` + - string + - The role from which to remove inherited roles. + + * - ``roles`` + - array + - The inherited roles to remove. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 + - The command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``revokeRolesFromRole`` - - string - - The role from which to remove inherited roles. - * - ``roles`` - - array - - The inherited roles to remove. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 - - - .. |local-cmd-name| replace:: :dbcommand:`revokeRolesFromRole` - .. include:: /includes/fact-roles-array-contents.rst +.. |local-cmd-name| replace:: :dbcommand:`revokeRolesFromRole` +.. include:: /includes/fact-roles-array-contents.rst Required Access --------------- diff --git a/source/reference/command/revokeRolesFromUser.txt b/source/reference/command/revokeRolesFromUser.txt index 5e293756c28..74d2722fc7e 100644 --- a/source/reference/command/revokeRolesFromUser.txt +++ b/source/reference/command/revokeRolesFromUser.txt @@ -16,12 +16,18 @@ Definition .. dbcommand:: revokeRolesFromUser Removes a one or more roles from a user on the database where the - roles exist. The :dbcommand:`revokeRolesFromUser` command uses the - following syntax: + roles exist. - .. code-block:: javascript +Syntax +------ - { revokeRolesFromUser: "", +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + revokeRolesFromUser: "", roles: [ { role: "", db: "" } | "", ... @@ -29,33 +35,40 @@ Definition writeConcern: { }, comment: } - - The command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``revokeRolesFromUser`` - - string - - The user to remove roles from. - * - ``roles`` - - array - - The roles to remove from the user. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 - - .. |local-cmd-name| replace:: :dbcommand:`revokeRolesFromUser` - .. include:: /includes/fact-roles-array-contents.rst + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``revokeRolesFromUser`` + - string + - The user to remove roles from. + + * - ``roles`` + - array + - The roles to remove from the user. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 + +.. |local-cmd-name| replace:: :dbcommand:`revokeRolesFromUser` +.. include:: /includes/fact-roles-array-contents.rst Required Access --------------- diff --git a/source/reference/command/rolesInfo.txt b/source/reference/command/rolesInfo.txt index 9988f3a27d7..e578e5366f3 100644 --- a/source/reference/command/rolesInfo.txt +++ b/source/reference/command/rolesInfo.txt @@ -22,69 +22,60 @@ Definition The :dbcommand:`rolesInfo` command can also retrieve all roles scoped to a database. - To match a single role on the database, use the following form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { +.. code-block:: javascript + + db.runCommand( + { rolesInfo: { role: , db: }, showPrivileges: , showBuiltinRoles: , comment: } + ) - :dbcommand:`rolesInfo` has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``rolesInfo`` - - - string, document, array, or integer - - - The role(s) to return information about. For the syntax for specifying - roles, see :ref:`rolesinfo-behavior`. - - - - * - ``showPrivileges`` - - - boolean - - - Optional. Set the field to ``true`` to show role privileges, including both privileges - inherited from other roles and privileges defined directly. By default, the - command returns only the roles from which this role inherits privileges and - does not return specific privileges. - - - - * - ``showBuiltinRoles`` - - - boolean - - - Optional. When the ``rolesInfo`` field is set to ``1``, set ``showBuiltinRoles`` to - ``true`` to include :ref:`built-in roles ` in the output. - By default this field is set to ``false``, and the output for ``rolesInfo: - 1`` displays only :ref:`user-defined roles `. - - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``rolesInfo`` + - string, document, array, or integer + - The role(s) to return information about. For the syntax for specifying + roles, see :ref:`rolesinfo-behavior`. - .. versionadded:: 4.4 - + * - ``showPrivileges`` + - boolean + - Optional. Set the field to ``true`` to show role privileges, including both privileges + inherited from other roles and privileges defined directly. By default, the + command returns only the roles from which this role inherits privileges and + does not return specific privileges. + + * - ``showBuiltinRoles`` + - boolean + - Optional. When the ``rolesInfo`` field is set to ``1``, set ``showBuiltinRoles`` to + ``true`` to include :ref:`built-in roles ` in the output. + By default this field is set to ``false``, and the output for ``rolesInfo: + 1`` displays only :ref:`user-defined roles `. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + .. _rolesinfo-behavior: Behavior diff --git a/source/reference/command/rotateCertificates.txt b/source/reference/command/rotateCertificates.txt index 73af41afe5a..907acfeffb9 100644 --- a/source/reference/command/rotateCertificates.txt +++ b/source/reference/command/rotateCertificates.txt @@ -23,32 +23,37 @@ Definition certificates defined in the :doc:`configuration file `. - The command takes the following form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { rotateCertificates: 1, - message: "" } +.. code-block:: javascript - The :dbcommand:`rotateCertificates` command takes the following - optional argument: + db.runCommand( + { + rotateCertificates: 1, + message: "" + } + ) - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Parameter - - - Type - - - Description - - * - ``message`` - - - string - - - *optional* A message logged by the server to the log file and - audit file. +Command Fields +-------------- + +The command takes the following optional field: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Parameter + - Type + - Description + + * - ``message`` + - string + - *optional* A message logged by the server to the log file and + audit file. Output ------ @@ -61,15 +66,11 @@ the following field: :widths: 20 20 80 * - Field - - Type - - Description * - ``ok`` - - bool - - Contains the command's execution status. ``true`` on success, or ``false`` if an error occurred. If ``false``, an ``errmsg`` field is additionally provided with a detailed error message. diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 7a81652b535..2bb6f761f47 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -32,7 +32,11 @@ The command has the following syntax: .. code-block:: javascript - db.runCommand( { serverStatus: 1 } ) + db.runCommand( + { + serverStatus: 1 + } + ) The value (i.e. ``1`` above) does not affect the operation of the command. The ``db.serverStatus()`` command returns a large amount of @@ -1445,8 +1449,9 @@ network "clientsRunning" : , "clientsWaitingForData" : } - } - }, + }, + "listenerProcessingTime" : { durationMicros: } // Added in MongoDB 6.1 + } .. serverstatus:: network @@ -1626,6 +1631,22 @@ network Number of clients using the ``fixed`` service executor that are waiting for incoming data from the network. +.. serverstatus:: network.listenerProcessingTime + + .. versionadded:: 6.1 + + A document that reports the total time the database listener spends + allocating incoming database connection requests to dedicated + threads. + +.. serverstatus:: network.listenerProcessingTime.durationMicros + + .. versionadded:: 6.1 + + Total time in microseconds the database listener spends allocating + incoming database connection requests to dedicated threads that + perform database operations. + opLatencies ~~~~~~~~~~~ diff --git a/source/reference/command/setAllowMigrations.txt b/source/reference/command/setAllowMigrations.txt index 25655a26347..53ff9bfae4c 100644 --- a/source/reference/command/setAllowMigrations.txt +++ b/source/reference/command/setAllowMigrations.txt @@ -21,55 +21,59 @@ Definition from committing, and excludes the collection from new balancer rounds. - The command has the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - db.adminCommand( { - setAllowMigrations: ".", - allowMigrations: - } ) - - The command takes the following parameters: - - .. list-table:: - :header-rows: 1 - :widths: 20 20 60 - - * - Field - - Type - - Description - - * - :ref:`setAllowMigrations ` - - - ``string`` - - - .. _setAllowMigrations-cmd-coll: - - The collection to modify. - - * - :ref:`allowMigrations ` - - - ``boolean`` - - - .. _setAllowMigrations-cmd-flag: - - If ``false``: - - - MongoDB prevents new :ref:`automatic migrations - ` on the collection - - in-flight :ref:`manual migrations - ` will not be committed - - the collection will be excluded from new balancer rounds - - If ``true``: - - - MongoDB allows new :ref:`automatic migrations - ` on the collection - - in-flight :ref:`manual migrations - ` will be committed - - the collection will be included in new balancer rounds +.. code-block:: javascript + db.adminCommand( + { + setAllowMigrations: ".", + allowMigrations: + } + ) + +Command Fields +-------------- + +The command takes the following parameters: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - :ref:`setAllowMigrations ` + - ``string`` + - .. _setAllowMigrations-cmd-coll: + + The collection to modify. + + * - :ref:`allowMigrations ` + - ``boolean`` + - .. _setAllowMigrations-cmd-flag: + + If ``false``: + + - MongoDB prevents new :ref:`automatic migrations + ` on the collection + - in-flight :ref:`manual migrations + ` will not be committed + - the collection will be excluded from new balancer rounds + + If ``true``: + + - MongoDB allows new :ref:`automatic migrations + ` on the collection + - in-flight :ref:`manual migrations + ` will be committed + - the collection will be included in new balancer rounds + Behavior -------- diff --git a/source/reference/command/setAuditConfig.txt b/source/reference/command/setAuditConfig.txt index 136b7100fdf..9205d606a3c 100644 --- a/source/reference/command/setAuditConfig.txt +++ b/source/reference/command/setAuditConfig.txt @@ -20,38 +20,51 @@ Definition :dbcommand:`setAuditConfig` is an administrative command that sets new audit configurations for :binary:`~bin.mongod` and :binary:`~bin.mongos` server instances at runtime. + + Use the :method:`db.adminCommand( { command } )` + method to run :dbcommand:`setAuditConfig` against the ``admin`` + database. - The command syntax is: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { setAuditConfig: 1, filter: , auditAuthorizationSuccess: } - - :dbcommand:`setAuditConfig` has the following fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - - * - ``setAuditConfig`` - - integer - - Run :dbcommand:`setAuditConfig` - - * - ``filter`` - - document - - An :doc:`audit filter ` +.. code-block:: javascript - * - ``auditAuthorizationSuccess`` - - boolean - - Log all, or only failed access authorizations + db.adminCommand( + { + setAuditConfig: 1, + filter: , + auditAuthorizationSuccess: + } + ) - Use the - :method:`db.adminCommand( { command } )` method - to run :dbcommand:`setAuditConfig` against the ``admin`` database. +Command Fields +-------------- + +The command has the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``setAuditConfig`` + - integer + - Run :dbcommand:`setAuditConfig` + + * - ``filter`` + - document + - An :doc:`audit filter ` + + * - ``auditAuthorizationSuccess`` + - boolean + - Log all, or only failed access authorizations + Behavior -------- diff --git a/source/reference/command/setClusterParameter.txt b/source/reference/command/setClusterParameter.txt index cb7e3f98019..1506f6bbc26 100644 --- a/source/reference/command/setClusterParameter.txt +++ b/source/reference/command/setClusterParameter.txt @@ -29,10 +29,14 @@ Syntax .. code-block:: javascript - db.adminCommand( { setClusterParameter: { : } } ) + db.adminCommand( + { + setClusterParameter: { : } + } + ) For the available cluster parameters, including examples, see -:ref:``. +:ref:`cluster-parameters`. Behavior -------- diff --git a/source/reference/command/setDefaultRWConcern.txt b/source/reference/command/setDefaultRWConcern.txt index 1d5fe2dc48b..5772c1b2811 100644 --- a/source/reference/command/setDefaultRWConcern.txt +++ b/source/reference/command/setDefaultRWConcern.txt @@ -28,120 +28,114 @@ Definition - For sharded clusters, issue the :dbcommand:`setDefaultRWConcern` on a :binary:`~bin.mongos`. - :dbcommand:`setDefaultRWConcern` has the following form: - - .. code-block:: javascript - - db.adminCommand( - { - setDefaultRWConcern : 1, - defaultReadConcern: { }, - defaultWriteConcern: { }, - writeConcern: { }, - comment: - } - ) +Syntax +------ - :dbcommand:`setDefaultRWConcern` has the following fields: +The command has the following syntax: - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - :ref:`setDefaultRWConcern ` - - - ``int`` - - - .. _setDefaultRWConcern-cmd-setDefaultRWConcern: - - Set to ``1``. - - * - :ref:`defaultReadConcern ` - - - ``object`` - - - .. _setDefaultRWConcern-cmd-defaultReadConcern: - - Document containing the global read concern configuration. - Specify a valid :ref:`read concern object - `. - - - :dbcommand:`setDefaultRWConcern` supports the - following subset of :ref:`level `: - - - :readconcern:`"local"` - - :readconcern:`"available"` - - :readconcern:`"majority"` - - - To unset the currently configured default read concern, - specify an empty document ``{}``. - - - :dbcommand:`setDefaultRWConcern` only supports the - ``levels`` read concern setting. - You cannot specify any other read concern setting in the - default read concern. - - Omit this document to leave the current global read concern - unmodified. If omitted, :dbcommand:`setDefaultRWConcern` must - specify :ref:`defaultWriteConcern - `. - - * - :ref:`defaultWriteConcern ` - - - ``object`` - - - .. _setDefaultRWConcern-cmd-defaultWriteConcern: - - Document containing the global default write concern - configuration. - - - For the write concern :ref:`w ` setting, - :dbcommand:`setDefaultRWConcern` supports all - write concern values *except* ``w : 0``. - - - For the write concern :ref:`wtimeout ` setting, - :dbcommand:`setDefaultRWConcern` defaults to ``0`` if the - setting is omitted. Operations block until the requested - write concern is met. If specifying a global default - ``wtimeout``, ensure the value is large enough to allow - write operations to achieve the requested write concern. - - - To unset the currently configured write concern, specify - an empty document ``{}``. - - Omit this document to leave the current global write concern - unmodified. If omitted, :dbcommand:`setDefaultRWConcern` must - specify :ref:`defaultReadConcern - `. - - * - :ref:`writeConcern ` - - - object - - - .. _setDefaultRWConcern-cmd-writeConcern: - - Optional. A document that specifies the - :ref:`write concern ` to be used by the - :dbcommand:`setDefaultRWConcern` command itself. - - If omitted, :dbcommand:`setDefaultRWConcern` uses the - previously set global default write concern *if* one - was configured. - - * - ``comment`` - - - any +.. code-block:: javascript - - .. include:: /includes/extracts/comment-content.rst + db.adminCommand( + { + setDefaultRWConcern : 1, + defaultReadConcern: { }, + defaultWriteConcern: { }, + writeConcern: { }, + comment: + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 25 15 60 + + * - Field + - Type + - Description + + * - :ref:`setDefaultRWConcern ` + - ``int`` + - .. _setDefaultRWConcern-cmd-setDefaultRWConcern: + + Set to ``1``. + + * - :ref:`defaultReadConcern ` + - ``object`` + - .. _setDefaultRWConcern-cmd-defaultReadConcern: + + Document containing the global read concern configuration. + Specify a valid :ref:`read concern object + `. + + - :dbcommand:`setDefaultRWConcern` supports the + following subset of :ref:`level `: + + - :readconcern:`"local"` + - :readconcern:`"available"` + - :readconcern:`"majority"` - .. versionadded:: 4.4 - + - To unset the currently configured default read concern, + specify an empty document ``{}``. + + - :dbcommand:`setDefaultRWConcern` only supports the + ``levels`` read concern setting. + You cannot specify any other read concern setting in the + default read concern. + + Omit this document to leave the current global read concern + unmodified. If omitted, :dbcommand:`setDefaultRWConcern` must + specify :ref:`defaultWriteConcern + `. + + * - :ref:`defaultWriteConcern ` + - ``object`` + - .. _setDefaultRWConcern-cmd-defaultWriteConcern: + + Document containing the global default write concern + configuration. + + - For the write concern :ref:`w ` setting, + :dbcommand:`setDefaultRWConcern` supports all + write concern values *except* ``w : 0``. + + - For the write concern :ref:`wc-wtimeout` setting, + :dbcommand:`setDefaultRWConcern` defaults to ``0`` if the + setting is omitted. Operations block until the requested + write concern is met. If specifying a global default + ``wtimeout``, ensure the value is large enough to allow + write operations to achieve the requested write concern. + + - To unset the currently configured write concern, specify + an empty document ``{}``. + + Omit this document to leave the current global write concern + unmodified. If omitted, :dbcommand:`setDefaultRWConcern` must + specify :ref:`defaultReadConcern + `. + + * - :ref:`writeConcern ` + - object + - .. _setDefaultRWConcern-cmd-writeConcern: + + Optional. A document that specifies the + :ref:`write concern ` to be used by the + :dbcommand:`setDefaultRWConcern` command itself. + + If omitted, :dbcommand:`setDefaultRWConcern` uses the + previously set global default write concern *if* one + was configured. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + :dbcommand:`setDefaultRWConcern` returns an object that contains the currently configured global default read and write concern. See :dbcommand:`getDefaultRWConcern` for more complete documentation on diff --git a/source/reference/command/setFeatureCompatibilityVersion.txt b/source/reference/command/setFeatureCompatibilityVersion.txt index 8e24644a2de..c047a52ffe7 100644 --- a/source/reference/command/setFeatureCompatibilityVersion.txt +++ b/source/reference/command/setFeatureCompatibilityVersion.txt @@ -34,16 +34,21 @@ Definition Syntax ------ -The command takes the following form: +The command has the following syntax: .. code-block:: javascript - db.adminCommand( { - setFeatureCompatibilityVersion: , - writeConcern: { wtimeout: } - } ) + db.adminCommand( + { + setFeatureCompatibilityVersion: , + writeConcern: { wtimeout: } + } + ) -The values for the ``version`` are: +Command Fields +-------------- + +The possible values for ``version`` are: .. list-table:: :header-rows: 1 @@ -53,28 +58,24 @@ The values for the ``version`` are: - Description * - ``"6.0"`` - - *Available on MongoDB 6.0 Deployments* Enables the :ref:`6.0 features that persist data incompatible with MongoDB 5.0 <6.0-downgrade-considerations>`. * - ``"5.0"`` - - *Available on MongoDB 5.0 Deployments* Enables the :ref:`5.0 features that persist data incompatible with MongoDB 4.4 <5.0-compatibility-enabled>`. * - ``"4.4"`` - - *Available on MongoDB 4.4 and 5.0 Deployments* Enables the :ref:`4.4 features that persist data incompatible with MongoDB 4.2 <4.4-compatibility-enabled>`. * - ``"4.2"`` - - *Available on MongoDB 4.2 and 4.4 Deployments* Enables the :ref:`4.2 features that persist data incompatible diff --git a/source/reference/command/setFreeMonitoring.txt b/source/reference/command/setFreeMonitoring.txt index 3ae2d558f75..4a3b0eac1b5 100644 --- a/source/reference/command/setFreeMonitoring.txt +++ b/source/reference/command/setFreeMonitoring.txt @@ -10,6 +10,9 @@ setFreeMonitoring :depth: 1 :class: singlecol +Definition +---------- + .. dbcommand:: setFreeMonitoring .. versionadded:: 4.0 @@ -19,11 +22,7 @@ setFreeMonitoring Enables or disables :doc:`free Cloud monitoring ` for standalones and replica sets. - The command is run against the ``admin`` database and has the form: - - .. code-block:: javascript - - db.adminCommand( { setFreeMonitoring: 1, action: "" } ) + The command is run against the ``admin`` database. .. important:: @@ -31,25 +30,42 @@ setFreeMonitoring :option:`--enableFreeMonitoring ` command-line option or :setting:`cloud.monitoring.free.state` configuration file set to ``runtime``. - + Otherwise, you can only enable or disable at startup. See :option:`--enableFreeMonitoring ` command-line option or :setting:`cloud.monitoring.free.state` for details. - Once enabled, the free monitoring state remains enabled until - explicitly disabled. That is, you do not need to re-enable each time - you start the server. +Syntax +------ + +The command has the following syntax: + +.. code-block:: javascript + + db.adminCommand( + { + setFreeMonitoring: 1, + action: "" + } + ) + +Behavior +-------- + +Once enabled, the free monitoring state remains enabled until +explicitly disabled. That is, you do not need to re-enable each time +you start the server. + +:binary:`~bin.mongosh` provides the following helper methods +for :dbcommand:`setFreeMonitoring`: - :binary:`~bin.mongosh` provides the following helper methods - for :dbcommand:`setFreeMonitoring`: +- :method:`db.enableFreeMonitoring()` - - :method:`db.enableFreeMonitoring()` +- :method:`db.disableFreeMonitoring()` - - :method:`db.disableFreeMonitoring()` - - You can use :method:`db.getFreeMonitoringStatus()` to check your - free monitoring status. +You can use :method:`db.getFreeMonitoringStatus()` to check your +free monitoring status. Access Control -------------- diff --git a/source/reference/command/setIndexCommitQuorum.txt b/source/reference/command/setIndexCommitQuorum.txt index 5b65183f671..4f60b24f603 100644 --- a/source/reference/command/setIndexCommitQuorum.txt +++ b/source/reference/command/setIndexCommitQuorum.txt @@ -19,97 +19,97 @@ setIndexCommitQuorum :ref:`simultaneous index build ` before the primary marks those indexes as ready. - The command has the following syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - db.runCommand({ +.. code-block:: javascript + + db.runCommand( + { setIndexCommitQuorum: , indexNames: [ ], commitQuorum: | , comment: - }) - - The command takes the following parameters: - - .. list-table:: - :header-rows: 1 - :widths: 20 20 60 - - * - Field - - Type - - Description - - * - :ref:`setIndexCommitQuorum ` - - - ``string`` - - - .. _setIndexCommitQuorum-cmd-coll: - - The name of the collection for which the indexes are being - built. - - * - :ref:`indexNames ` - - - ``array`` - - - .. _setIndexCommitQuorum-cmd-indexNames: - - An array of in-progress index builds to modify. Each - element of the array must be the *name* of the index. - - The indexes specified to ``indexNames`` must be the entire set - of in-progress builds associated to a given index builder, - i.e. the indexes built by a single :dbcommand:`createIndexes` - or :method:`db.collection.createIndexes()` operation. - - * - :ref:`commitQuorum ` - - - ``int`` or ``string`` - - - .. _setIndexCommitQuorum-cmd-commitQuorum: - - The minimum number of data-bearing replica - set members (i.e. commit quorum), including the primary, that - must report a successful :ref:`index build - ` before the primary - marks the ``indexes`` as ready. - - Starting in MongoDB v5.0, it's possible to resume some - :ref:`interupted index builds` - when the commit quorum is set to ``"votingMembers"``. - - Replica set nodes in a commit quorum must have :rsconf:`members[n].buildIndexes` - set to ``true``. If any voting nodes have ``members[n].buildIndexes`` - set to ``false``, you can't use the default ``"votingMembers"`` commit - quorum. Either configure all nodes with ``members[n].buildIndexes`` - set to ``true``, or select a different commit quorum. - - Supports the following values: - - - ``"votingMembers"`` - all data-bearing voting replica set - members (*Default*). A "voting" member is any replica set member - where :rsconf:`members[n].votes` is greater than ``0``. - - - ``"majority"`` - a simple majority of data-bearing - replica set members. - - - ```` - a specific number of data-bearing - replica set members. Specify an integer greater than - ``0``. - - - A replica set :doc:`tag name - `. - - - * - ``comment`` - - - any + } + ) - - .. include:: /includes/extracts/comment-content.rst +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 60 + + * - Field + - Type + - Description + + * - :ref:`setIndexCommitQuorum ` + - ``string`` + - .. _setIndexCommitQuorum-cmd-coll: - .. versionadded:: 4.4 - + The name of the collection for which the indexes are being + built. + + * - :ref:`indexNames ` + - ``array`` + - .. _setIndexCommitQuorum-cmd-indexNames: + + An array of in-progress index builds to modify. Each + element of the array must be the *name* of the index. + + The indexes specified to ``indexNames`` must be the entire set + of in-progress builds associated to a given index builder, + i.e. the indexes built by a single :dbcommand:`createIndexes` + or :method:`db.collection.createIndexes()` operation. + + * - :ref:`commitQuorum ` + - ``int`` or ``string`` + - .. _setIndexCommitQuorum-cmd-commitQuorum: + + The minimum number of data-bearing replica + set members (i.e. commit quorum), including the primary, that + must report a successful :ref:`index build + ` before the primary + marks the ``indexes`` as ready. + + Starting in MongoDB v5.0, it's possible to resume some + :ref:`interupted index builds` + when the commit quorum is set to ``"votingMembers"``. + + Replica set nodes in a commit quorum must have :rsconf:`members[n].buildIndexes` + set to ``true``. If any voting nodes have ``members[n].buildIndexes`` + set to ``false``, you can't use the default ``"votingMembers"`` commit + quorum. Either configure all nodes with ``members[n].buildIndexes`` + set to ``true``, or select a different commit quorum. + + Supports the following values: + + - ``"votingMembers"`` - all data-bearing voting replica set + members (*Default*). A "voting" member is any replica set member + where :rsconf:`members[n].votes` is greater than ``0``. + + - ``"majority"`` - a simple majority of data-bearing + replica set members. + + - ```` - a specific number of data-bearing + replica set members. Specify an integer greater than + ``0``. + + - A replica set :doc:`tag name + `. + + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Behavior -------- diff --git a/source/reference/command/setParameter.txt b/source/reference/command/setParameter.txt index 65c90119a7b..b51ba94fa48 100644 --- a/source/reference/command/setParameter.txt +++ b/source/reference/command/setParameter.txt @@ -18,15 +18,23 @@ Definition :dbcommand:`setParameter` is an administrative command for modifying options normally set on the command line. You must issue - the :dbcommand:`setParameter` command against the :term:`admin database` - in the form: + the :dbcommand:`setParameter` command against the :term:`admin + database`. - .. code-block:: javascript +Syntax +------ - db.adminCommand( { setParameter: 1, : } ) +.. code-block:: javascript - For the available parameters, including examples, see - :doc:`/reference/parameters`. + db.adminCommand( + { + setParameter: 1, + : + } + ) + +For the available parameters, including examples, see +:doc:`/reference/parameters`. .. _setParameter-commands-not-persistent: diff --git a/source/reference/command/setUserWriteBlockMode.txt b/source/reference/command/setUserWriteBlockMode.txt index 49e0d51b22b..5935c021267 100644 --- a/source/reference/command/setUserWriteBlockMode.txt +++ b/source/reference/command/setUserWriteBlockMode.txt @@ -29,19 +29,22 @@ Definition block and continue to perform writes. Syntax -------- +------ -The ``setUserWriteBlockMode`` command has the following syntax: +The command has the following syntax: -.. code-block:: text +.. code-block:: javascript db.adminCommand( { - setUserWriteBlockMode: 1, - global: + setUserWriteBlockMode: 1, + global: } ) +Command Fields +-------------- + The command takes the following fields: .. list-table:: diff --git a/source/reference/command/shardCollection.txt b/source/reference/command/shardCollection.txt index ae9adac893f..3b1f9c1fa16 100644 --- a/source/reference/command/shardCollection.txt +++ b/source/reference/command/shardCollection.txt @@ -26,169 +26,154 @@ Definition Starting in MongoDB 6.0, sharding a collection does **not** require you to first run the :dbcommand:`enableSharding` command to configure the database. - .. |command| replace:: :dbcommand:`shardCollection` +Syntax +------ - .. include:: /includes/fact-dbcommand.rst +.. |command| replace:: :dbcommand:`shardCollection` - :dbcommand:`shardCollection` has the following form: +.. include:: /includes/fact-dbcommand.rst - .. code-block:: javascript +The command has the following form: +.. code-block:: javascript + + db.adminCommand( { - shardCollection: ".", - key: { : <1|"hashed">, ... }, - unique: , - numInitialChunks: , - presplitHashedZones: , - collation: { locale: "simple" }, - timeseries: + shardCollection: ".", + key: { : <1|"hashed">, ... }, + unique: , + numInitialChunks: , + presplitHashedZones: , + collation: { locale: "simple" }, + timeseries: } + ) - :dbcommand:`shardCollection` has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``shardCollection`` - - - string - - - The :term:`namespace` of the collection to shard in the form - ``.``. - - - - * - ``key`` - - - document - - - The document that specifies the field or fields to use as the - :doc:`shard key `. - - ``{ : <1|"hashed">, ... }`` - - Set the field values to either: - - - ``1`` for :doc:`ranged based sharding ` - - - ``"hashed"`` to specify a - :ref:`hashed shard key `. - - :doc:`shard key ` must be - supported by an index. Unless the collection is empty, the - index must exist prior to the :dbcommand:`shardCollection` - command. If the collection is empty, MongoDB creates the - index prior to sharding the collection if the index that can - support the shard key does not already exist. - - See also :ref:`sharding-shard-key-indexes` - - - - * - ``unique`` - - - boolean - - - Specify ``true`` to ensure that the underlying index - enforces a unique constraint. Defaults to ``false``. - - You cannot specify ``true`` when using :ref:`hashed shard keys - `. - - * - ``numInitialChunks`` - - - integer - - - Specifies the initial number of chunks to create across all shards in - the cluster when sharding an *empty* collection with a - :ref:`hashed shard key `. MongoDB - will then create and balance chunks across the cluster. The - ``numInitialChunks`` must result in less than ``8192`` per shard. - - If the collection is not empty or the shard key does not - contain a hashed field, the operation returns an error. - - - If sharding with :ref:`presplitHashedZones: true - `, - MongoDB attempts to evenly distribute the specified - number of chunks across the zones in the cluster. - - - If sharding with :ref:`presplitHashedZones: false - ` or omitted and - no zones and zone ranges are defined for the empty - collection, MongoDB attempts to evenly distributed the - specified number of chunks across the shards in the cluster. - - - If sharding with :ref:`presplitHashedZones: false - ` or omitted and - zones and zone ranges have been defined for the empty - collection, ``numInitChunks`` has no effect. - - .. versionchanged:: 4.4 - - - * - ``collation`` - - - document - - - Optional. If the collection specified to ``shardCollection`` - has a default :doc:`collation `, - you *must* include a collation document with - ``{ locale : "simple" }``, or - the ``shardCollection`` command fails. At least one of the indexes - whose fields support the shard key pattern must have the simple - collation. - - - * - :ref:`presplitHashedZones - ` - - - boolean - - - .. _cmd-shard-collection-presplitHashedZones: - - Optional. Specify ``true`` to perform initial chunk creation - and distribution for an empty or non-existing collection based - on the defined zones and zone ranges for the collection. For - :ref:`hashed sharding ` only. - - ``shardCollection`` with ``presplitHashedZones: true`` returns - an error if any of the following are true: - - - The shard key does not contain a hashed field - (i.e. is not a :ref:`single field hashed index - ` or :ref:`compound hashed index - `). - - - The collection has no defined zones or zone ranges. - - - The defined zone range or ranges do not meet the - :ref:`requirements - `. - - .. versionadded:: 4.4 - - * - :ref:`timeseries ` - - - object - - - .. _cmd-shard-collection-timeseries: - - .. include:: /includes/time-series/fact-timeseries-param-desc.rst - - For detailed syntax, see - :ref:`cmd-sharded-time-series-collection-options`. +Command Fields +-------------- - .. versionadded:: 5.1 +The command takes the following fields: +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``shardCollection`` + - string + - The :term:`namespace` of the collection to shard in the form + ``.``. + + * - ``key`` + - document + - The document that specifies the field or fields to use as the + :doc:`shard key `. + + ``{ : <1|"hashed">, ... }`` + + Set the field values to either: + + - ``1`` for :doc:`ranged based sharding ` + + - ``"hashed"`` to specify a + :ref:`hashed shard key `. + + :doc:`shard key ` must be + supported by an index. Unless the collection is empty, the + index must exist prior to the :dbcommand:`shardCollection` + command. If the collection is empty, MongoDB creates the + index prior to sharding the collection if the index that can + support the shard key does not already exist. + + See also :ref:`sharding-shard-key-indexes` + + * - ``unique`` + - boolean + - Specify ``true`` to ensure that the underlying index + enforces a unique constraint. Defaults to ``false``. + + You cannot specify ``true`` when using :ref:`hashed shard keys + `. + + * - ``numInitialChunks`` + - integer + - Specifies the initial number of chunks to create across all shards in + the cluster when sharding an *empty* collection with a + :ref:`hashed shard key `. MongoDB + will then create and balance chunks across the cluster. The + ``numInitialChunks`` must result in less than ``8192`` per shard. + + If the collection is not empty or the shard key does not + contain a hashed field, the operation returns an error. + + - If sharding with :ref:`presplitHashedZones: true + `, + MongoDB attempts to evenly distribute the specified + number of chunks across the zones in the cluster. + + - If sharding with :ref:`presplitHashedZones: false + ` or omitted and + no zones and zone ranges are defined for the empty + collection, MongoDB attempts to evenly distributed the + specified number of chunks across the shards in the cluster. + + - If sharding with :ref:`presplitHashedZones: false + ` or omitted and + zones and zone ranges have been defined for the empty + collection, ``numInitChunks`` has no effect. + + .. versionchanged:: 4.4 + + * - ``collation`` + - document + - Optional. If the collection specified to ``shardCollection`` + has a default :doc:`collation `, + you *must* include a collation document with + ``{ locale : "simple" }``, or + the ``shardCollection`` command fails. At least one of the indexes + whose fields support the shard key pattern must have the simple + collation. + + * - :ref:`presplitHashedZones + ` + - boolean + - .. _cmd-shard-collection-presplitHashedZones: + + Optional. Specify ``true`` to perform initial chunk creation + and distribution for an empty or non-existing collection based + on the defined zones and zone ranges for the collection. For + :ref:`hashed sharding ` only. + + ``shardCollection`` with ``presplitHashedZones: true`` returns + an error if any of the following are true: + + - The shard key does not contain a hashed field + (i.e. is not a :ref:`single field hashed index + ` or :ref:`compound hashed index + `). + + - The collection has no defined zones or zone ranges. + + - The defined zone range or ranges do not meet the + :ref:`requirements + `. + + .. versionadded:: 4.4 + + * - :ref:`timeseries ` + - object + - .. _cmd-shard-collection-timeseries: + + .. include:: /includes/time-series/fact-timeseries-param-desc.rst + + For detailed syntax, see + :ref:`cmd-sharded-time-series-collection-options`. + + .. versionadded:: 5.1 + .. _cmd-sharded-time-series-collection-options: Time Series Options diff --git a/source/reference/command/shardingState.txt b/source/reference/command/shardingState.txt index dbb4dfbcf0f..f4a09cbe7bb 100644 --- a/source/reference/command/shardingState.txt +++ b/source/reference/command/shardingState.txt @@ -14,15 +14,21 @@ shardingState :dbcommand:`shardingState` is an admin command that reports if :binary:`~bin.mongod` is a member of a :term:`sharded cluster`. + To run the command, you must run against the ``admin`` database. i + See :method:`db.adminCommand()`. - :dbcommand:`shardingState` has the following prototype form: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - { shardingState: 1 } +.. code-block:: javascript - To run the command, you must run against the ``admin`` database. See - :method:`db.adminCommand()`. + db.adminCommand( + { + shardingState: 1 + } + ) Behavior -------- diff --git a/source/reference/command/shutdown.txt b/source/reference/command/shutdown.txt index 2cd7bda8c0d..6853a4198fd 100644 --- a/source/reference/command/shutdown.txt +++ b/source/reference/command/shutdown.txt @@ -18,67 +18,71 @@ shutdown and then terminates the process. You must issue the :dbcommand:`shutdown` command against the :term:`admin database`. - The command has this syntax: +Syntax +------ - .. code-block:: javascript +The command has the following syntax: - db.adminCommand({ +.. code-block:: javascript + + db.adminCommand( + { shutdown: 1, force: timeoutSecs: , comment: - }) - - The command takes these fields: - - .. list-table:: - :header-rows: 1 - :widths: 20 80 - - * - Field - - Description - - * - :ref:`shutdown ` - - - .. _shutdown-cmd-shutdown: - - Specify ``1``. - - * - :ref:`force ` - - - .. _shutdown-cmd-force: - - Optional. Specify ``true`` to force the :binary:`~bin.mongod` - or :binary:`~bin.mongos` to shut down. Force shutdown - interrupts any ongoing operations on the :binary:`~bin.mongod` - or :binary:`~bin.mongos` and may result in unexpected - behavior. + } + ) - * - :ref:`timeoutSecs ` - - - .. _shutdown-cmd-timeoutSecs: - - Optional. - - .. _shutdown-cmd-quiesce-period: - - .. |force| replace:: :ref:`force ` - .. |timeout| replace:: :ref:`timeoutSecs ` - - .. include:: /includes/quiesce-period.rst - - In MongoDB 4.4 and earlier, for a :binary:`~bin.mongod` - :term:`primary`, :ref:`timeoutSecs ` - is the number of seconds the :term:`primary` should wait for a - secondary to catch up. If no secondaries catch up within the - specified time, the command fails. Defaults to ``10`` seconds. - - * - ``comment`` +Command Fields +-------------- - - .. include:: /includes/extracts/comment-content.rst +The command takes these fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Field + - Description + + * - :ref:`shutdown ` + + - .. _shutdown-cmd-shutdown: - .. versionadded:: 4.4 - + Specify ``1``. + + * - :ref:`force ` + - .. _shutdown-cmd-force: + + Optional. Specify ``true`` to force the :binary:`~bin.mongod` + or :binary:`~bin.mongos` to shut down. Force shutdown + interrupts any ongoing operations on the :binary:`~bin.mongod` + or :binary:`~bin.mongos` and may result in unexpected + behavior. + + * - :ref:`timeoutSecs ` + - .. _shutdown-cmd-timeoutSecs: + + Optional. + + .. _shutdown-cmd-quiesce-period: + + .. |force| replace:: :ref:`force ` + .. |timeout| replace:: :ref:`timeoutSecs ` + + .. include:: /includes/quiesce-period.rst + + In MongoDB 4.4 and earlier, for a :binary:`~bin.mongod` + :term:`primary`, :ref:`timeoutSecs ` + is the number of seconds the :term:`primary` should wait for a + secondary to catch up. If no secondaries catch up within the + specified time, the command fails. Defaults to ``10`` seconds. + + * - ``comment`` + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 + .. seealso:: :method:`db.shutdownServer()` diff --git a/source/reference/command/split.txt b/source/reference/command/split.txt index 4b41669316c..940a09223d6 100644 --- a/source/reference/command/split.txt +++ b/source/reference/command/split.txt @@ -27,79 +27,66 @@ Definition these circumstances, and on the MongoDB shell commands that wrap :dbcommand:`split`. - The :dbcommand:`split` command must be run in the ``admin`` database - and uses the following form: - - .. code-block:: javascript - - db.adminCommand( { split: ., - } ) - - The :dbcommand:`split` command takes a document with the following - fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - - Description - - * - ``split`` - - - string - - - The name of the :term:`collection` where the :term:`chunk` exists. - Specify the collection's full :term:`namespace`, including the - database name. - - - - * - ``find`` - - - document - - - An query statement that specifies an equality match on the shard - key. The match selects the chunk that contains the specified - document. You must specify only one of the following: ``find``, - ``bounds``, or ``middle``. - - You cannot use the ``find`` option on an empty collection. - - - - * - ``bounds`` - - - array - - - New in version 2.4: The bounds of a chunk to split. ``bounds`` - applies to chunks in collections partitioned using a :term:`hashed - shard key`. The parameter's array must consist of two documents - specifying the lower and upper shard-key values of the chunk. The - values must match the minimum and maximum values of an existing - chunk. Specify only one of the following: ``find``, ``bounds``, or - ``middle``. - - You cannot use the ``bounds`` option on an empty collection. - - - - * - ``middle`` - - - document - - - The document to use as the split point to create two chunks. - :dbcommand:`split` requires one of the following options: ``find``, - ``bounds``, or ``middle``. - - - + The :dbcommand:`split` command must be run in the ``admin`` database. +Syntax +------ +The command has the following syntax: + +.. code-block:: javascript + + db.adminCommand( + { + split: ., + } + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``split`` + - string + - The name of the :term:`collection` where the :term:`chunk` exists. + Specify the collection's full :term:`namespace`, including the + database name. + + * - ``find`` + - document + - An query statement that specifies an equality match on the shard + key. The match selects the chunk that contains the specified + document. You must specify only one of the following: ``find``, + ``bounds``, or ``middle``. + + You cannot use the ``find`` option on an empty collection. + + * - ``bounds`` + - array + - ``bounds`` applies to chunks in collections partitioned using a + :term:`hashed shard key`. The parameter's array must consist of + two documents specifying the lower and upper shard-key values of + the chunk. The values must match the minimum and maximum values + of an existing chunk. Specify only one of the following: + ``find``, ``bounds``, or ``middle``. + + You cannot use the ``bounds`` option on an empty collection. + + * - ``middle`` + - document + - The document to use as the split point to create two chunks. + :dbcommand:`split` requires one of the following options: ``find``, + ``bounds``, or ``middle``. + Considerations -------------- diff --git a/source/reference/command/startSession.txt b/source/reference/command/startSession.txt index a583f68cf29..d7dfa0e0937 100644 --- a/source/reference/command/startSession.txt +++ b/source/reference/command/startSession.txt @@ -18,28 +18,39 @@ Definition The :dbcommand:`startSession` command starts a new logical :ref:`session ` for a sequence of operations. - :dbcommand:`startSession` has the following syntax: +Syntax +------ + +The command has the following syntax: - .. code-block:: javascript +.. code-block:: javascript - { startSession: 1 } + db.runCommand( + { + startSession: 1 + } + ) - .. include:: /includes/fact-dbcommand.rst +.. include:: /includes/fact-dbcommand.rst - .. |command| replace:: :dbcommand:`startSession` +.. |command| replace:: :dbcommand:`startSession` - .. code-block:: javascript +.. code-block:: javascript - db.runCommand( { startSession: 1 } ) + db.runCommand( + { + startSession: 1 + } + ) - .. important:: +.. important:: - ``featureCompatibilityVersion`` must be 3.6 or greater to use the - :dbcommand:`startSession` command. + ``featureCompatibilityVersion`` must be 3.6 or greater to use the + :dbcommand:`startSession` command. - .. seealso:: +.. seealso:: - :method:`Mongo.startSession()` + :method:`Mongo.startSession()` Behavior -------- diff --git a/source/reference/command/top.txt b/source/reference/command/top.txt index 028553aca32..3b197a4114b 100644 --- a/source/reference/command/top.txt +++ b/source/reference/command/top.txt @@ -35,11 +35,20 @@ top instance will return an error. Issue the :dbcommand:`top` command against the :term:`admin - database` in the form: + database`. - .. code-block:: javascript +Syntax +------ - { top: 1 } +The command has the following syntax: + +.. code-block:: javascript + + db.runCommand( + { + top: 1 + } + ) Example diff --git a/source/reference/command/update.txt b/source/reference/command/update.txt index ef1073a9cdf..b21ef60dd77 100644 --- a/source/reference/command/update.txt +++ b/source/reference/command/update.txt @@ -30,7 +30,7 @@ Syntax .. versionchanged:: 5.0 -The :dbcommand:`update` command has the following syntax: +The command has the following syntax: .. code-block:: javascript @@ -59,11 +59,10 @@ The :dbcommand:`update` command has the following syntax: ) Command Fields -~~~~~~~~~~~~~~ +-------------- The command takes the following fields: - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -105,7 +104,6 @@ The command takes the following fields: * - ``comment`` - any - - .. include:: /includes/extracts/comment-content.rst .. versionadded:: 4.4 @@ -126,7 +124,7 @@ The command takes the following fields: .. _update-statement-documents: Update Statements -````````````````` +~~~~~~~~~~~~~~~~~ Each element of the ``updates`` array is an update statement document. Each document contains the following fields: @@ -190,6 +188,11 @@ Each document contains the following fields: ``false``, limit the update to one document that meet the query criteria. Defaults to ``false``. + When updating multiple documents, if a single document fails + to update, further documents are not updated. See + :ref:`multi-update failures ` for more + details on this behavior. + * - ``collation`` - document @@ -326,6 +329,73 @@ replace a *single* matching document; i.e. the ``multi`` field cannot be ``true``. The :dbcommand:`update` command *does not* replace the ``_id`` value. +.. _multi-update-failures: + +Multi-Update Failures +~~~~~~~~~~~~~~~~~~~~~ + +If a single document fails to update in an update command with the +``multi`` parameter set to ``true``, no further documents +update as part of that command. + +For example, create a ``members`` collection with the following documents: + +.. code-block:: javascript + + db.members.insertMany( [ + { "_id" : 1, "member" : "Taylor", "status" : "pending", "points" : 1}, + { "_id" : 2, "member" : "Alexis", "status" : "enrolled", "points" : 59}, + { "_id" : 3, "member" : "Elizabeth", "status" : "enrolled", "points" : 34} + ] ) + +The following operation creates a document validator on the +``members`` collection with a rule that the ``points`` value +can not equal ``60``. + +.. code-block:: javascript + + db.runCommand( { + collMod: "members", + validator: { points: { $ne: 60 } } + } ) + +This update command increases the ``points`` field of every document +by ``1``. + +.. code-block:: javascript + + db.runCommand( + { + update: "members", + updates: [ + { + q: {}, + u: { $inc: { points: 1 } }, + multi: true + } + ] + } + ) + +After running the command, the collection contains the following +documents: + +.. code-block:: javascript + :copyable: false + + { _id: 1, member: 'Taylor', status: 'A', points: 2 } + { _id: 2, member: 'Alexis', status: 'D', points: 59 } + { _id: 3, member: 'Elizabeth', status: 'C', points: 34 } + +The update command updated the ``points`` value of the first document +but failed to update the second document because of the validator rule +that the ``points`` value can not equal ``60``. The third document did +not update because no further documents update following a write error. + +.. seealso:: + + :ref:`Schema Validation` + .. _update-command-behaviors-aggregation-pipeline: Update with an Aggregation Pipeline diff --git a/source/reference/command/updateRole.txt b/source/reference/command/updateRole.txt index bea58075958..15d53b2f258 100644 --- a/source/reference/command/updateRole.txt +++ b/source/reference/command/updateRole.txt @@ -32,12 +32,17 @@ Definition An update to the ``privileges`` or ``roles`` array completely replaces the previous array's values. - The :dbcommand:`updateRole` command uses the following syntax. To - update a role, you must provide the ``privileges`` array, ``roles`` - array, or both: +Syntax +------ - .. code-block:: javascript +To update a role, you must provide the ``privileges`` array, ``roles`` +array, or both. +The command uses the following syntax: + +.. code-block:: javascript + + db.runCommand( { updateRole: "", privileges: @@ -61,47 +66,56 @@ Definition writeConcern: , comment: } - - The :dbcommand:`updateRole` command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - - Type - - Description - * - ``updateRole`` - - string - - The name of the :ref:`user-defined role ` role to update. - * - ``privileges`` - - array - - Optional. Required if you do not specify :data:`~admin.system.roles.roles` array. - The privileges to grant the role. An update to the ``privileges`` - array overrides the previous array's values. For the syntax for - specifying a privilege, see the :data:`~admin.system.roles.privileges` - array. - * - ``roles`` - - array - - Optional. Required if you do not specify :data:`~admin.system.roles.privileges` array. - The roles from which this role inherits privileges. An update to the - ``roles`` array overrides the previous array's values. - * - ``authenticationRestrictions`` - - array - - Optional. - .. include:: /includes/fact-auth-restrictions-role-desc.rst - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst - .. versionadded:: 4.4 - - - .. |local-cmd-name| replace:: :dbcommand:`updateRole` + ) + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``updateRole`` + - string + - The name of the :ref:`user-defined role ` role to update. + + * - ``privileges`` + - array + - Optional. Required if you do not specify :data:`~admin.system.roles.roles` array. + The privileges to grant the role. An update to the ``privileges`` + array overrides the previous array's values. For the syntax for + specifying a privilege, see the :data:`~admin.system.roles.privileges` + array. + + * - ``roles`` + - array + - Optional. Required if you do not specify :data:`~admin.system.roles.privileges` array. + The roles from which this role inherits privileges. An update to the + ``roles`` array overrides the previous array's values. + + * - ``authenticationRestrictions`` + - array + - Optional. + + .. include:: /includes/fact-auth-restrictions-role-desc.rst + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + .. versionadded:: 4.4 + + +.. |local-cmd-name| replace:: :dbcommand:`updateRole` Roles ~~~~~ diff --git a/source/reference/command/updateUser.txt b/source/reference/command/updateUser.txt index acb128b92ce..7ad94b74851 100644 --- a/source/reference/command/updateUser.txt +++ b/source/reference/command/updateUser.txt @@ -30,16 +30,17 @@ Definition the user's existing roles, use the :dbcommand:`grantRolesToUser` or :dbcommand:`revokeRolesFromUser` commands. - The :dbcommand:`updateUser` command uses the following syntax. To - update a user, you must specify the ``updateUser`` field and at least - one other field, other than ``writeConcern``: + To update a user, you must specify the ``updateUser`` field and at + least one other field, other than ``writeConcern``. - .. tip:: +Syntax +------ - .. include:: /includes/extracts/4.2-changes-passwordPrompt.rst - - .. code-block:: javascript +The command uses the following syntax: +.. code-block:: javascript + + db.runCommand( { updateUser: "", pwd: passwordPrompt(), // Or "" @@ -60,107 +61,109 @@ Definition writeConcern: { }, comment: } - - The command has the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Field - - Type - - Description - * - ``updateUser`` - - string - - The name of the user to update. - * - ``pwd`` - - string - - Optional. The user's password. The value can be either: - - - the user's password in cleartext string, or - - :method:`passwordPrompt()` to prompt for the user's password. - - .. tip:: - - .. include:: /includes/extracts/4.2-changes-passwordPrompt.rst - - * - ``customData`` - - document - - Optional. Any arbitrary information. - * - ``roles`` - - array - - Optional. The roles granted to the user. An update to the ``roles`` array - overrides the previous array's values. - * - ``writeConcern`` - - document - - .. include:: /includes/fact-write-concern-spec-link.rst - * - ``authenticationRestrictions`` - - array - - Optional. The authentication restrictions the server enforces upon the user. - Specifies a list of IP addresses and - :abbr:`CIDR (Classless Inter-Domain Routing)` ranges from which the - user is allowed to connect to the server or from which the server can - accept users. - * - ``mechanisms`` - - array - - Optional. The specific SCRAM mechanism or mechanisms for the user credentials. - If :parameter:`authenticationMechanisms` is specified, you can only - specify a subset of the :parameter:`authenticationMechanisms`. - - If updating the mechanisms field without the password, you can only - specify a subset of the user's current mechanisms, and only the - existing user credentials for the specified mechanism or mechanisms - are retained. - - If updating the password along with the mechanisms, new set of - credentials are stored for the user. - - Valid values are: - - - ``"SCRAM-SHA-1"`` - - - Uses the ``SHA-1`` hashing function. - - - ``"SCRAM-SHA-256"`` - - - Uses the ``SHA-256`` hashing function. - - - Requires featureCompatibilityVersion set to ``4.0``. - - - Requires digestPassword to be ``true``. - - .. versionadded:: 4.0 - - - - * - ``digestPassword`` - - - boolean - - - Optional. Indicates whether the server or the client digests the password. - - If true, the server receives undigested password from the client and - digests the password. - - If false, the client digests the password and passes the digested - password to the server. Not compatible with ``SCRAM-SHA-256`` - - .. versionchanged:: 4.0 - - The default value is ``true``. In earlier versions, the default - value is ``false``. - - - * - ``comment`` - - - any - - - .. include:: /includes/extracts/comment-content.rst + ) + + +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Field + - Type + - Description + + * - ``updateUser`` + - string + - The name of the user to update. + + * - ``pwd`` + - string + - Optional. The user's password. The value can be either: + + - the user's password in cleartext string, or + - :method:`passwordPrompt()` to prompt for the user's password. + + .. tip:: + + .. include:: /includes/extracts/4.2-changes-passwordPrompt.rst + + * - ``customData`` + - document + - Optional. Any arbitrary information. + + * - ``roles`` + - array + - Optional. The roles granted to the user. An update to the ``roles`` array + overrides the previous array's values. + + * - ``writeConcern`` + - document + - .. include:: /includes/fact-write-concern-spec-link.rst + + * - ``authenticationRestrictions`` + - array + - Optional. The authentication restrictions the server enforces upon the user. + Specifies a list of IP addresses and + :abbr:`CIDR (Classless Inter-Domain Routing)` ranges from which the + user is allowed to connect to the server or from which the server can + accept users. + + * - ``mechanisms`` + - array + - Optional. The specific SCRAM mechanism or mechanisms for the user credentials. + If :parameter:`authenticationMechanisms` is specified, you can only + specify a subset of the :parameter:`authenticationMechanisms`. - .. versionadded:: 4.4 - - + If updating the mechanisms field without the password, you can only + specify a subset of the user's current mechanisms, and only the + existing user credentials for the specified mechanism or mechanisms + are retained. + + If updating the password along with the mechanisms, new set of + credentials are stored for the user. + + Valid values are: + + - ``"SCRAM-SHA-1"`` + + - Uses the ``SHA-1`` hashing function. + + - ``"SCRAM-SHA-256"`` + + - Uses the ``SHA-256`` hashing function. + + - Requires featureCompatibilityVersion set to ``4.0``. + + - Requires digestPassword to be ``true``. + + .. versionadded:: 4.0 + + * - ``digestPassword`` + - boolean + - Optional. Indicates whether the server or the client digests the password. + + If true, the server receives undigested password from the client and + digests the password. + + If false, the client digests the password and passes the digested + password to the server. Not compatible with ``SCRAM-SHA-256`` + + .. versionchanged:: 4.0 + + The default value is ``true``. In earlier versions, the default + value is ``false``. + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 + Roles ~~~~~ diff --git a/source/reference/command/updateZoneKeyRange.txt b/source/reference/command/updateZoneKeyRange.txt index 94a0c95f8f3..62901396a9c 100644 --- a/source/reference/command/updateZoneKeyRange.txt +++ b/source/reference/command/updateZoneKeyRange.txt @@ -27,102 +27,94 @@ Definition You must run :dbcommand:`addShardToZone` on the admin database. - The :dbcommand:`updateZoneKeyRange` command has the following syntax: +Syntax +------ - .. code-block:: javascript - - { - updateZoneKeyRange: , - min: , - max: , - zone: | - } - - The command takes the following fields: - - - .. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Parameter - - - Type - - - Description - - * - ``updateZoneKeyRange`` - - - string - - - The namespace of the collection to associate with the range. - - The collection must be sharded for the command to succeed. - - - - * - ``min`` - - - document - - - The inclusive lower bound of the range of :term:`shard key` values. - - Specify each field of the shard key in the form of `` : ``. - The value must be of the same BSON type or types as the shard key. - - .. note:: - - To use hashed sharding, the field value needs to be of type - :bsontype:`NumberLong `. - - * - ``max`` - - - document - - - The exclusive upper bound of the range of :term:`shard key` values. - - Specify each field of the shard key in the form of `` : ``. - The value must be of the same BSON type or types as the shard key. - - .. note:: - - To use hashed sharding, the field value needs to be of type - :bsontype:`NumberLong `. - - * - ``zone`` - - - string - - - The name of the zone to associate with the range bounded by the - ``min`` and ``max``. - - If the value does not match an existing zone, the command fails. - - Specify ``null`` to remove the association between the range with lower - bounds of ``min`` and upper bound of ``max`` and the ``updateZoneKeyRange`` - collection. The values of ``min`` and ``max`` must match exactly the target - range. +The command has the following syntax: +.. code-block:: javascript + db.adminCommand( + { + updateZoneKeyRange: , + min: , + max: , + zone: | + } + ) +Command Fields +-------------- + +The command takes the following fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Parameter + - Type + - Description + + * - ``updateZoneKeyRange`` + - string + - The namespace of the collection to associate with the range. + + The collection must be sharded for the command to succeed. + + * - ``min`` + - document + - The inclusive lower bound of the range of :term:`shard key` values. + + Specify each field of the shard key in the form of `` : ``. + The value must be of the same BSON type or types as the shard key. + + .. note:: + + To use hashed sharding, the field value needs to be of type + :bsontype:`NumberLong `. + + * - ``max`` + - document + - The exclusive upper bound of the range of :term:`shard key` values. + + Specify each field of the shard key in the form of `` : ``. + The value must be of the same BSON type or types as the shard key. + + .. note:: + + To use hashed sharding, the field value needs to be of type + :bsontype:`NumberLong `. + + * - ``zone`` + - string + - The name of the zone to associate with the range bounded by the + ``min`` and ``max``. + + If the value does not match an existing zone, the command fails. + + Specify ``null`` to remove the association between the range with lower + bounds of ``min`` and upper bound of ``max`` and the ``updateZoneKeyRange`` + collection. The values of ``min`` and ``max`` must match exactly the target + range. - If no zone range matches the minimum and maximum bounds passed to - :dbcommand:`updateZoneKeyRange`, nothing is removed. +Behavior +-------- - Only issue :dbcommand:`updateZoneKeyRange` when connected to a - :binary:`~bin.mongos` instance. +If no zone range matches the minimum and maximum bounds passed to +:dbcommand:`updateZoneKeyRange`, nothing is removed. - :binary:`~bin.mongosh` provides two helper methods: +Only issue :dbcommand:`updateZoneKeyRange` when connected to a +:binary:`~bin.mongos` instance. - - :method:`sh.updateZoneKeyRange()` for adding a range of shard key values to a - zone. +:binary:`~bin.mongosh` provides two helper methods: - - :method:`sh.removeRangeFromZone()` for removing a range of shard key values - from a zone. +- :method:`sh.updateZoneKeyRange()` for adding a range of shard key values to a + zone. -Behavior --------- +- :method:`sh.removeRangeFromZone()` for removing a range of shard key values + from a zone. You cannot create a range of shard key values whose lower and upper boundaries overlap with an existing range for the sharded collection. For example, given diff --git a/source/reference/command/usersInfo.txt b/source/reference/command/usersInfo.txt index a6a0912b8ae..28b22fe210b 100644 --- a/source/reference/command/usersInfo.txt +++ b/source/reference/command/usersInfo.txt @@ -17,10 +17,14 @@ Definition Returns information about one or more users. - The :dbcommand:`usersInfo` command has the following form: +Syntax +------ - .. code-block:: none +The command has the following syntax: +.. code-block:: javascript + + db.runCommand( { usersInfo: , showCredentials: , @@ -30,73 +34,76 @@ Definition filter: , comment: } + ) - The command has the following fields: +Command Fields +-------------- +The command takes the following fields: - .. list-table:: - :header-rows: 1 - :widths: 20 25 80 - - * - Field - - Type - - Description - - * - ``usersInfo`` - - various - - The user(s) about whom to return information. - - The argument to ``usersInfo`` has multiple forms depending on the - requested information. See :ref:`usersInfo-field-specification`. - - * - ``showCredentials`` - - boolean - - Optional. Set to ``true`` to display the user's password - hash. - - By default, this field is ``false``. - - * - ``showCustomData`` - - boolean - - Optional. Set to ``false`` to omit the user's ``customData`` - from the output. - - By default, this field is ``true``. - - .. versionadded:: 5.2 - - * - ``showPrivileges`` - - boolean - - Optional. Set to ``true`` to show the user's full set - of privileges, including expanded information for the - inherited roles. - - By default, this field is ``false``. - - If viewing all users, you cannot specify this field. - - * - ``showAuthenticationRestrictions`` - - boolean - - Optional. Set to ``true`` to show the user's authentication - restrictions. - - By default, this field is ``false``. - - If viewing all users, you cannot specify this field. - - * - ``filter`` - - document - - Optional. A document that specifies :pipeline:`$match` stage - conditions to return information for users that match the - filter conditions. - - .. versionadded:: 4.0 - - * - ``comment`` - - any - - .. include:: /includes/extracts/comment-content.rst +.. list-table:: + :header-rows: 1 + :widths: 20 25 80 + + * - Field + - Type + - Description + + * - ``usersInfo`` + - various + - The user(s) about whom to return information. + + The argument to ``usersInfo`` has multiple forms depending on the + requested information. See :ref:`usersInfo-field-specification`. + + * - ``showCredentials`` + - boolean + - Optional. Set to ``true`` to display the user's password + hash. - .. versionadded:: 4.4 + By default, this field is ``false``. + + * - ``showCustomData`` + - boolean + - Optional. Set to ``false`` to omit the user's ``customData`` + from the output. + + By default, this field is ``true``. + + .. versionadded:: 5.2 + + * - ``showPrivileges`` + - boolean + - Optional. Set to ``true`` to show the user's full set + of privileges, including expanded information for the + inherited roles. + + By default, this field is ``false``. + + If viewing all users, you cannot specify this field. + + * - ``showAuthenticationRestrictions`` + - boolean + - Optional. Set to ``true`` to show the user's authentication + restrictions. + + By default, this field is ``false``. + + If viewing all users, you cannot specify this field. + + * - ``filter`` + - document + - Optional. A document that specifies :pipeline:`$match` stage + conditions to return information for users that match the + filter conditions. + + .. versionadded:: 4.0 + + * - ``comment`` + - any + - .. include:: /includes/extracts/comment-content.rst + + .. versionadded:: 4.4 .. _usersInfo-field-specification: diff --git a/source/reference/command/validate.txt b/source/reference/command/validate.txt index 878d7e16b6b..02f321ca938 100644 --- a/source/reference/command/validate.txt +++ b/source/reference/command/validate.txt @@ -41,18 +41,20 @@ The command has the following syntax: .. code-block:: javascript - db.runCommand( { - validate: , // Collection name - full: , // Optional - repair: , // Optional, added in MongoDB 5.0 - metadata: // Optional, added in MongoDB 5.0.4 - } ) + db.runCommand( + { + validate: , // Collection name + full: , // Optional + repair: , // Optional, added in MongoDB 5.0 + metadata: // Optional, added in MongoDB 5.0.4 + } + ) :binary:`~bin.mongosh` also provides a wrapper :method:`db.collection.validate()`. Command Fields -~~~~~~~~~~~~~~ +-------------- The command takes the following fields: @@ -70,10 +72,9 @@ The command takes the following fields: * - :ref:`full ` - boolean - - .. _cmd-validate-full: - *Optional*. A flag that determines whether the command + Optional. A flag that determines whether the command performs a slower but more thorough check or a faster but less thorough check. - If ``true``, performs a more thorough check with the following @@ -92,14 +93,12 @@ The command takes the following fields: * - :ref:`repair ` - boolean - - .. _cmd-validate-repair: .. include:: /includes/fact-validate-repair-option.rst * - :ref:`metadata ` - boolean - - .. _cmd-validate-metadata: .. include:: /includes/fact-validate-metadata.rst @@ -185,11 +184,15 @@ Specify :ref:`full: true ` for more detailed output. .. data:: validate.nInvalidDocuments - The number of invalid documents in the collection. + The number of invalid documents in the collection. Invalid documents + are those that are not readable, which means the :term:`BSON` + document is corrupt and has an error or a size mismatch. .. data:: validate.nNonCompliantDocuments The number of documents not conforming to the collection's schema. + Non-compliant documents are not counted as invalid in + :data:`~validate.nInvalidDocuments`. .. data:: validate.nrecords diff --git a/source/reference/command/validateDBMetadata.txt b/source/reference/command/validateDBMetadata.txt index f344f8ba382..e39f8c5e075 100644 --- a/source/reference/command/validateDBMetadata.txt +++ b/source/reference/command/validateDBMetadata.txt @@ -31,19 +31,21 @@ The command has the following syntax: .. code-block:: javascript - db.runCommand( { - validateDBMetadata: 1, - apiParameters: { - version: , - strict: , - deprecationErrors: - }, - db: , - collection: , - } ) + db.runCommand( + { + validateDBMetadata: 1, + apiParameters: { + version: , + strict: , + deprecationErrors: + }, + db: , + collection: , + } + ) Command Fields -~~~~~~~~~~~~~~ +-------------- The command takes the following fields: @@ -261,4 +263,4 @@ version 1 and include ``deprecationErrors`` in the output. ], ok: 1, hasMoreErrors: false, - } \ No newline at end of file + } diff --git a/source/reference/connection-string.txt b/source/reference/connection-string.txt index 2ad00856cb0..a5658025bef 100644 --- a/source/reference/connection-string.txt +++ b/source/reference/connection-string.txt @@ -583,9 +583,9 @@ Timeout Options * - .. urioption:: connectTimeoutMS - The time in milliseconds to attempt a connection before timing - out. The default is never to timeout, though different drivers - might vary. See the :driver:`driver ` - documentation. + out. The default is 10,000 milliseconds, but specific drivers + might have a different default. For details, see the + :driver:`driver ` documentation. * - .. urioption:: socketTimeoutMS diff --git a/source/reference/exit-codes.txt b/source/reference/exit-codes.txt index c2e244f1aac..8e619f01d62 100644 --- a/source/reference/exit-codes.txt +++ b/source/reference/exit-codes.txt @@ -89,6 +89,12 @@ issues with :binary:`~bin.mongod` and :binary:`~bin.mongos` instances. .. symbol: EXIT_NET_ERROR = 48 + * - .. error:: 61 + - Returned by the :ref:`storage-node-watchdog` if any of the + filesystems with monitored directories are unresponsive. + + .. symbol: EXIT_WATCHDOG = 61 + * - .. error:: 62 - Returned by :binary:`~bin.mongod` if the datafiles in :option:`--dbpath ` are incompatible with the diff --git a/source/reference/installation-ubuntu-community-troubleshooting.txt b/source/reference/installation-ubuntu-community-troubleshooting.txt index a40ad1153f2..06c41899e1a 100644 --- a/source/reference/installation-ubuntu-community-troubleshooting.txt +++ b/source/reference/installation-ubuntu-community-troubleshooting.txt @@ -15,8 +15,6 @@ Troubleshooting .. |arrow| unicode:: U+27A4 .. |distro-name| replace:: Ubuntu -.. include:: /includes/rc-available.rst - Errors when retrieving the public key ------------------------------------- diff --git a/source/reference/log-messages.txt b/source/reference/log-messages.txt index e2b80468aed..35900acde2f 100644 --- a/source/reference/log-messages.txt +++ b/source/reference/log-messages.txt @@ -81,10 +81,15 @@ analyzing structured log messages can be found in the JSON Log Output Format ~~~~~~~~~~~~~~~~~~~~~~ -With MongoDB 4.4, all log output is now in JSON format. This includes -log output sent to the *file*, *syslog*, and *stdout* (standard out) -:ref:`log destinations `, as well as the -output of the :dbcommand:`getLog` command. +Starting in MongoDB 4.4, all log output is in JSON format including +output sent to: + +- Log file +- Syslog +- Stdout (standard out) :ref:`log destinations + ` + +Output from the :dbcommand:`getLog` command is also in JSON format. Each log entry is output as a self-contained JSON object which follows the :doc:`Relaxed Extended JSON v2.0 ` @@ -97,8 +102,8 @@ specification, and has the following layout and field order: "t": , // timestamp "s": , // severity "c": , // component - "ctx": , // context "id": , // unique identifier + "ctx": , // context "msg": , // message body "attr": // additional attributes (optional) "tags": // tags (optional) @@ -106,46 +111,73 @@ specification, and has the following layout and field order: "size": // original size of entry (if truncated) } -- **Timestamp** - Timestamp of the log message, in ``ISO-8601`` - format. See :ref:`log-message-timestamp`. - -- **Severity** - String representing the short severity code of the log - message. See :ref:`log-severity-levels`. - -- **Component** - String representing the full component string of the - log message. See :ref:`log-message-components`. - -- **Context** - String representing the name of the thread issuing the - log statement. +Field descriptions: -- **id** - Integer representing the unique identifier of the log - statement. See :ref:`log-message-parsing-example-filter-id` for an - example. - -- **Message** - String representing the raw log output message as passed - from the server or driver. This message is :ref:`escaped as needed - ` according to the JSON specification. - -- **Attributes** - *(optional)* Object containing one or more - key-value pairs for any additional attributes provided. If a log - message does not include any additional attributes, this object is - omitted. Attribute values may be referenced by their key name in the - *message* body, depending on the message. Like **message**, attributes - are :ref:`escaped as needed ` according to - the JSON specification. - -- **Tags** - *(optional)* Array of strings representing any tags - applicable to the log statement, for example: ``["startupWarnings"]``. +.. list-table:: + :header-rows: 1 + :widths: 10 10 50 -- **Truncated** - *(if truncated)* Object containing information - regarding :ref:`log message truncation `, if - applicable. This object will only be present if the log entry contains - at least one **attribute** that was truncated. + * - Field Name + - Type + - Description -- **Size** - *(if truncated)* Integer representing the original size of - a log entry if it has been :ref:`truncated `. - This field will only be present if the log entry contains - at least one **attribute** that was truncated. + * - ``t`` + - Datetime + - Timestamp of the log message in ISO-8601 format. For an example, + see :ref:`log-message-timestamp`. + + * - ``s`` + - String + - Short severity code of the log message. For an example, see + :ref:`log-severity-levels`. + + * - ``c`` + - String + - Full component string for the log message. For an example, see + :ref:`log-message-components`. + + * - ``id`` + - Integer + - Unique identifier for the log statement. For an example, see + :ref:`log-message-parsing-example-filter-id`. + + * - ``ctx`` + - String + - Name of the thread that caused the log statement. + + * - ``msg`` + - String + - Log output message passed from the server or driver. If + necessary, the message is :ref:`escaped + ` according to the JSON specification. + + * - ``attr`` + - Object + - One or more key-value pairs for additional log attributes. If a + log message does not include any additional attributes, the + ``attr`` object is omitted. + + Attribute values may be referenced by their key name in the + ``msg`` message body, depending on the message. If necessary, the + attributes are :ref:`escaped ` + according to the JSON specification. + + * - ``tags`` + - Array of strings + - Strings representing any tags applicable to the log statement. + For example, ``["startupWarnings"]``. + + * - ``truncated`` + - Object + - Information about the :ref:`log message truncation + `, if applicable. Only included if the + log entry contains at least one truncated ``attr`` attribute. + + * - ``size`` + - Integer + - Original size of a log entry if it has been :ref:`truncated + `. Only included if the log entry + contains at least one truncated ``attr`` attribute. .. _log-message-json-escaping: diff --git a/source/reference/method/KeyVault.rewrapManyDataKey.txt b/source/reference/method/KeyVault.rewrapManyDataKey.txt index 19a9f161679..de249c8ab06 100644 --- a/source/reference/method/KeyVault.rewrapManyDataKey.txt +++ b/source/reference/method/KeyVault.rewrapManyDataKey.txt @@ -63,6 +63,17 @@ KeyVault.rewrapManyDataKey() A :ref:`BulkWriteResult ` object that reports how many data keys were affected. +.. warning:: Back-Up Your {+key-vault-long+} + + Before you rotate your {+dek-long+}s, ensure you create + a backup of your {+key-vault-long+}. If you lose access to your + {+dek-long+}s, you will lose all your encrypted data. + + To learn how to create a backup of a collection, + see :ref:``. + +.. include:: /includes/in-use-encryption/admonition-csfle-key-rotation.txt + Behavior -------- diff --git a/source/reference/method/db.collection.updateMany.txt b/source/reference/method/db.collection.updateMany.txt index e6296aef095..e65d91415a2 100644 --- a/source/reference/method/db.collection.updateMany.txt +++ b/source/reference/method/db.collection.updateMany.txt @@ -395,8 +395,8 @@ Using the aggregation pipeline allows for a more expressive update statement, such as expressing conditional updates based on current field values or updating one field using the value of another field(s). -Example 1 -````````` +Example 1: Update with Aggregation Pipeline Using Existing Fields +````````````````````````````````````````````````````````````````` The following examples uses the aggregation pipeline to modify a field using the values of the other fields in the document. @@ -458,8 +458,8 @@ After the command, the collection contains the following documents: { "_id" : 1, "member" : "abc123", "status" : "Modified", "points" : 2, "lastUpdate" : ISODate("2020-01-23T05:50:49.247Z"), "comments" : [ "note to self: confirm status", "Need to activate" ] } { "_id" : 2, "member" : "xyz123", "status" : "Modified", "points" : 60, "lastUpdate" : ISODate("2020-01-23T05:50:49.247Z"), "comments" : [ "reminder: ping me at 100pts", "Some random comment" ] } -Example 2 -````````` +Example 2: Update with Aggregation Pipeline Using Existing Fields Conditionally +``````````````````````````````````````````````````````````````````````````````` The aggregation pipeline allows the update to perform conditional updates based on the current field values as well as use current field diff --git a/source/reference/method/db.setProfilingLevel.txt b/source/reference/method/db.setProfilingLevel.txt index 8ddaa32addd..ff447700205 100644 --- a/source/reference/method/db.setProfilingLevel.txt +++ b/source/reference/method/db.setProfilingLevel.txt @@ -385,7 +385,7 @@ Set a Filter to Determine Profiled Operations The following example sets for a :binary:`~bin.mongod` instance: -- the :ref:`profiling level ` to ``2``, +- the :ref:`profiling level ` to ``1``, - a :ref:`filter ` of ``{ op: "query", millis: { $gt: 2000 } }``, which causes the profiler @@ -393,7 +393,7 @@ The following example sets for a :binary:`~bin.mongod` instance: .. code-block:: javascript - db.setProfilingLevel( 2, { filter: { op: "query", millis: { $gt: 2000 } } } ) + db.setProfilingLevel( 1, { filter: { op: "query", millis: { $gt: 2000 } } } ) The method returns a document with the **previous** values for the settings. diff --git a/source/reference/method/js-client-side-field-level-encryption.txt b/source/reference/method/js-client-side-field-level-encryption.txt index 740cac1208f..7fc0c59192d 100644 --- a/source/reference/method/js-client-side-field-level-encryption.txt +++ b/source/reference/method/js-client-side-field-level-encryption.txt @@ -26,51 +26,42 @@ client-side field level encryption. :header-rows: 1 * - Name - - Description * - :method:`getKeyVault()` - - Returns the key vault object for the current MongoDB connection. * - :method:`KeyVault.createKey()` - - Creates a data encryption key for use with client-side field level encryption. * - :method:`KeyVault.deleteKey()` - - Deletes the specified data encryption key from the key vault. * - :method:`KeyVault.getKey()` - - Retreives the specified data encryption key from the key vault. * - :method:`KeyVault.getKeys()` - - Retrieves all keys in the key vault. * - :method:`KeyVault.addKeyAlternateName()` - - Associates a key alternative name to the specified data encryption key. * - :method:`KeyVault.removeKeyAlternateName()` - - Removes a key alternative name from the specified data encryption key. - * - :method:`KeyVault.getKeyByAltName()` + * - :method:`KeyVault.rewrapManyDataKey()` + - Decrypts multiple data keys and re-encrypts them with a new master key. + * - :method:`KeyVault.getKeyByAltName()` - Retrieves keys with the specified key alternative name. * - :method:`getClientEncryption()` - - Returns the client encryption object for supporting explicit encryption/decryption of fields. * - :method:`ClientEncryption.encrypt()` - - Encrypts a field using a specified data encryption key and encryption algorithm. * - :method:`ClientEncryption.decrypt()` - - Decrypts a field using the associated data encryption key and encryption algorithm. diff --git a/source/reference/operator/aggregation-pipeline.txt b/source/reference/operator/aggregation-pipeline.txt index 7b412eea3cf..63349b42529 100644 --- a/source/reference/operator/aggregation-pipeline.txt +++ b/source/reference/operator/aggregation-pipeline.txt @@ -17,8 +17,8 @@ Stages ``db.collection.aggregate()`` Stages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -All except the :pipeline:`$out`, :pipeline:`$merge`, and :pipeline:`$geoNear` stages can -appear multiple times in a pipeline. +All except the :pipeline:`$out`, :pipeline:`$merge`, :pipeline:`$geoNear`, +and :pipeline:`$changeStream` stages can appear multiple times in a pipeline. .. include:: /includes/extracts/operators-toc-explanation.rst @@ -85,6 +85,11 @@ Alphabetical Listing of Stages boundaries are automatically determined in an attempt to evenly distribute the documents into the specified number of buckets. + * - :pipeline:`$changeStream` + + - Returns a :ref:`Change Stream ` cursor for the + collection or database. This stage can only occur once in an + aggregation pipeline and it must occur as the first stage. * - :pipeline:`$collStats` @@ -352,6 +357,7 @@ Alphabetical Listing of Stages /reference/operator/aggregation/addFields /reference/operator/aggregation/bucket /reference/operator/aggregation/bucketAuto + /reference/operator/aggregation/changeStream /reference/operator/aggregation/collStats /reference/operator/aggregation/count /reference/operator/aggregation/currentOp diff --git a/source/reference/operator/aggregation/changeStream.txt b/source/reference/operator/aggregation/changeStream.txt new file mode 100644 index 00000000000..683bf464bdd --- /dev/null +++ b/source/reference/operator/aggregation/changeStream.txt @@ -0,0 +1,146 @@ +=========================== +$changeStream (aggregation) +=========================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Definition +---------- + +.. pipeline:: $changeStream + + Returns a :ref:`Change Stream ` cursor on a collection, a database, + or an entire cluster. Must be used as the first stage in an aggregation pipeline. + + The :pipeline:`$changeStream` stage has the following syntax: + + .. code-block:: text + + { + $changeStream: { + allChangesForCluster: , + fullDocument: , + fullDocumentBeforeChange: , + resumeAfter: + showExpandedEvents: , + startAfter: + startAtOperationTime: + } + } + + .. list-table:: + :header-rows: 1 + + * - Parameter + - Description + + * - ``allChangesForCluster`` + - Optional: Sets whether the change stream should include all changes + in the cluster. May only be opened on the ``admin`` database. + + * - ``fullDocument`` + - Optional: Specifies whether change notifications include a copy of the + full document when modified by ``update`` operations. + + * ``default``: Change notifications do not include the full document + for ``update`` operations. + + * ``required``: Change notifications includes a copy of the modified + document as it appeared immediately after the change. If the + document cannot be found, the change stream throws an error. + + To use this option, you must first use the :dbcommand:`collMod` + command to enable the ``changeStreamPreAndPostImages`` option. + + .. versionadded:: 6.0 + * ``updateLookup``: Change notifications includes a copy of the + document modified by the change. This document is the current + majority-committed document or ``null`` if it no longer exists. + + * ``whenAvailable``: Change notification includes a copy of the + modified document as it appeared immediately after the change or + ``null`` if the document is unavailable. + + To use this option, you must first use the :dbcommand:`collMod` + command to enable the ``changeStreamPreAndPostImages`` option. + + .. versionadded:: 6.0 + + In the case of partial updates, the change notification also + provides a description of the change. + + * - ``fullDocumentBeforeChange`` + - Include the full document from before the change. + This field accepts the following values: + + * ``off``: Disables inclusion of the document from before the change. + * ``whenAvailable``: Includes document from before the change. + The query does not fail if the unmodified document is not available. + * ``required``: Includes document from before the change. The query + fails if the unmodified document is not available. + + * - ``resumeAfter`` + - Specifies a resume token as the logical starting point for + the change stream. Cannot be used with ``startAfter`` or + ``startAtOperationTime`` fields. + + * - ``showExpandedEvents`` + - Specifies whether to include additional change events, such as + such as DDL and index operations. + + .. versionadded:: 6.0 + + * - ``startAfter`` + - Specifies a resume token as the logical starting point for + the change stream. Cannot be used with ``resumeAfter`` or + ``startAtOperationTime`` fields. + + * - ``startAtOperationTime`` + - Specifies a time as the logical starting point for the change stream. + Cannot be used with ``resumeAfter`` or ``startAfter`` fields. + + +Examples +-------- + +To create a change stream cursor using the aggregation stage, run +the :dbcommand`aggregate` command + +.. code-block:: javascript + + var cur = db.names.aggregate( [ + { $changeStream: {} } + ] ) + cur.next() + +When the change stream detects a change, the ``next()`` method returns a change +event notification. For example: + +.. code-block:: json + :copyable: false + + { + "_id": { + _data: "8262E2EE54000000022B022C0100296E5A100448E5E3DD01364019AE8FE8C6859527E046645F6964006462E2EE54C8756C0D5CF6F0720004" + }, + "operationType": "insert", + "clusterTime": Timestamp({ t: 1659039316, i: 2 }), + "wallTime": ISODate("2022-07-28T20:15:16.148Z"), + "fullDocument": { + "_id": ObjectId("62e2ee54c8756c0d5cf6f072"), + "name": "Walker Percy" + }, + "ns": { + "db": "test", + "coll": "names" + }, + "documentKey": { _id: ObjectId("62e2ee54c8756c0d5cf6f072") } + } + +For more information on change stream notifications, see :ref:`Change Events +` + diff --git a/source/reference/operator/aggregation/lookup.txt b/source/reference/operator/aggregation/lookup.txt index ca1c81fde6d..3825b17fc26 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -17,15 +17,18 @@ Definition .. versionchanged:: 5.1 - Performs a left outer join to a collection in the *same* - database to filter in documents from the "joined" collection for - processing. To each input document, the :pipeline:`$lookup` stage - adds a new array field whose elements are the matching documents - from the "joined" collection. The :pipeline:`$lookup` stage passes - these reshaped documents to the next stage. + Performs a left outer join to a collection in the *same* database to + filter in documents from the "joined" collection for processing. The + :pipeline:`$lookup` stage adds a new array field to each input + document. The new array field contains the matching documents from + the "joined" collection. The :pipeline:`$lookup` stage passes these + reshaped documents to the next stage. Starting in MongoDB 5.1, :pipeline:`$lookup` works across sharded - collections. + collections. + + To combine elements from two different collections, use the + :pipeline:`$unionWith` pipeline stage. Syntax ------ @@ -410,33 +413,70 @@ the ``pipeline`` field. Atlas Search Support ~~~~~~~~~~~~~~~~~~~~ -Starting in v6.0, the ``pipeline`` can contain the :atlas:`Atlas Search -` :pipeline:`$search` stage as the first stage inside -the pipeline. +Starting in MongoDB 6.0, you can specify the :atlas:`Atlas Search +` :pipeline:`$search` or :pipeline:`$searchMeta` stage +in the ``$lookup`` pipeline to search collections on the Atlas +cluster. The :pipeline:`$search` or the :pipeline:`$searchMeta` stage +must be the first stage inside the ``$lookup`` pipeline. For example, when you :ref:`lookup-syntax-let-pipeline` or run :ref:`lookup-syntax-concise-correlated-subquery`, you can specify -:pipeline:`$search` inside the pipeline as shown below: - -.. code-block:: - :copyable: false - :emphasize-lines: 7-11 - - [{ - "$lookup": { - "from": , - "let": {: , ...}, - "as": , - "pipeline": [{ - "$search": { - "": { - +:pipeline:`$search` or :pipeline:`$searchMeta` inside the pipeline as +shown below: + +.. tabs:: + + .. tab:: $search + :tabid: search + + .. code-block:: + :copyable: false + :emphasize-lines: 7-11 + + [{ + "$lookup": { + "from": , + localField: , + foreignField: , + "as": , + "pipeline": [{ + "$search": { + "": { + + } + }, + ... + }] } - }, - ... - }] - } - }] + }] + + .. tab:: $searchMeta + :tabid: searchmeta + + .. code-block:: + :copyable: false + :emphasize-lines: 7-11 + + [{ + "$lookup": { + "from": , + localField: , + foreignField: , + "as": , + "pipeline": [{ + "$searchMeta": { + "": { + + } + }, + ... + }] + } + }] + +To see an example of :pipeline:`$lookup` with :pipeline:`$search`, +see the Atlas Search tutorial :atlas:`Run an Atlas Search $search Query +Using $lookup `. .. _lookup-sharded-collections: diff --git a/source/reference/operator/aggregation/set.txt b/source/reference/operator/aggregation/set.txt index a3da7c741e6..2391eb8a0c4 100644 --- a/source/reference/operator/aggregation/set.txt +++ b/source/reference/operator/aggregation/set.txt @@ -247,3 +247,52 @@ The operation returns the following: :copyable: false { "_id" : 1, "student" : "Maya", "homework" : [ 10, 5, 10, 7 ], "quiz" : [ 10, 8 ], "extraCredit" : 0 } + +Creating a New Field with Existing Fields +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Create a sample ``scores`` collection with the following: + +.. code-block:: javascript + + db.scores.insertMany([ + { _id: 1, student: "Maya", homework: [ 10, 5, 10 ], quiz: [ 10, 8 ], extraCredit: 0 }, + { _id: 2, student: "Ryan", homework: [ 5, 6, 5 ], quiz: [ 8, 8 ], extraCredit: 8 } + ]) + +The following aggregation operation adds a new field ``quizAverage`` +to each document that contains the average of the ``quiz`` array. + +.. code-block:: javascript + + db.scores.aggregate( [ + { + $set: { + quizAverage: { $avg: "$quiz" } + } + } + ] ) + +The operation returns the following documents: + +.. code-block:: javascript + :copyable: false + + [ + { + _id: 1, + student: 'Maya', + homework: [ 10, 5, 10 ], + quiz: [ 10, 8 ], + extraCredit: 0, + quizAverage: 9 + }, + { + _id: 2, + student: 'Ryan', + homework: [ 5, 6, 5 ], + quiz: [ 8, 8 ], + extraCredit: 8, + quizAverage: 8 + } + ] \ No newline at end of file diff --git a/source/reference/operator/aggregation/setEquals.txt b/source/reference/operator/aggregation/setEquals.txt index 9942dfcbd40..df46c10c404 100644 --- a/source/reference/operator/aggregation/setEquals.txt +++ b/source/reference/operator/aggregation/setEquals.txt @@ -58,42 +58,73 @@ Behavior Example ------- -Consider an ``experiments`` collection with the following documents: +Consider a ``bakeryOrders`` collection with the following documents: .. code-block:: javascript - { "_id" : 1, "A" : [ "red", "blue" ], "B" : [ "red", "blue" ] } - { "_id" : 2, "A" : [ "red", "blue" ], "B" : [ "blue", "red", "blue" ] } - { "_id" : 3, "A" : [ "red", "blue" ], "B" : [ "red", "blue", "green" ] } - { "_id" : 4, "A" : [ "red", "blue" ], "B" : [ "green", "red" ] } - { "_id" : 5, "A" : [ "red", "blue" ], "B" : [ ] } - { "_id" : 6, "A" : [ "red", "blue" ], "B" : [ [ "red" ], [ "blue" ] ] } - { "_id" : 7, "A" : [ "red", "blue" ], "B" : [ [ "red", "blue" ] ] } - { "_id" : 8, "A" : [ ], "B" : [ ] } - { "_id" : 9, "A" : [ ], "B" : [ "red" ] } + db.bakeryOrders.insertMany( [ + { _id: 0, cakes: ["chocolate", "vanilla"], cupcakes: ["chocolate", "vanilla"] }, + { _id: 1, cakes: ["chocolate", "vanilla"], cupcakes: ["vanilla", "chocolate"] }, + { _id: 2, cakes: ["chocolate", "chocolate"], cupcakes: ["chocolate"] }, + { _id: 3, cakes: ["vanilla"], cupcakes: ["chocolate"] }, + { _id: 4, cakes: ["vanilla"], cupcakes: [] } + ] ) The following operation uses the :expression:`$setEquals` operator to -determine if the ``A`` array and the ``B`` array -contain the same elements: +determine if the ``cakes`` array and the ``cupcakes`` array in each order +contain the same flavors: .. code-block:: javascript - db.experiments.aggregate( + db.bakeryOrders.aggregate( [ - { $project: { A: 1, B: 1, sameElements: { $setEquals: [ "$A", "$B" ] }, _id: 0 } } - ] - ) + { + $project: { + _id: 0, + cakes: 1, + cupcakes: 1, + sameFlavors: { $setEquals: [ "$cakes", "$cupcakes" ] } + } + } + ] ) + +.. note:: $project + + The :pipeline:`$project` stage specifies which fields are included + in the output documents. In this example, the :pipeline:`$project` + stage: + + - Excludes the ``_id`` field from the output. + - Includes the ``cakes`` and ``cupcakes`` fields in the output. + - Outputs the result of the ``$setEquals`` operator in a new field + called ``sameFlavors``. The operation returns the following results: .. code-block:: javascript - { "A" : [ "red", "blue" ], "B" : [ "red", "blue" ], "sameElements" : true } - { "A" : [ "red", "blue" ], "B" : [ "blue", "red", "blue" ], "sameElements" : true } - { "A" : [ "red", "blue" ], "B" : [ "red", "blue", "green" ], "sameElements" : false } - { "A" : [ "red", "blue" ], "B" : [ "green", "red" ], "sameElements" : false } - { "A" : [ "red", "blue" ], "B" : [ ], "sameElements" : false } - { "A" : [ "red", "blue" ], "B" : [ [ "red" ], [ "blue" ] ], "sameElements" : false } - { "A" : [ "red", "blue" ], "B" : [ [ "red", "blue" ] ], "sameElements" : false } - { "A" : [ ], "B" : [ ], "sameElements" : true } - { "A" : [ ], "B" : [ "red" ], "sameElements" : false } + { + cakes: [ "chocolate", "vanilla" ], + cupcakes: [ "chocolate", "vanilla" ], + sameFlavors: true + }, + { + cakes: [ "chocolate", "vanilla" ], + cupcakes: [ "vanilla", "chocolate" ], + sameFlavors: true + }, + { + cakes: [ "chocolate", "chocolate" ], + cupcakes: [ "chocolate" ], + sameFlavors: true + }, + { + cakes: [ "vanilla" ], + cupcakes: [ "chocolate" ], + sameFlavors: false + }, + { + cakes: [ "vanilla" ], + cupcakes: [], + sameFlavors: false + } \ No newline at end of file diff --git a/source/reference/operator/aggregation/unionWith.txt b/source/reference/operator/aggregation/unionWith.txt index 68a279858b3..a82b3feb066 100644 --- a/source/reference/operator/aggregation/unionWith.txt +++ b/source/reference/operator/aggregation/unionWith.txt @@ -212,27 +212,59 @@ top-level collection/view on which the Atlas Search Support ~~~~~~~~~~~~~~~~~~~~ -Starting in v6.0, the ``pipeline`` can contain the :atlas:`Atlas Search -` :pipeline:`$search` stage as the first stage inside -the pipeline. - -.. code-block:: - :copyable: false - :emphasize-lines: 5-9 - - [{ - "$unionWith": { - "coll": , - "pipeline": [{ - "$search": { - "": { - +Starting in MongoDB 6.0, you can specify the :atlas:`Atlas Search +` :pipeline:`$search` or :pipeline:`$searchMeta` stage +in the ``$unionWith`` pipeline to search collections on the Atlas +cluster. The :pipeline:`$search` or the :pipeline:`$searchMeta` stage +must be the first stage inside the ``$unionWith`` pipeline. + +.. tabs:: + + .. tab:: $search + :tabid: search + + .. code-block:: + :copyable: false + :emphasize-lines: 5-9 + + [{ + "$unionWith": { + "coll": , + "pipeline": [{ + "$search": { + "": { + + } + }, + ... + }] } - }, - ... - }] - } - }] + }] + + .. tab:: $searchMeta + :tabid: searchmeta + + .. code-block:: + :copyable: false + :emphasize-lines: 5-9 + + [{ + "$unionWith": { + "coll": , + "pipeline": [{ + "$searchMeta": { + "": { + + } + }, + ... + }] + } + }] + +To see an example of :pipeline:`$unionWith` with :pipeline:`$search`, +see the Atlas Search tutorial :atlas:`Run an Atlas Search $search Query +Using $unionWith `. Restrictions ~~~~~~~~~~~~ diff --git a/source/reference/operator/projection.txt b/source/reference/operator/projection.txt index 7634958956f..0f443eb7250 100644 --- a/source/reference/operator/projection.txt +++ b/source/reference/operator/projection.txt @@ -2,6 +2,8 @@ Projection Operators ==================== +Projection operators specify the fields returned by an operation. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query-array.txt b/source/reference/operator/query-array.txt index 4d6b2235ce1..c8121fdd7c6 100644 --- a/source/reference/operator/query-array.txt +++ b/source/reference/operator/query-array.txt @@ -2,6 +2,8 @@ Array Query Operators ===================== +Array operators return data based on array conditions. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query-bitwise.txt b/source/reference/operator/query-bitwise.txt index cfb030c9544..24a4b22f08c 100644 --- a/source/reference/operator/query-bitwise.txt +++ b/source/reference/operator/query-bitwise.txt @@ -2,6 +2,8 @@ Bitwise Query Operators ======================= +Bitwise operators return data based on bit position conditions. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query-comparison.txt b/source/reference/operator/query-comparison.txt index f8d8c186e33..b6054655d55 100644 --- a/source/reference/operator/query-comparison.txt +++ b/source/reference/operator/query-comparison.txt @@ -4,6 +4,8 @@ Comparison Query Operators ========================== +Comparison operators return data based on value comparisons. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query-element.txt b/source/reference/operator/query-element.txt index d24e28b2aa6..05f8fccaffe 100644 --- a/source/reference/operator/query-element.txt +++ b/source/reference/operator/query-element.txt @@ -2,6 +2,8 @@ Element Query Operators ======================= +Element operators return data based on field existence or data types. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query-evaluation.txt b/source/reference/operator/query-evaluation.txt index 9ae59aac82c..00c45370758 100644 --- a/source/reference/operator/query-evaluation.txt +++ b/source/reference/operator/query-evaluation.txt @@ -2,6 +2,9 @@ Evaluation Query Operators ========================== +Evaluation operators return data based on evaluations of either +individual fields or the entire collection's documents. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query-geospatial.txt b/source/reference/operator/query-geospatial.txt index 4ef23fe2940..5cc956f14d1 100644 --- a/source/reference/operator/query-geospatial.txt +++ b/source/reference/operator/query-geospatial.txt @@ -2,6 +2,9 @@ Geospatial Query Operators ========================== +Geospatial operators return data based on geospatial expression +conditions. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query-logical.txt b/source/reference/operator/query-logical.txt index 8b773bada64..cc24ca2902f 100644 --- a/source/reference/operator/query-logical.txt +++ b/source/reference/operator/query-logical.txt @@ -2,6 +2,9 @@ Logical Query Operators ======================= +Logical operators return data based on expressions that evaluate to +true or false. + .. default-domain:: mongodb .. contents:: On this page diff --git a/source/reference/operator/query/or.txt b/source/reference/operator/query/or.txt index 2fceaa6cc88..5e4325cec66 100644 --- a/source/reference/operator/query/or.txt +++ b/source/reference/operator/query/or.txt @@ -13,7 +13,7 @@ $or .. query:: $or The :query:`$or` operator performs a logical ``OR`` operation on an - array of *two or more* ```` and selects the documents + array of *one or more* ```` and selects the documents that satisfy *at least* one of the ````. The :query:`$or` has the following syntax: diff --git a/source/reference/operator/update/pull.txt b/source/reference/operator/update/pull.txt index 322bbc80a33..91b4ebd2f1d 100644 --- a/source/reference/operator/update/pull.txt +++ b/source/reference/operator/update/pull.txt @@ -118,6 +118,70 @@ After the update operation, the document only has values less than 6: .. _pull-array-of-documents: +Remove All Items That Match a Specified ``$pull`` Condition With :method:`~db.collection.bulkWrite()` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following :method:`db.collection.bulkWrite()` operation: + +- Creates the ``profilesBulkWrite`` collection. + +- Removes all items from the ``votes`` array + that are greater than or equal to ( :query:`$gte` ) ``6``. + +- Removes all items from the ``votes`` array + that are less than or equal to ( :query:`$lte` ) ``3``. + + +.. code-block:: javascript + + try { + db.profilesBulkWrite.bulkWrite( [ + { + insertOne: { + "document": { _id: 1, votes: [ 3, 5, 6, 7, 7, 8 ] } + } + }, + { + updateOne: { + "filter": { _id: 1 }, + "update": { $pull: { votes: { $gte: 6 } } } + } + }, + { + updateOne: { + "filter": {_id: 1}, + "update": { $pull: { votes: { $lte: 3 } } } + } + } + ] ); + } catch (e) { + print(e); + } + +.. note:: ``bulkWrite()`` + + The :method:`db.collection.bulkWrite()` method executes multiple + write operations listed in an array. In this example, the + :method:`db.collection.bulkWrite()` performs multiple operations + on the ``profiles`` collection. + +After the :method:`db.collection.bulkWrite()` operation, +you can confirm the document only has values less than +6 and greater than 3 using the following +operation: + +.. code-block:: javascript + + db.profilesBulkWrite.find() + +The operation returns the following: + +.. code-block:: javascript + :copyable: false + + [ { _id: 1, votes: [ 5 ] } ] + + Remove Items from an Array of Documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/reference/operator/update/push.txt b/source/reference/operator/update/push.txt index 8aa7e338739..964b098a9e4 100644 --- a/source/reference/operator/update/push.txt +++ b/source/reference/operator/update/push.txt @@ -121,6 +121,48 @@ Example output: .. _example-push-each: +Append a Value to Arrays in Multiple Documents +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following documents to the ``students`` collection: + +.. code-block:: javascript + + db.students.insertMany( [ + { _id: 2, scores: [ 45, 78, 38, 80, 89 ] } , + { _id: 3, scores: [ 46, 78, 38, 80, 89 ] } , + { _id: 4, scores: [ 47, 78, 38, 80, 89 ] } + ] ) + +The following :update:`$push` operation appends ``95`` to the +``scores`` array in each document: + +.. code-block:: javascript + + db.students.updateMany( + { }, + { $push: { scores: 95 } } + ) + +To confirm that each ``scores`` array includes ``95``, run the following +operation: + +.. code-block:: javascript + + db.students.find() + +The operation returns the following results: + +.. code-block:: javascript + :copyable: false + + [ + { _id: 1, scores: [ 44, 78, 38, 80, 89, 95 ] }, + { _id: 2, scores: [ 45, 78, 38, 80, 89, 95 ] }, + { _id: 3, scores: [ 46, 78, 38, 80, 89, 95 ] }, + { _id: 4, scores: [ 47, 78, 38, 80, 89, 95 ] } + ] + Append Multiple Values to an Array ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -137,4 +179,4 @@ Use ``$push`` Operator with Multiple Modifiers .. seealso:: - :method:`db.collection.updateMany()` - - :method:`db.collection.findAndModify()` + - :method:`db.collection.findAndModify()` \ No newline at end of file diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 46abfbb5d69..2e99edf9f87 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -4003,8 +4003,9 @@ Sharding Parameters shard. Before deleting the chunk during chunk migration, MongoDB waits for - :parameter:`orphanCleanupDelaySecs` or for in-progress queries involving - the chunk to complete on the shard primary, whichever is longer. + :parameter:`orphanCleanupDelaySecs` or for in-progress queries + involving the chunk to complete on the shard primary, whichever is + longer. However, because the shard primary has no knowledge of in-progress queries run on the shard secondaries, queries that use the chunk but are run on diff --git a/source/release-notes.txt b/source/release-notes.txt index 10aaa1ea8d8..bade6d67cc3 100644 --- a/source/release-notes.txt +++ b/source/release-notes.txt @@ -3,29 +3,27 @@ Release Notes ------------- -Always install the latest, stable version of MongoDB. See -:ref:`release-version-numbers` for more information. +Always install the latest, stable version of MongoDB. For more +information on types of MongoDB releases, see +:ref:`release-version-numbers`. -See the following release notes for an account of the changes in major -versions. Release notes also include instructions for upgrade. +To see changes in MongoDB releases, see the following release notes. -Upcoming Stable Release -~~~~~~~~~~~~~~~~~~~~~~~ +Current Stable Release +~~~~~~~~~~~~~~~~~~~~~~ (*6.0-series*) :ref:`release-notes-6.0` -.. include:: /includes/rc-available.rst - .. toctree:: :maxdepth: 1 :hidden: /release-notes/6.0 -Previous Atlas Rapid Releases -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Previous Rapid Releases +~~~~~~~~~~~~~~~~~~~~~~~ - :ref:`release-notes-5.3` - :ref:`release-notes-5.2` @@ -45,7 +43,6 @@ Previous Stable Releases - :doc:`/release-notes/5.0` - :doc:`/release-notes/4.4` - :doc:`/release-notes/4.2` -- :doc:`/release-notes/4.0` EOL'ed Releases diff --git a/source/release-notes/4.2-changelog.txt b/source/release-notes/4.2-changelog.txt index 3b3f363992f..2776efc683e 100644 --- a/source/release-notes/4.2-changelog.txt +++ b/source/release-notes/4.2-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/4.2.22.rst + .. include:: /includes/changelogs/releases/4.2.21.rst .. include:: /includes/changelogs/releases/4.2.20.rst diff --git a/source/release-notes/4.2.txt b/source/release-notes/4.2.txt index b9dc15099e0..ad226f4a7b8 100644 --- a/source/release-notes/4.2.txt +++ b/source/release-notes/4.2.txt @@ -13,6 +13,29 @@ Release Notes for MongoDB 4.2 Patch Releases -------------- +.. _4.2.22-release-notes: + +4.2.22 - Upcoming +~~~~~~~~~~~~~~~~~ + +Issues fixed in 4.2.22: + +- :issue:`SERVER-64403` Find queries with SORT_MERGE collation-encode + the missing sort attribute +- :issue:`SERVER-68359` Prevent TTLMonitor from processing index if + expireAfterSeconds is NaN +- :issue:`SERVER-62656` Decouple mongos-to-config-server connection pool + sizing from mongos-to-shard-server connection pool sizing +- :issue:`SERVER-62272` Adding schema validation to a collection can + prevent chunk migrations of failing documents +- :issue:`SERVER-66418` Bad projection created during dependency + analysis due to string order assumption + +- `All JIRA issues closed in 4.2.22 + `__ + +- :ref:`4.2.22-changelog` + .. _4.2.21-release-notes: 4.2.21 - Jun 21, 2022 diff --git a/source/release-notes/4.4.txt b/source/release-notes/4.4.txt index 25ff9087568..d31480a2b71 100644 --- a/source/release-notes/4.4.txt +++ b/source/release-notes/4.4.txt @@ -2164,13 +2164,9 @@ Support for ``$natural`` Sort on Views Support for Diagnostic Backtrace Generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Starting in MongoDB 4.4, :binary:`~bin.mongod` and :binary:`~bin.mongos` -processes running on Linux will now log a backtrace for each of their -running threads upon receipt of a ``SIGUSR2`` signal. This backtrace can -be analyzed for diagnostic information or provided to MongoDB support as -needed. This functionality is currently available only on the ``x86_64`` -architecture. For more information on using this feature, see -:ref:`sigusr2-diagnostic-backtrace`. +.. include:: /includes/diagnostic-backtrace-generation.rst + +For more information, see :ref:`sigusr2-diagnostic-backtrace`. Container-aware FTDC Reporting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/release-notes/5.0-changelog.txt b/source/release-notes/5.0-changelog.txt index d39de64642f..3e137014516 100644 --- a/source/release-notes/5.0-changelog.txt +++ b/source/release-notes/5.0-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/5.0.10.rst + .. include:: /includes/changelogs/releases/5.0.9.rst .. include:: /includes/changelogs/releases/5.0.8.rst diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index 05f19224d6c..9aebab3f586 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -17,6 +17,29 @@ Release Notes for MongoDB 5.0 Patch Releases -------------- +.. _5.0.10-release-notes: + +5.0.10 - July 29, 2022 +~~~~~~~~~~~~~~~~~~~~~~ + +Issues fixed: + +- :issue:`SERVER-66418` Bad projection created during dependency + analysis due to string order assumption +- :issue:`SERVER-65821` Deadlock during setFCV when there are prepared + transactions that have not persisted commit/abort decision +- :issue:`SERVER-65131` Disable opportunistic read targeting (except for + hedged reads) +- :issue:`SERVER-63971` Change server parameter to default to + read-your-writes behavior after 2PC transaction +- :issue:`SERVER-66433` Backport deadline waiting for overlapping range + deletion to finish to pre-v5.1 versions + +- `All JIRA issues closed in 5.0.10 + `_ + +- :ref:`5.0.10-changelog` + .. _5.0.9-release-notes: 5.0.9 - May 31, 2022 diff --git a/source/release-notes/6.0-compatibility.txt b/source/release-notes/6.0-compatibility.txt index 9ff1858034a..e781c7ce4a4 100644 --- a/source/release-notes/6.0-compatibility.txt +++ b/source/release-notes/6.0-compatibility.txt @@ -1,8 +1,8 @@ .. _6.0-compatibility: -======================================================== -Compatibility Changes in MongoDB 6.0 (Release Candidate) -======================================================== +==================================== +Compatibility Changes in MongoDB 6.0 +==================================== .. default-domain:: mongodb @@ -12,8 +12,6 @@ Compatibility Changes in MongoDB 6.0 (Release Candidate) :depth: 1 :class: singlecol -.. include:: /includes/rc-available.rst - This page describes changes introduced in MongoDB 6.0 that can affect compatibility with older versions of MongoDB. @@ -535,4 +533,3 @@ Collections with Encrypted Fields You must drop collections that use encrypted fields before you can complete the FCV downgrade. The downgrade will not complete if there are collections using ``encryptedFields``. - diff --git a/source/release-notes/6.0.txt b/source/release-notes/6.0.txt index f1233f916a5..ac8b45c0ce9 100644 --- a/source/release-notes/6.0.txt +++ b/source/release-notes/6.0.txt @@ -1,8 +1,8 @@ .. _release-notes-6.0: -================================================= -Release Notes for MongoDB 6.0 (Release Candidate) -================================================= +============================= +Release Notes for MongoDB 6.0 +============================= .. default-domain:: mongodb @@ -12,8 +12,6 @@ Release Notes for MongoDB 6.0 (Release Candidate) :depth: 1 :class: twocols -.. include:: /includes/rc-available.rst - This page describes changes and new features introduced in MongoDB 6.0. MongoDB 6.0 is a |lts| Release, which means that it is supported for @@ -144,14 +142,38 @@ MongoDB 6.0 introduces the following aggregation operators: Change Streams -------------- +Optimized Change Streams +~~~~~~~~~~~~~~~~~~~~~~~~ + .. |change-streams| replace:: :ref:`change streams ` .. include:: /includes/change-streams-optimization.rst + +``wallTime`` Change Stream Output Field +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Starting in MongoDB 6.0, the :ref:`change stream output ` has a new ``wallTime`` field that contains the server date and time of the database operation. +Change Streams with Document Pre- and Post-Images +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 6.0, you can use :ref:`change streams +` to output the version of a document before and +after changes (the document pre- and post-images). For examples, see +:ref:`db.collection.watch-change-streams-pre-and-post-images-example`. + +Change Stream Expanded Events +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 6.0, change streams can show additional +change events for DDL operations, like creating indexes and dropping +collections. + +For more information, see :ref:`Expanded Events `. + Cluster Administration ---------------------- @@ -664,23 +686,6 @@ Starting in MongoDB 6.0, the :ref:`collStats output ` includes the :data:`collStats.numOrphanDocs` field that shows the number of :term:`orphaned documents ` in the collection. -Change Streams with Document Pre- and Post-Images -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Starting in MongoDB 6.0, you can use :ref:`change streams -` to output the version of a document before and -after changes (the document pre- and post-images). For examples, see -:ref:`db.collection.watch-change-streams-pre-and-post-images-example`. - -Change Stream Expanded Events -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Starting in MongoDB 6.0, change streams can be configured to show additional -change events for DDL operations, like index creation and collection drop. - -For more information, see :ref:`Expanded Events `. - - Exclude Embedded Fields in ``serverStatus`` Output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -696,6 +701,12 @@ connection object has the following new methods: - :method:`Mongo.getWriteConcern()` returns the :term:`write concern` - :method:`Mongo.setWriteConcern()` sets the :term:`write concern` +Support for Diagnostic Backtrace Generation in ``arm64`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 6.0 (and 5.0.10, 4.4.15), :ref:`diagnostic backtrace +generation ` in ``arm64`` is supported. + Changes Affecting Compatibility ------------------------------- @@ -732,6 +743,30 @@ offer major version upgrade support to help ensure a smooth transition without interruption to your MongoDB application. To learn more, see :products:`MongoDB Consulting `. +.. _6.0-known-issues: + +Known Issues +------------ + +This section describes known issues in MongoDB 6.0 and their resolution +status. + +.. list-table:: + :header-rows: 1 + :widths: 20 40 40 + + * - In Version + - Issue + - Status + + * - 6.0.0 + + - :issue:`SERVER-68062`: Multi-stage aggregations that use + $geoNear may violate constraints. + + - Unresolved. This issue will be fixed in a future 6.0 minor + release. + Report an Issue --------------- diff --git a/source/tutorial/backup-and-restore-tools.txt b/source/tutorial/backup-and-restore-tools.txt index 3a2351c5d25..0d0f67d30a4 100644 --- a/source/tutorial/backup-and-restore-tools.txt +++ b/source/tutorial/backup-and-restore-tools.txt @@ -1,3 +1,5 @@ +.. _manual-tutorial-backup-and-restore: + ====================================== Back Up and Restore with MongoDB Tools ====================================== diff --git a/source/tutorial/configure-fips.txt b/source/tutorial/configure-fips.txt index 24863625211..2de641a0f91 100644 --- a/source/tutorial/configure-fips.txt +++ b/source/tutorial/configure-fips.txt @@ -242,8 +242,51 @@ Select the tab below for your platform: Additional Considerations -------------------------- -.. include:: /includes/fact-5.1-scram-sha-1-fips-default.rst +SCRAM SHA and FIPS Mode +~~~~~~~~~~~~~~~~~~~~~~~ -.. include:: /includes/extracts/4.2-changes-fips.rst +.. include:: /includes/fact-5.1-scram-sha-1-fips-default.rst .. include:: /includes/md5-and-scram-sha-1.rst + +Database Tools and FIPS Mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 4.2, the following programs no longer support the +:option:`--sslFIPSMode ` option: + +- :binary:`~bin.mongodump` +- :binary:`~bin.mongoexport` +- :binary:`~bin.mongofiles` +- :binary:`~bin.mongoimport` +- :binary:`~bin.mongorestore` +- :binary:`~bin.mongostat` +- :binary:`~bin.mongotop` + +``mongod``, ``mongos``, and FIPS Mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you configure :binary:`~bin.mongod` and :binary:`~bin.mongos` to use +FIPS mode, ``mongod`` and ``mongos`` use FIPS-compliant connections. + +MongoDB Shell and FIPS Mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The default :binary:`MongoDB Shell <~bin.mongosh>` distribution: + +- Contains OpenSSL 1.1. +- Uses FIPS-compliant connections to :binary:`~bin.mongod` and + :binary:`~bin.mongos` if you configure ``mongod`` and ``mongos`` to + use FIPS mode. + +MongoDB also provides a MongoDB Shell distribution that can use: + +- OpenSSL 1.1 and OpenSSL 3 installed on your server. +- ``--tlsFIPSMode`` option, which enables the ``mongosh`` FIPS mode. + +.. seealso:: + + - To download MongoDB Shell distributions that contain OpenSSL 1.1 + and OpenSSL 3, go to the `MongoDB Download Center + `__. + - :ref:`mdb-shell-install` diff --git a/source/tutorial/install-mongodb-enterprise-on-amazon-tarball.txt b/source/tutorial/install-mongodb-enterprise-on-amazon-tarball.txt index 2b8d8014fa7..1f2bf9cab30 100644 --- a/source/tutorial/install-mongodb-enterprise-on-amazon-tarball.txt +++ b/source/tutorial/install-mongodb-enterprise-on-amazon-tarball.txt @@ -18,7 +18,7 @@ Install MongoDB Enterprise on Amazon Linux using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-enterprise-on-amazon.txt b/source/tutorial/install-mongodb-enterprise-on-amazon.txt index ca429441a5f..4f38a65b1e1 100644 --- a/source/tutorial/install-mongodb-enterprise-on-amazon.txt +++ b/source/tutorial/install-mongodb-enterprise-on-amazon.txt @@ -17,7 +17,7 @@ Install MongoDB Enterprise Edition on Amazon Linux .. |package-manager| replace:: ``yum`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- @@ -71,6 +71,10 @@ Amazon Linux: .. include:: /includes/steps/install-mongodb-enterprise-on-amazon.rst +.. note:: + + .. include:: /includes/install-mongodb-yum-commands.rst + Run MongoDB Enterprise Edition ------------------------------ diff --git a/source/tutorial/install-mongodb-enterprise-on-debian-tarball.txt b/source/tutorial/install-mongodb-enterprise-on-debian-tarball.txt index 616158ef315..f685cc73efd 100644 --- a/source/tutorial/install-mongodb-enterprise-on-debian-tarball.txt +++ b/source/tutorial/install-mongodb-enterprise-on-debian-tarball.txt @@ -18,7 +18,7 @@ Install MongoDB Enterprise on Debian using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- @@ -92,6 +92,8 @@ the ``.tgz``. .. include:: /includes/steps/install-mongodb-enterprise-on-linux.rst +.. include:: /includes/install-mongodb-shell-tarball.rst + Run MongoDB Enterprise Edition ------------------------------ diff --git a/source/tutorial/install-mongodb-enterprise-on-debian.txt b/source/tutorial/install-mongodb-enterprise-on-debian.txt index ffcfbf4cb0d..bcda2f4919d 100644 --- a/source/tutorial/install-mongodb-enterprise-on-debian.txt +++ b/source/tutorial/install-mongodb-enterprise-on-debian.txt @@ -17,7 +17,7 @@ Install MongoDB Enterprise Edition on Debian .. |package-manager| replace:: ``apt`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- @@ -65,6 +65,10 @@ Follow these steps to install MongoDB |edition| Edition using the .. include:: /includes/steps/install-mongodb-enterprise-on-debian.rst +.. note:: + + .. include:: /includes/install-mongodb-apt-get-commands.rst + Run MongoDB Enterprise Edition ------------------------------ diff --git a/source/tutorial/install-mongodb-enterprise-on-os-x.txt b/source/tutorial/install-mongodb-enterprise-on-os-x.txt index e4b69317d9e..029a9745d02 100644 --- a/source/tutorial/install-mongodb-enterprise-on-os-x.txt +++ b/source/tutorial/install-mongodb-enterprise-on-os-x.txt @@ -19,7 +19,7 @@ Install MongoDB Enterprise on macOS .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-enterprise-on-red-hat-tarball.txt b/source/tutorial/install-mongodb-enterprise-on-red-hat-tarball.txt index 675878f797a..abec69230dd 100644 --- a/source/tutorial/install-mongodb-enterprise-on-red-hat-tarball.txt +++ b/source/tutorial/install-mongodb-enterprise-on-red-hat-tarball.txt @@ -18,7 +18,7 @@ Install MongoDB Enterprise on Red Hat or CentOS using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-enterprise-on-red-hat.txt b/source/tutorial/install-mongodb-enterprise-on-red-hat.txt index 744ce44f865..d579ea421aa 100644 --- a/source/tutorial/install-mongodb-enterprise-on-red-hat.txt +++ b/source/tutorial/install-mongodb-enterprise-on-red-hat.txt @@ -17,7 +17,7 @@ Install MongoDB Enterprise Edition on Red Hat or CentOS .. |package-manager| replace:: ``yum`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- @@ -58,6 +58,10 @@ Follow these steps to install MongoDB |edition| Edition using the .. include:: /includes/steps/install-mongodb-enterprise-on-red-hat.rst +.. note:: + + .. include:: /includes/install-mongodb-yum-commands.rst + Run MongoDB Enterprise Edition ------------------------------ diff --git a/source/tutorial/install-mongodb-enterprise-on-suse-tarball.txt b/source/tutorial/install-mongodb-enterprise-on-suse-tarball.txt index 1f54b5d6c48..9fdec238157 100644 --- a/source/tutorial/install-mongodb-enterprise-on-suse-tarball.txt +++ b/source/tutorial/install-mongodb-enterprise-on-suse-tarball.txt @@ -18,7 +18,7 @@ Install MongoDB Enterprise on SUSE using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-enterprise-on-suse.txt b/source/tutorial/install-mongodb-enterprise-on-suse.txt index e052951cbbc..da039156146 100644 --- a/source/tutorial/install-mongodb-enterprise-on-suse.txt +++ b/source/tutorial/install-mongodb-enterprise-on-suse.txt @@ -17,7 +17,7 @@ Install MongoDB Enterprise Edition on SUSE .. |package-manager| replace:: ``zypper`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-enterprise-on-ubuntu-tarball.txt b/source/tutorial/install-mongodb-enterprise-on-ubuntu-tarball.txt index b9011903ab2..44191a2c2e0 100644 --- a/source/tutorial/install-mongodb-enterprise-on-ubuntu-tarball.txt +++ b/source/tutorial/install-mongodb-enterprise-on-ubuntu-tarball.txt @@ -20,7 +20,7 @@ Install MongoDB Enterprise on Ubuntu using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-enterprise-on-ubuntu.txt b/source/tutorial/install-mongodb-enterprise-on-ubuntu.txt index 460ce501e79..a8cf93aa60f 100644 --- a/source/tutorial/install-mongodb-enterprise-on-ubuntu.txt +++ b/source/tutorial/install-mongodb-enterprise-on-ubuntu.txt @@ -19,7 +19,7 @@ Install MongoDB Enterprise Edition on Ubuntu .. |package-manager| replace:: ``apt`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- @@ -68,6 +68,10 @@ Follow these steps to install MongoDB |edition| Edition using the .. include:: /includes/steps/install-mongodb-enterprise-on-ubuntu.rst +.. note:: + + .. include:: /includes/install-mongodb-apt-get-commands.rst + Run MongoDB Enterprise Edition ------------------------------ diff --git a/source/tutorial/install-mongodb-enterprise-on-windows-unattended.txt b/source/tutorial/install-mongodb-enterprise-on-windows-unattended.txt index 5d51deb8476..eba04e243a1 100644 --- a/source/tutorial/install-mongodb-enterprise-on-windows-unattended.txt +++ b/source/tutorial/install-mongodb-enterprise-on-windows-unattended.txt @@ -16,7 +16,7 @@ Install MongoDB Enterprise on Windows using ``msiexec.exe`` .. |executable-name| replace:: ``mongod.exe`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-enterprise-on-windows.txt b/source/tutorial/install-mongodb-enterprise-on-windows.txt index 1b8d4cba509..12f2f088354 100644 --- a/source/tutorial/install-mongodb-enterprise-on-windows.txt +++ b/source/tutorial/install-mongodb-enterprise-on-windows.txt @@ -19,7 +19,7 @@ Install MongoDB Enterprise Edition on Windows .. |executable-name| replace:: ``mongod.exe`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-amazon-tarball.txt b/source/tutorial/install-mongodb-on-amazon-tarball.txt index 8d6a0c96afc..fb1391024fd 100644 --- a/source/tutorial/install-mongodb-on-amazon-tarball.txt +++ b/source/tutorial/install-mongodb-on-amazon-tarball.txt @@ -20,7 +20,7 @@ Install MongoDB Community on Amazon Linux using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-amazon.txt b/source/tutorial/install-mongodb-on-amazon.txt index 4a65f753d63..a9533b148ed 100644 --- a/source/tutorial/install-mongodb-on-amazon.txt +++ b/source/tutorial/install-mongodb-on-amazon.txt @@ -17,7 +17,7 @@ Install MongoDB Community Edition on Amazon Linux .. |package-manager| replace:: ``yum`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-debian-tarball.txt b/source/tutorial/install-mongodb-on-debian-tarball.txt index d95bbbe57b3..2e07c16351c 100644 --- a/source/tutorial/install-mongodb-on-debian-tarball.txt +++ b/source/tutorial/install-mongodb-on-debian-tarball.txt @@ -18,7 +18,7 @@ Install MongoDB Community on Debian using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-debian.txt b/source/tutorial/install-mongodb-on-debian.txt index c249c0d8274..0a9b087c616 100644 --- a/source/tutorial/install-mongodb-on-debian.txt +++ b/source/tutorial/install-mongodb-on-debian.txt @@ -17,7 +17,7 @@ Install MongoDB Community Edition on Debian .. |package-manager| replace:: ``apt`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-os-x-tarball.txt b/source/tutorial/install-mongodb-on-os-x-tarball.txt index 16cec7c503b..8163cbe05d9 100644 --- a/source/tutorial/install-mongodb-on-os-x-tarball.txt +++ b/source/tutorial/install-mongodb-on-os-x-tarball.txt @@ -17,7 +17,7 @@ Install MongoDB Community on macOS using ``.tgz`` Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-os-x.txt b/source/tutorial/install-mongodb-on-os-x.txt index c7847c58e19..be8a68acf8e 100644 --- a/source/tutorial/install-mongodb-on-os-x.txt +++ b/source/tutorial/install-mongodb-on-os-x.txt @@ -16,7 +16,7 @@ Install MongoDB Community Edition on macOS .. |package-manager| replace:: ``brew`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-red-hat-tarball.txt b/source/tutorial/install-mongodb-on-red-hat-tarball.txt index b02d17e1f22..b50f09f71f1 100644 --- a/source/tutorial/install-mongodb-on-red-hat-tarball.txt +++ b/source/tutorial/install-mongodb-on-red-hat-tarball.txt @@ -18,7 +18,7 @@ Install MongoDB Community on Red Hat or CentOS using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-red-hat.txt b/source/tutorial/install-mongodb-on-red-hat.txt index 33361f57e3b..9938d932f14 100644 --- a/source/tutorial/install-mongodb-on-red-hat.txt +++ b/source/tutorial/install-mongodb-on-red-hat.txt @@ -17,7 +17,7 @@ Install MongoDB Community Edition on Red Hat or CentOS .. |package-manager| replace:: ``yum`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-suse-tarball.txt b/source/tutorial/install-mongodb-on-suse-tarball.txt index 34a183644df..19e2ade6f19 100644 --- a/source/tutorial/install-mongodb-on-suse-tarball.txt +++ b/source/tutorial/install-mongodb-on-suse-tarball.txt @@ -18,7 +18,7 @@ Install MongoDB Community on SUSE using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-suse.txt b/source/tutorial/install-mongodb-on-suse.txt index 055cf05f4cf..b6115b3a706 100644 --- a/source/tutorial/install-mongodb-on-suse.txt +++ b/source/tutorial/install-mongodb-on-suse.txt @@ -17,7 +17,7 @@ Install MongoDB Community Edition on SUSE .. |package-manager| replace:: ``zypper`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-ubuntu-tarball.txt b/source/tutorial/install-mongodb-on-ubuntu-tarball.txt index d9f937d581f..06f9be67df9 100644 --- a/source/tutorial/install-mongodb-on-ubuntu-tarball.txt +++ b/source/tutorial/install-mongodb-on-ubuntu-tarball.txt @@ -20,7 +20,7 @@ Install MongoDB Community on Ubuntu using .tgz Tarball .. |executable-name| replace:: ``mongod`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-ubuntu.txt b/source/tutorial/install-mongodb-on-ubuntu.txt index 211c9361ed7..71fb8af4097 100644 --- a/source/tutorial/install-mongodb-on-ubuntu.txt +++ b/source/tutorial/install-mongodb-on-ubuntu.txt @@ -19,7 +19,7 @@ Install MongoDB Community Edition on Ubuntu .. |package-manager| replace:: ``apt`` .. |executable-name| replace:: ``mongod`` -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-windows-unattended.txt b/source/tutorial/install-mongodb-on-windows-unattended.txt index 45118785aac..5263099fb19 100644 --- a/source/tutorial/install-mongodb-on-windows-unattended.txt +++ b/source/tutorial/install-mongodb-on-windows-unattended.txt @@ -16,7 +16,7 @@ Install MongoDB Community on Windows using ``msiexec.exe`` .. |executable-name| replace:: ``mongod.exe`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/install-mongodb-on-windows.txt b/source/tutorial/install-mongodb-on-windows.txt index 12d480f8c57..f896b2f934c 100644 --- a/source/tutorial/install-mongodb-on-windows.txt +++ b/source/tutorial/install-mongodb-on-windows.txt @@ -16,7 +16,7 @@ Install MongoDB Community Edition on Windows .. |executable-name| replace:: ``mongod.exe`` .. |mdb-download-link| replace:: `MongoDB Download Center `__ -.. include:: /includes/rc-available.rst +.. include:: /includes/fact-atlas-banner.rst Overview -------- diff --git a/source/tutorial/manage-indexes.txt b/source/tutorial/manage-indexes.txt index c1e6e78ea73..457a7dcf0bd 100644 --- a/source/tutorial/manage-indexes.txt +++ b/source/tutorial/manage-indexes.txt @@ -28,6 +28,17 @@ View Existing Indexes Remove Indexes -------------- +.. tip:: Hide an Index Before Dropping It + + If you drop an index that is actively used in production, your + application may incur a performance degradation. Before you drop an + index, you can evaluate the potential impact of the drop by + :ref:`hiding the index `. + + Hidden indexes are not used to support queries. If you hide an index + and observe substantial negative performance impact, consider keeping + and unhiding the index so queries can resume using it. + .. include:: /includes/driver-remove-indexes-tabs.rst Modify an Index @@ -35,9 +46,128 @@ Modify an Index .. include:: /includes/driver-examples/driver-example-modify-index-tabs.rst +Minimize Performance Impact With a Temporary Index +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you drop an index that is actively used in production, your +application may incur a performance degradation. To ensure queries can +still use an index during modification, you can create a temporary, +redundant index that contains the same fields as the modified index. + +Example +``````` + +This example creates a new index and modifies that index to make it +:ref:`unique `. + +.. procedure:: + :style: normal + + .. step:: Create a ``siteAnalytics`` collection with an index on the ``url`` field + + Run this command: + + .. code-block:: javascript + + db.siteAnalytics.createIndex( { "url": 1 } ) + + The command returns the name of the index: + + .. code-block:: javascript + :copyable: false + + url_1 + + .. step:: Create a temporary index that contains the ``url`` field + + Run this command: + + .. code-block:: javascript + + db.siteAnalytics.createIndex( { "url": 1, "dummyField": 1 } ) + + The command returns the name of the index: + + .. code-block:: javascript + :copyable: false + + url_1_dummyField_1 + + This temporary index lets you safely drop the original ``{ "url": + 1 }`` index without impacting performance. + + .. step:: Drop the original index + + Run this command: + + .. code-block:: javascript + + db.siteAnalytics.dropIndex( { "url": 1 } ) + + The command returns: + + .. code-block:: javascript + :copyable: false + + { nIndexesWas: 3, ok: 1 } + + .. step:: Recreate the ``{ "url": 1 }`` index with the ``unique`` property + + Run this command: + + .. code-block:: javascript + + db.siteAnalytics.createIndex( { "url": 1 }, { "unique": true } ) + + The command returns the name of the index: + + .. code-block:: javascript + :copyable: false + + url_1 + + The ``url_1`` index is recreated and you can drop the temporary + index without impacting performance. Queries on the ``url`` field + can use the new unique index. + + .. step:: Drop the temporary index + + Run this command: + + .. code-block:: javascript + + db.siteAnalytics.dropIndex( { "url": 1, "dummyField": 1 } ) + + The command returns: + + .. code-block:: javascript + :copyable: false + + { nIndexesWas: 3, ok: 1 } + + .. step:: Confirm that the index was updated + + To view the indexes on the ``siteAnalytics`` collection, run this + command: + + .. code-block:: javascript + + db.siteAnalytics.getIndexes() + + The command returns these indexes, indicating that the ``url_1`` + index is now unique: + + .. code-block:: javascript + :copyable: false + + [ + { v: 2, key: { _id: 1 }, name: '_id_' }, + { v: 2, key: { url: 1 }, name: 'url_1', unique: true } + ] + .. _manage-indexes-find-inconsistent-indexes: -Find Inconsistent Indexes across Shards +Find Inconsistent Indexes Across Shards --------------------------------------- A sharded collection has an inconsistent index if the collection does diff --git a/source/tutorial/manage-mongodb-processes.txt b/source/tutorial/manage-mongodb-processes.txt index 3f33110ab31..7621e10f414 100644 --- a/source/tutorial/manage-mongodb-processes.txt +++ b/source/tutorial/manage-mongodb-processes.txt @@ -206,12 +206,7 @@ Troubleshoot ``mongod`` Processes Generate a Backtrace ~~~~~~~~~~~~~~~~~~~~ -Starting in MongoDB 4.4, :binary:`~bin.mongod` and :binary:`~bin.mongos` -processes running on Linux will now log a backtrace for each of their -running threads upon receipt of a ``SIGUSR2`` signal. This backtrace can -be analyzed for diagnostic information or provided to MongoDB support as -needed. This functionality is currently available only on the ``x86_64`` -architecture. +.. include:: /includes/diagnostic-backtrace-generation.rst To issue a ``SIGUSR2`` signal to a running :binary:`~bin.mongod` process, use the following command: diff --git a/source/tutorial/sharding-segmenting-data-by-location.txt b/source/tutorial/sharding-segmenting-data-by-location.txt index f9d57573ac6..722418bddce 100644 --- a/source/tutorial/sharding-segmenting-data-by-location.txt +++ b/source/tutorial/sharding-segmenting-data-by-location.txt @@ -18,17 +18,17 @@ Segmenting Data by Location .. include:: /includes/extracts/zoned-sharding-pre-define-zone.rst -This tutorial uses :ref:`zone-sharding` to segment data based on +This tutorial uses :ref:`zone-sharding` to segment data based on a geographic area. -The following are some example use cases for segmenting data by geographic -area: +The following are some example use cases for segmenting data by +geographic area: -* An application that requires segmenting user data based on geographic country -* A database that requires resource allocation based on geographic country +* An application that has to segment user data by country +* A database that has to allocate resources by country -The following diagram illustrates a sharded cluster that uses geographic based -zones to manage and satisfy data segmentation requirements. +The following diagram illustrates a sharded cluster that uses +geographic zones to manage and satisfy data segmentation requirements. .. include:: /images/sharding-segmenting-data-by-location-overview.rst