CARVIEW |
Select Language
HTTP/2 200
date: Tue, 22 Jul 2025 05:17:13 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/neo4j/neo4j-javascript-driver.git
etag: W/"3b6d3c2d106458d9da496d8aa15d0b29"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=1eER8VV4AZ216uP%2F%2B0vYADhrXVJ7LUDcj2Mm6HQnYRqMfaYo3KvF40GkkpaqxObksuAVbT59cs1QgkBju9McnvAoejoZ3juUEfL%2BQKYF4W0Vre9dEGoVg9QElVz88FNbHM44XfzeeBv1MW6DPBKKSqeDL56TNCCy0Oe1PYz4HQJ%2B5o8Hm7YKzqguVLlEd6idDofNazBBrXXMZiCc3D7FZY2uAvavoo499RDDmHFhTauYkBeM3R26coTTWikUebV92uYL%2FrQE2uHSHwBBNieKDQ%3D%3D--LEnJuftpXiz67Pi8--gZvxTDRgnOMGXMvkwm%2FBRQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.116845973.1753161432; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 05:17:12 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 05:17:12 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8CB0:3D0436:3BF67:4422B:687F1ED8
Introduce Client Certificate configuration (#1183) · neo4j/neo4j-javascript-driver@552ea6c · GitHub
⚠️ This API is released as preview.
⚠️ This feature is NodeJS only. Browser should configure the client certificate in the system certificates.
The ClientCertificate is a mechanism to support mutual TLS as a second factor for authentication. The driver's certificate will not be used to authenticate a user on the DBMS, but only to authenticate the driver as a trusted client to the DBMS. Another authentication mechanism is still required to authenticate the user.
The configuration is done by using the driver configuration, the property name is `clientCertificate` and this a object with the following properties:
* `certfile`: The path to client certificate file. This is can configured as list of paths.
* `keyfile`: The path to key file. This can also be configured as a list of paths, an object contain `path` and `password` or a list of objects contain `path` and `password`.
* `password` (optional): The client key password.
See [node documentation](https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions) for understanding how password, certs and keys work together.
Configuration example:
```javascript
import neo4j from 'neo4j-driver'
const driver = neo4j.driver('neo4j+s://myhost:7687', MY_CREDENTIALS, {
clientCertificate: {
certfile: '/path/to/cert/file.cert',
keyfile: '/path/to/cert/file.pem',
password: 'the_key_password' // optional
}
})
// then use your driver as usual.
```
### Client Certificate Provider and Certificate Rotation
In case of the certificate needs to be changed, the driver offers an api for change client certificates without creating a new driver instance. The change is done by inform an `ClientCertificateProvider` instead of a `ClientCertificate` in the driver configuration.
`ClientCertificateProvider` is a public interface which can be implemented by user. However, the driver offers an implementation of this interface for working with certificate rotation scenarios.
```javascript
import neo4j from 'neo4j-driver'
const initialClientCertificate: {
certfile: '/path/to/cert/file.cert',
keyfile: '/path/to/cert/file.pem',
password: 'the_key_password' // optional
}
const clientCertificateProvider = neo4j.clientCertificateProviders.rotating({
initialCertificate: initialClientCertificate
})
const driver = neo4j.driver('neo4j+s://myhost:7687', MY_CREDENTIALS, {
clientCertificate: clientCertificateProvider
})
// use the driver as usual
// then you have new certificate which will replace the old one
clientCertificateProvider.updateCertificate({
certfile: '/path/to/cert/new_file.cert',
keyfile: '/path/to/cert/new_file.pem',
password: 'the_new_key_password' // optional
})
// New connections will be created using the new certificate.
// however, older connections will not be closed if they still working.
```
⚠️ This feature is NodeJS only. Browser should configure the client certificate in the system certificates.
⚠️ This API is released as preview.Dismiss banner
Copy file name to clipboard
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/browser/index.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/channel-config.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/deno/deno-channel.js
Copy file name to clipboard
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/deno/index.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/node/index.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/node/node-channel.js
Copy file name to clipboard
Copy file name to clipboard
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit 552ea6c
authored
Introduce Client Certificate configuration (#1183)
1 parent 6f72b3d commit 552ea6cCopy full SHA for 552ea6c
File tree
Expand file treeCollapse file tree
56 files changed
+1944
-72
lines changedFilter options
- packages
- bolt-connection
- src
- channel
- browser
- deno
- node
- connection-provider
- connection
- test/connection-provider
- core
- src
- test
- neo4j-driver-deno
- lib
- bolt-connection
- channel
- browser
- deno
- node
- connection-provider
- connection
- core
- test
- neo4j-driver-lite/src
- neo4j-driver
- src
- test/internal
- types
- testkit-backend/src
- feature
- skipped-tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
56 files changed
+1944
-72
lines changedpackages/bolt-connection/src/channel/browser/browser-client-certificates-loader.js
Copy file name to clipboard+21Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + |
packages/bolt-connection/src/channel/browser/index.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/browser/index.js+2-1Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + |
packages/bolt-connection/src/channel/channel-config.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/channel-config.js+3-1Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| 49 | + | |
49 | 50 |
| |
50 |
| - | |
| 51 | + | |
51 | 52 |
| |
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
| 59 | + | |
58 | 60 |
| |
59 | 61 |
| |
60 | 62 |
| |
|
packages/bolt-connection/src/channel/deno/deno-channel.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/deno/deno-channel.js+11Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
239 | 239 |
| |
240 | 240 |
| |
241 | 241 |
| |
| 242 | + | |
| 243 | + | |
242 | 244 |
| |
243 | 245 |
| |
244 | 246 |
| |
| |||
250 | 252 |
| |
251 | 253 |
| |
252 | 254 |
| |
| 255 | + | |
| 256 | + | |
253 | 257 |
| |
254 | 258 |
| |
255 | 259 |
| |
| |||
265 | 269 |
| |
266 | 270 |
| |
267 | 271 |
| |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
268 | 279 |
| |
269 | 280 |
| |
270 | 281 |
| |
|
packages/bolt-connection/src/channel/deno/deno-client-certificates-loader.js
Copy file name to clipboard+21Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + |
packages/bolt-connection/src/channel/deno/index.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/deno/index.js+2-1Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + |
packages/bolt-connection/src/channel/node/index.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/node/index.js+2-1Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + |
packages/bolt-connection/src/channel/node/node-channel.js
Copy file name to clipboardExpand all lines: packages/bolt-connection/src/channel/node/node-channel.js+18-5Lines changed: 18 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
| 53 | + | |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
| |||
79 | 80 |
| |
80 | 81 |
| |
81 | 82 |
| |
82 |
| - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
83 | 88 |
| |
84 | 89 |
| |
85 | 90 |
| |
| |||
109 | 114 |
| |
110 | 115 |
| |
111 | 116 |
| |
112 |
| - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 |
| |
114 | 123 |
| |
115 | 124 |
| |
| |||
198 | 207 |
| |
199 | 208 |
| |
200 | 209 |
| |
| 210 | + | |
| 211 | + | |
| 212 | + | |
201 | 213 |
| |
202 | 214 |
| |
203 |
| - | |
| 215 | + | |
204 | 216 |
| |
205 | 217 |
| |
206 | 218 |
| |
207 |
| - | |
| 219 | + | |
| 220 | + | |
208 | 221 |
| |
209 | 222 |
| |
210 | 223 |
| |
|
packages/bolt-connection/src/channel/node/node-client-certificates-loader.js
Copy file name to clipboard+65Lines changed: 65 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + |
packages/bolt-connection/src/connection-provider/client-certificate-holder.js
Copy file name to clipboard+43Lines changed: 43 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + |
You can’t perform that action at this time.
0 commit comments