Skip to content

Commit 9ac0bfb

Browse files
Backport to v6.0 (#7881)
* (DOCSP-32333) Revamps database reference page to include Atlas UI steps (#4842) (#4911) * (DOCSP-32333) Revamps database reference page to include Atlas UI steps * Includes changes from copy review * Fixes copy review issues * DOCSP-25496 - Fix Comments (#7864) * fix comments * Apply suggestions from code review * specify data EK * fix formatting * test formatting * formatting * formatting * formatting * formatting * formatting * formatting * remove makedatakey (cherry picked from commit 284e11e) --------- Co-authored-by: Sarah Simpers <82042374+sarahsimpers@users.noreply.github.com>
1 parent 9cd888f commit 9ac0bfb

File tree

21 files changed

+69
-108
lines changed

21 files changed

+69
-108
lines changed

source/includes/fundamentals/manual-encryption/manual-enc.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@
3838
import com.mongodb.client.vault.ClientEncryptions;
3939
import org.bson.types.Binary;
4040

41-
4241
/*
43-
* - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS
44-
* - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS
42+
* - Reads master key from AWS KMS
43+
* - Locates existing data encryption key in AWS KMS
4544
* - Prints base 64-encoded value of the data encryption key
4645
*/
4746
public class makeDataKey {

source/includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/InsertEncryptedDocument.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*
1717
*/
1818

19-
2019
import java.util.*;
2120

2221
import static com.mongodb.client.model.Filters.eq;
@@ -31,10 +30,8 @@
3130
import com.mongodb.MongoClientSettings;
3231
import org.bson.Document;
3332

34-
35-
3633
/*
37-
* - Reads master key from file "master-key.txt" in root directory of project
34+
* - Reads master key from AWS KMS
3835
* - Creates a JSON schema for a specified collection to enable automatic encryption
3936
* - Creates an encrypted client and upserts a single document
4037
* - Finds the upserted document with the encrypted client using an encrypted field

source/includes/generated/in-use-encryption/csfle/java/aws/reader/src/main/java/com/mongodb/csfle/MakeDataKey.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@
3939
import com.mongodb.client.vault.ClientEncryptions;
4040
import com.mongodb.client.model.IndexOptions;
4141

42-
4342
/*
44-
* - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS
45-
* - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS
43+
* - Gets customer master key from the AWS KMS by using environment variables
44+
* - Locates existing data encryption key in AWS KMS
4645
* - Prints base 64-encoded value of the data encryption key
4746
*/
4847
public class MakeDataKey {
@@ -103,4 +102,4 @@ public static void main(String[] args) throws Exception {
103102
clientEncryption.close();
104103
// end-create-dek
105104
}
106-
}
105+
}

source/includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/InsertEncryptedDocument.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*
1717
*/
1818

19-
2019
import java.util.*;
2120

2221
import static com.mongodb.client.model.Filters.eq;
@@ -31,10 +30,8 @@
3130
import com.mongodb.MongoClientSettings;
3231
import org.bson.Document;
3332

34-
35-
3633
/*
37-
* - Reads master key from file "master-key.txt" in root directory of project
34+
* - Reads master key from Azure KMS
3835
* - Creates a JSON schema for a specified collection to enable automatic encryption
3936
* - Creates an encrypted client and upserts a single document
4037
* - Finds the upserted document with the encrypted client using an encrypted field

source/includes/generated/in-use-encryption/csfle/java/azure/reader/src/main/java/com/mongodb/csfle/MakeDataKey.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@
3939
import com.mongodb.client.vault.ClientEncryptions;
4040
import com.mongodb.client.model.IndexOptions;
4141

42-
4342
/*
44-
* - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS
45-
* - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS
43+
* - Reads master key from Azure KMS
44+
* - Locates existing data encryption key in Azure KMS
4645
* - Prints base 64-encoded value of the data encryption key
4746
*/
4847
public class MakeDataKey {
@@ -105,4 +104,4 @@ public static void main(String[] args) throws Exception {
105104
clientEncryption.close();
106105
// end-create-dek
107106
}
108-
}
107+
}

source/includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/InsertEncryptedDocument.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*
1717
*/
1818

19-
2019
import java.util.*;
2120

2221
import static com.mongodb.client.model.Filters.eq;
@@ -31,10 +30,8 @@
3130
import com.mongodb.MongoClientSettings;
3231
import org.bson.Document;
3332

34-
35-
3633
/*
37-
* - Reads master key from file "master-key.txt" in root directory of project
34+
* - Reads master key from GCP KMS
3835
* - Creates a JSON schema for a specified collection to enable automatic encryption
3936
* - Creates an encrypted client and upserts a single document
4037
* - Finds the upserted document with the encrypted client using an encrypted field

source/includes/generated/in-use-encryption/csfle/java/gcp/reader/src/main/java/com/mongodb/csfle/MakeDataKey.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@
3939
import com.mongodb.client.vault.ClientEncryptions;
4040
import com.mongodb.client.model.IndexOptions;
4141

42-
4342
/*
44-
* - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS
45-
* - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS
43+
* - Gets customer master key from the GCP KMS by using environment variables
44+
* - Locates existing data encryption key in GCP KMS
4645
* - Prints base 64-encoded value of the data encryption key
4746
*/
4847
public class MakeDataKey {
@@ -106,4 +105,4 @@ public static void main(String[] args) throws Exception {
106105
clientEncryption.close();
107106
// end-create-dek
108107
}
109-
}
108+
}

