Skip to content

Commit cb9bac8

Browse files
author
Chris Cho
authored
DOCSP-20370: subdomain update (#306)
* DOCSP-20370: subdomain update
1 parent f0f6048 commit cb9bac8

File tree

7 files changed

+51
-75
lines changed

7 files changed

+51
-75
lines changed

conf-sitemap.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

config/build_conf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ git:
66
project:
77
name: 'node-driver'
88
tag: 'node-driver'
9-
url: 'https://docs.mongodb.com/ecosystem/drivers/nodejs'
9+
url: 'https://www.mongodb.com/docs/drivers/nodejs'
1010
title: 'Node Driver Manual'
1111
branched: true
1212
version:

config/intersphinx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ url: https://docs.python.org/2/
44
path: python2.inv
55
---
66
name: mongodb
7-
url: https://docs.mongodb.com/manual/
7+
url: https://www.mongodb.com/docs/manual/
88
path: mongodb.inv
99
...

snooty.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name = "node"
22
title = "Node.js"
3+
intersphinx = ["https://mongodb.com/docs/manual/objects.inv",
4+
"https://mongodb.com/docs/drivers/objects.inv"]
35

46
toc_landing_pages = [
57
"/fundamentals/authentication",

source/fundamentals/csfle.txt

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ Level Encryption (CSFLE)** in the MongoDB Node.js driver.
1818

1919
CSFLE allows you to encrypt specific data fields within a document with
2020
your MongoDB client application before sending the data to the server.
21-
Starting in MongoDB 4.2 Enterprise, you can perform this client-side
21+
Starting in MongoDB 4.2 Enterprise, you can perform this client-side
2222
encryption automatically.
2323

24-
With CSFLE, your client application encrypts fields client-side without
25-
requiring any server-side configuration or directives. CSFLE is useful
26-
for situations in which applications must guarantee that unauthorized
27-
parties, including server administrators, cannot read the encrypted
24+
With CSFLE, your client application encrypts fields client-side without
25+
requiring any server-side configuration or directives. CSFLE is useful
26+
for situations in which applications must guarantee that unauthorized
27+
parties, including server administrators, cannot read the encrypted
2828
data.
2929

30-
This guide is a quick introduction to CSFLE using the Node.js driver.
30+
This guide is a quick introduction to CSFLE using the Node.js driver.
3131
For in-depth information on how CSFLE works, see
32-
the :manual:`CSFLE reference </core/security-client-side-encryption/>`
33-
documentation. For a real-world scenario and implementation, see our
34-
`CSFLE Guide <https://docs.mongodb.com/drivers/security/client-side-field-level-encryption-guide>`_.
32+
the :manual:`CSFLE reference </core/security-client-side-encryption/>`
33+
documentation. For a real-world scenario and implementation, see our
34+
`CSFLE Guide <https://www.mongodb.com/docs/drivers/security/client-side-field-level-encryption-guide>`__.
3535

3636
Installation
3737
------------
@@ -45,8 +45,8 @@ To get started with CSFLE in your client application, you need:
4545
``mongodb-client-encryption``
4646
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4747

48-
The ``mongodb-client-encryption`` module is the official client
49-
encryption module for the MongoDB Node.js driver. It contains bindings
48+
The ``mongodb-client-encryption`` module is the official client
49+
encryption module for the MongoDB Node.js driver. It contains bindings
5050
to communicate with the native library that manages the encryption.
5151

5252
Add it to your project using ``npm``:
@@ -59,10 +59,10 @@ Add it to your project using ``npm``:
5959
``mongocryptd``
6060
~~~~~~~~~~~~~~~
6161

62-
``mongocryptd`` is launched automatically by the package, and it is used for
63-
automatic encryption. ``mongocryptd`` communicates with
64-
``mongodb-client-encryption`` to automatically encrypt the information
65-
specified by a user-provided
62+
``mongocryptd`` is launched automatically by the package, and it is used for
63+
automatic encryption. ``mongocryptd`` communicates with
64+
``mongodb-client-encryption`` to automatically encrypt the information
65+
specified by a user-provided
6666
:manual:`JSON Schema </reference/security-client-side-automatic-json-schema/>`.
6767

6868
For more detailed information on ``mongocryptd``, see the
@@ -71,23 +71,23 @@ For more detailed information on ``mongocryptd``, see the
7171
Example
7272
-------
7373

74-
The following example shows how to configure a CSFLE-enabled client
75-
with a local key and a JSON schema. Values in the ``ssn`` field are
76-
automatically encrypted before insertion, and decrypted when calling
74+
The following example shows how to configure a CSFLE-enabled client
75+
with a local key and a JSON schema. Values in the ``ssn`` field are
76+
automatically encrypted before insertion, and decrypted when calling
7777
``find()`` with a CSFLE-enabled client.
7878

7979
.. warning::
8080

81-
MongoDB recommends using local key management only for testing
81+
MongoDB recommends using local key management only for testing
8282
purposes, and using a remote key management service
8383
for production.
8484

85-
An expanded example with support for remote key management services is
86-
available at MongoDB University's GitHub
85+
An expanded example with support for remote key management services is
86+
available at MongoDB University's GitHub
8787
`Node CSFLE Example <https://github.com/mongodb-university/csfle-guides/tree/master/nodejs>`__.
8888

8989
.. note::
90-
90+
9191
Auto encryption requires MongoDB **Enterprise** or **Atlas**.
9292

9393
To run this example, first complete the following steps:
@@ -98,16 +98,16 @@ To run this example, first complete the following steps:
9898
- Start a ``mongocryptd`` locally on the default port 27020.
9999

100100
.. code-block:: javascript
101-
101+
102102
const { MongoClient, Binary } = require("mongodb");
103103
const { ClientEncryption } = require("mongodb-client-encryption");
104104
const fs = require("fs/promises");
105-
105+
106106
async function getRegularClient() {
107107
const client = new MongoClient("mongodb://localhost:27017");
108108
return await client.connect();
109109
}
110-
110+
111111
async function getCsfleEnabledClient(schemaMap) {
112112
const client = new MongoClient("mongodb://localhost:27017", {
113113
autoEncryption: {
@@ -122,7 +122,7 @@ To run this example, first complete the following steps:
122122
});
123123
return await client.connect();
124124
}
125-
125+
126126
function createJsonSchemaMap(dataKey) {
127127
return {
128128
"users.ssns": {
@@ -141,7 +141,7 @@ To run this example, first complete the following steps:
141141
},
142142
};
143143
}
144-
144+
145145
async function makeDataKey(client) {
146146
const encryption = new ClientEncryption(client, {
147147
keyVaultNamespace: "encryption.__keyVault",
@@ -151,69 +151,69 @@ To run this example, first complete the following steps:
151151
},
152152
},
153153
});
154-
154+
155155
let dataKey = await encryption.createDataKey("local", {
156156
masterKey: null,
157157
});
158-
158+
159159
return dataKey.toString("base64");
160160
}
161-
161+
162162
async function run(regularClient, csfleClient) {
163163
try {
164-
164+
165165
regularClient = await getRegularClient();
166-
166+
167167
let dataKey = await makeDataKey(regularClient);
168168
console.log(
169169
"New dataKey created for this run:\n",
170170
dataKey
171171
);
172-
172+
173173
const schemaMap = createJsonSchemaMap(dataKey);
174-
174+
175175
csfleClient = await getCsfleEnabledClient(schemaMap);
176-
176+
177177
const regularClientSsnsColl = regularClient
178178
.db("users")
179179
.collection("ssns");
180180
const csfleClientSsnsColl = csfleClient
181181
.db("users")
182182
.collection("ssns");
183-
183+
184184
const exampleDocument = {
185185
name: "Jon Doe",
186186
ssn: 241014209,
187187
};
188-
188+
189189
await csfleClientSsnsColl.updateOne(
190190
{ ssn: exampleDocument.ssn },
191191
{ $set: exampleDocument },
192192
{ upsert: true }
193193
);
194-
194+
195195
const csfleFindResult = await csfleClientSsnsColl.findOne({
196196
ssn: exampleDocument.ssn,
197197
});
198198
console.log(
199199
"Document retrieved with csfle enabled client:\n",
200200
csfleFindResult
201201
);
202-
202+
203203
const regularFindResult = await regularClientSsnsColl.findOne({
204204
name: "Jon Doe",
205205
});
206206
console.log(
207-
"Document retrieved with regular client:\n",
207+
"Document retrieved with regular client:\n",
208208
regularFindResult
209209
);
210-
210+
211211
} finally {
212212
if (regularClient) await regularClient.close();
213213
if (csfleClient) await csfleClient.close();
214214
}
215215
}
216-
216+
217217
run().catch(error => {
218218
console.dir(error);
219219
process.exit(1);

source/includes/localhost-connection.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ purposes instead of using an Atlas cluster, you need to complete the following:
55
or `Enterprise <https://www.mongodb.com/try/download/enterprise>`__ version
66
of MongoDB Server.
77

8-
#. `Install and configure <https://docs.mongodb.com/manual/installation/>`__
9-
MongoDB Server.
8+
#. :manual:`Install and configure </installation/>` MongoDB Server.
109

1110
#. Start the server.
1211

source/issues-and-help.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Issues & Help
77
Our developer community is vibrant and highly engaged, with extensive experience using Node.js with MongoDB.
88

99
Often, the quickest way to get support for general questions is through the
10-
`MongoDB Community Forums <https://community.mongodb.com>`_.
10+
`MongoDB Community Forums <https://www.mongodb.com/community/forums>`__.
1111

12-
Refer to our `support channels <http://www.mongodb.org/about/support>`_ documentation for more information.
12+
Refer to our :manual:`support channels </support>` documentation for more information.
1313

1414
Bugs / Feature Requests
1515
-----------------------
@@ -26,7 +26,8 @@ please open a case in our issue management tool, JIRA:
2626
Bug reports in JIRA for the Node.js driver and the Core Server (i.e. SERVER) project are **public**.
2727

2828
If you’ve identified a security vulnerability in a driver or any other
29-
MongoDB project, please report it according to the instructions found in the `Create a Vulnerability Report <http://docs.mongodb.org/manual/tutorial/create-a-vulnerability-report>`_.
29+
MongoDB project, please report it according to the instructions found in
30+
the :manual:`Create a Vulnerability Report </tutorial/create-a-vulnerability-report>`.
3031

3132
Pull Requests
3233
-------------

0 commit comments

Comments
 (0)