@@ -67,7 +67,7 @@ content: |
67
67
.. list-table::
68
68
:header-rows: 1
69
69
:stub-columns: 1
70
- :widths: 30 15 45
70
+ :widths: 20 12 68
71
71
72
72
* - Field
73
73
- Required
@@ -79,10 +79,32 @@ content: |
79
79
80
80
* - privateKey
81
81
- Yes
82
- - Identifies your service account private key in either
83
- `base64 string <https://en.wikipedia.org/wiki/Base64>`__ or
84
- :manual:`Binary subtype 0 <reference/mongodb-extended-json/#bson.Binary>`
85
- format.
82
+ - | Identifies your service account private key in either
83
+ `base64 string <https://en.wikipedia.org/wiki/Base64>`__ or
84
+ :manual:`Binary subtype 0 </reference/mongodb-extended-json/#bson.Binary>`
85
+ format without the prefix and suffix markers.
86
+ |
87
+ | Suppose your service account private key value is as follows:
88
+
89
+ .. code-block:: none
90
+ :copyable: false
91
+
92
+ -----BEGIN PRIVATE KEY-----\nyour-private-key\n-----END PRIVATE KEY-----\n
93
+
94
+ | The value you would specify for this field is:
95
+
96
+ .. code-block:: none
97
+ :copyable: false
98
+
99
+ your-private-key
100
+
101
+ | If you have a ``user-key.json`` credential file, you can extract
102
+ the string by executing the following command in a bash or
103
+ similar shell:
104
+
105
+ .. code-block:: shell
106
+
107
+ cat user-key.json | jq -r .private_key | openssl pkcs8 -topk8 -nocrypt -inform PEM -outform DER | base64 -w 0
86
108
87
109
* - endpoint
88
110
- No
@@ -91,8 +113,8 @@ content: |
91
113
92
114
2. Next, add your authentication credentials to your CSFLE-enabled client
93
115
code:
94
-
95
- .. include:: /includes/substitute-placeholders.rst
116
+
117
+ .. include:: /includes/substitute-placeholders-gcp .rst
96
118
97
119
.. tabs-drivers::
98
120
@@ -202,7 +224,7 @@ content: |
202
224
.. note::
203
225
204
226
To use the GCP KMS, you must use
205
- `libmongocrypt <https://github.com/mongodb/libmongocrypt>`__
227
+ `libmongocrypt <https://github.com/mongodb/libmongocrypt>`__
206
228
version 1.1 or later in your application's environment.
207
229
208
230
---
@@ -258,8 +280,8 @@ content: |
258
280
2. Once you have the required information, update and run the following code
259
281
to generate a new data encryption key:
260
282
261
- .. include:: /includes/substitute-placeholders.rst
262
-
283
+ .. include:: /includes/substitute-placeholders-gcp-key .rst
284
+
263
285
.. tabs-drivers::
264
286
265
287
.. tab::
@@ -280,7 +302,7 @@ content: |
280
302
.append("endpoint", "<GCP KMS API endpoint>"));
281
303
282
304
BsonBinary dataKeyId = clientEncryption.createDataKey("gcp", dataKeyOptions);
283
-
305
+
284
306
.. tab::
285
307
:tabid: nodejs
286
308
0 commit comments