source/includes/generated/in-use-encryption/csfle/java/kmip/reader/src/main/java/com/mongodb/csfle/InsertEncryptedDocument.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*
1717
*/
1818

19-
2019
import java.util.*;
2120

2221
import static com.mongodb.client.model.Filters.eq;
@@ -31,10 +30,8 @@
3130
import com.mongodb.MongoClientSettings;
3231
import org.bson.Document;
3332

34-
35-
3633
/*
37-
* - Reads master key from file "master-key.txt" in root directory of project
34+
* - Reads master key from KMIP KMS
3835
* - Creates a JSON schema for a specified collection to enable automatic encryption
3936
* - Creates an encrypted client and upserts a single document
4037
* - Finds the upserted document with the encrypted client using an encrypted field

source/includes/generated/in-use-encryption/csfle/java/kmip/reader/src/main/java/com/mongodb/csfle/MakeDataKey.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@
3939
import com.mongodb.client.vault.ClientEncryptions;
4040
import com.mongodb.client.model.IndexOptions;
4141

42-
4342
/*
44-
* - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS
45-
* - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS
43+
* - Creates master key in KMIP KMS
44+
* - Locates existing data encryption key in KMIP KMS
4645
* - Prints base 64-encoded value of the data encryption key
4746
*/
4847
public class MakeDataKey {
@@ -100,4 +99,4 @@ public static void main(String[] args) throws Exception {
10099
clientEncryption.close();
101100
// end-create-dek
102101
}
103-
}
102+
}

source/includes/generated/in-use-encryption/csfle/java/local/reader/src/main/java/com/mongodb/csfle/MakeDataKey.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
import java.security.SecureRandom;
4646

4747
/*
48-
* - Reads master key from file "master-key.txt" in root directory of project, or creates one on a KMS
49-
* - Locates existing local encryption key from encryption.__keyVault collection, or from a KMS
48+
* - Reads master key from file "master-key.txt" in root directory of project
49+
* - Locates existing local data encryption key from encryption.__keyVault collection
5050
* - Prints base 64-encoded value of the data encryption key
5151
*/
5252
public class MakeDataKey {
@@ -117,4 +117,4 @@ public static void main(String[] args) throws Exception {
117117
clientEncryption.close();
118118
// end-create-dek
119119
}
120-
}
120+
}

0 commit comments

Comments
 (0)