@@ -1814,59 +1814,39 @@ metadata.
1814
1814
1815
1815
Data keys are stored in the MongoDB key vault collection with the following schema:
1816
1816
1817
- | | | |
1818
- | ------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
1819
- | **Name** | **Type** | **Description** |
1820
- | \_ id | UUID | A unique identifier for the key. |
1821
- | version | Int64 | A numeric identifier for the schema version of this document. Implicitly 0 if unset. |
1822
- | keyAltNames | Array of strings | Alternate names to search for keys by. Used for a per-document key scenario in support of GDPR scenarios. |
1823
- | keyMaterial | BinData | Encrypted data key material, BinData type General |
1824
- | creationDate | Date | The datetime the wrapped data key material was imported into the Key Database. |
1825
- | updateDate | Date | The datetime the wrapped data key material was last modified. On initial import, this value will be set to creationDate. |
1826
- | status | Int | 0 = enabled, 1 = disabled |
1827
- | masterKey | Document | Per provider master key definition, see below |
1817
+ | | | | | \- ----------- | ---------------- |
1818
+ \- -----------------------------------------------------------------------------------------------------------------------
1819
+ | | **Name** | **Type** | **Description** | | \_ id | UUID | A unique identifier for the key. | | version | Int64 | A
1820
+ numeric identifier for the schema version of this document. Implicitly 0 if unset. | | keyAltNames | Array of strings |
1821
+ Alternate names to search for keys by. Used for a per-document key scenario in support of GDPR scenarios. | |
1822
+ keyMaterial | BinData | Encrypted data key material, BinData type General | | creationDate | Date | The datetime the
1823
+ wrapped data key material was imported into the Key Database. | | updateDate | Date | The datetime the wrapped data key
1824
+ material was last modified. On initial import, this value will be set to creationDate. | | status | Int | 0 = enabled, 1
1825
+ = disabled | | masterKey | Document | Per provider master key definition, see below |
1828
1826
1829
1827
#### masterKey contents
1830
1828
1831
- | | | |
1832
- | -------- | -------- | --------------------------------------------------------------------- |
1833
- | **Name** | **Type** | **Description** |
1834
- | provider | "aws" | |
1835
- | key | String | AWS ARN. Only applicable for "aws" provider. |
1836
- | region | String | AWS Region that contains AWS ARN. Only applicable for "aws" provider. |
1837
- | endpoint | String | Alternate AWS endpoint (needed for FIPS endpoints) |
1838
-
1839
- | | | |
1840
- | ---------------- | -------- | ------------------------------------------------------------- |
1841
- | **Name** | **Type** | **Description** |
1842
- | provider | "azure" | |
1843
- | keyVaultEndpoint | String | Required key vault endpoint. (e.g. "example.vault.azure.net") |
1844
- | keyName | String | Required key name. |
1845
- | keyVersion | String | Optional key version. |
1846
-
1847
- | | | |
1848
- | ---------- | -------- | ---------------------------------------------------------------- |
1849
- | **Name** | **Type** | **Description** |
1850
- | provider | "gcp" | |
1851
- | projectId | String | Required project ID. |
1852
- | location | String | Required location name (e.g. "global") |
1853
- | keyRing | String | Required key ring name. |
1854
- | keyName | String | Required key name. |
1855
- | keyVersion | String | Optional key version. |
1856
- | endpoint | String | Optional, KMS URL, defaults to <https://cloudkms.googleapis.com> |
1857
-
1858
- | | | |
1859
- | -------- | -------- | --------------- |
1860
- | **Name** | **Type** | **Description** |
1861
- | provider | "local" | |
1862
-
1863
- | | | |
1864
- | --------- | -------- | -------------------------------------------------------------------------------------- |
1865
- | **Name** | **Type** | **Description** |
1866
- | provider | "kmip" | |
1867
- | endpoint | String | Optional. Defaults to kmip.endpoint from KMS providers. |
1868
- | delegated | Boolean | Optional. Defaults to false. |
1869
- | keyId | String | Required. keyId is the Unique Identifier to a 96 byte KMIP Secret Data managed object. |
1829
+ | | | | | -------- | -------- | --------------------------------------------------------------------- | | **Name** |
1830
+ **Type** | **Description** | | provider | "aws" | | | key | String | AWS ARN. Only applicable for "aws" provider. | |
1831
+ region | String | AWS Region that contains AWS ARN. Only applicable for "aws" provider. | | endpoint | String |
1832
+ Alternate AWS endpoint (needed for FIPS endpoints) |
1833
+
1834
+ | | | | | ---------------- | -------- | ------------------------------------------------------------- | | **Name** |
1835
+ **Type** | **Description** | | provider | "azure" | | | keyVaultEndpoint | String | Required key vault endpoint. (e.g.
1836
+ "example.vault.azure.net") | | keyName | String | Required key name. | | keyVersion | String | Optional key version. |
1837
+
1838
+ | | | | | ---------- | -------- | ---------------------------------------------------------------- | | **Name** |
1839
+ **Type** | **Description** | | provider | "gcp" | | | projectId | String | Required project ID. | | location | String |
1840
+ Required location name (e.g. "global") | | keyRing | String | Required key ring name. | | keyName | String | Required
1841
+ key name. | | keyVersion | String | Optional key version. | | endpoint | String | Optional, KMS URL, defaults to
1842
+ <https://cloudkms.googleapis.com> |
1843
+
1844
+ | | | | | -------- | -------- | --------------- | | **Name** | **Type** | **Description** | | provider | "local" | |
1845
+
1846
+ | | | | | \- -------- | -------- | --------------------------------------------------------------------------------------
1847
+ | | **Name** | **Type** | **Description** | | provider | "kmip" | | | endpoint | String | Optional. Defaults to
1848
+ kmip.endpoint from KMS providers. | | delegated | Boolean | Optional. Defaults to false. | | keyId | String | Required.
1849
+ keyId is the Unique Identifier to a 96 byte KMIP Secret Data managed object. |
1870
1850
1871
1851
Data keys are needed for encryption and decryption. They are identified in the intent-to-encrypt marking and ciphertext.
1872
1852
Data keys may be retrieved by querying the "\_ id" with a UUID or by querying the "keyAltName" with a string.
@@ -1943,11 +1923,12 @@ encrypt : {
1943
1923
1944
1924
Each field is briefly described as follows :
1945
1925
1946
- | Name | Type | Description |
1947
- | -------- - | ---------------------- - | ------------------------------------------------------------------------------------------------------------------------------------------ - |
1948
- | bsonType | string | The bsonType of the underlying encrypted field . |
1949
- | algorithm | string | " AEAD_AES_256_CBC_HMAC_SHA_512-Random" or < br > " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" |
1950
- | keyId | string or array of UUID | If string , it is a JSON pointer to a field with a scalar value <br>identifying a key by keyAltName.<br>If array , an array of eligible keys. |
1926
+ | Name | Type | Description | | -------- - | ---------------------- - |
1927
+ \------------------------------------------------------------------------------------------------------------------------------------------ -
1928
+ | | bsonType | string | The bsonType of the underlying encrypted field . | | algorithm | string |
1929
+ " AEAD_AES_256_CBC_HMAC_SHA_512-Random" or < br > " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" | | keyId | string or array
1930
+ of UUID | If string , it is a JSON pointer to a field with a scalar value <br>identifying a key by keyAltName.<br>If
1931
+ array , an array of eligible keys. |
1951
1932
1952
1933
### libmongocrypt: Prohibitions and warnings
1953
1934
@@ -1996,46 +1977,16 @@ IV key and any given encryption operation will derive the IV from the IV key and
1996
1977
libmongocrypt determines whether or not the command requires encryption (i .e . is sent to mongocryptd ) based on the table
1997
1978
below . Commands not listed in this table will result in an error returned by libmongocrypt .
1998
1979
1999
- | | |
2000
- | ------------------------ | ---------- - |
2001
- | ** Command ** | ** Action ** |
2002
- | aggregate (collection ) | AUTOENCRYPT |
2003
- | count | AUTOENCRYPT |
2004
- | distinct | AUTOENCRYPT |
2005
- | delete | AUTOENCRYPT |
2006
- | find | AUTOENCRYPT |
2007
- | findAndModify | AUTOENCRYPT |
2008
- | getMore | BYPASS |
2009
- | insert | AUTOENCRYPT |
2010
- | update | AUTOENCRYPT |
2011
- | authenticate | BYPASS |
2012
- | getnonce | BYPASS |
2013
- | logout | BYPASS |
2014
- | hello | BYPASS |
2015
- | legacy hello | BYPASS |
2016
- | abortTransaction | BYPASS |
2017
- | commitTransaction | BYPASS |
2018
- | endSessions | BYPASS |
2019
- | startSession | BYPASS |
2020
- | create | BYPASS |
2021
- | createIndexes | BYPASS |
2022
- | createSearchIndexes | BYPASS |
2023
- | drop | BYPASS |
2024
- | dropDatabase | BYPASS |
2025
- | dropIndexes | BYPASS |
2026
- | dropSearchIndex | BYPASS |
2027
- | killCursors | BYPASS |
2028
- | listCollections | BYPASS |
2029
- | listDatabases | BYPASS |
2030
- | listIndexes | BYPASS |
2031
- | renameCollection | BYPASS |
2032
- | explain | AUTOENCRYPT |
2033
- | ping | BYPASS |
2034
- | killAllSessions | BYPASS |
2035
- | killSessions | BYPASS |
2036
- | killAllSessionsByPattern | BYPASS |
2037
- | refreshSessions | BYPASS |
2038
- | updateSearchIndex | BYPASS |
1980
+ | | | | ------------------------ | ---------- - | | ** Command ** | ** Action ** | | aggregate (collection ) | AUTOENCRYPT | |
1981
+ count | AUTOENCRYPT | | distinct | AUTOENCRYPT | | delete | AUTOENCRYPT | | find | AUTOENCRYPT | | findAndModify |
1982
+ AUTOENCRYPT | | getMore | BYPASS | | insert | AUTOENCRYPT | | update | AUTOENCRYPT | | authenticate | BYPASS | |
1983
+ getnonce | BYPASS | | logout | BYPASS | | hello | BYPASS | | legacy hello | BYPASS | | abortTransaction | BYPASS | |
1984
+ commitTransaction | BYPASS | | endSessions | BYPASS | | startSession | BYPASS | | create | BYPASS | | createIndexes |
1985
+ BYPASS | | createSearchIndexes | BYPASS | | drop | BYPASS | | dropDatabase | BYPASS | | dropIndexes | BYPASS | |
1986
+ dropSearchIndex | BYPASS | | killCursors | BYPASS | | listCollections | BYPASS | | listDatabases | BYPASS | |
1987
+ listIndexes | BYPASS | | renameCollection | BYPASS | | explain | AUTOENCRYPT | | ping | BYPASS | | killAllSessions |
1988
+ BYPASS | | killSessions | BYPASS | | killAllSessionsByPattern | BYPASS | | refreshSessions | BYPASS | |
1989
+ updateSearchIndex | BYPASS |
2039
1990
2040
1991
All AUTOENCRYPT commands are sent to mongocryptd , even if there is no JSONSchema . This is to ensure that commands that
2041
1992
reference other collections (e .g . aggregate with ` $lookup ` ) are handled properly .
0 commit comments