You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/security/ssl-fips-compatibility.adoc
+61-49Lines changed: 61 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,15 @@
4
4
:description: How to configure Neo4j to use FIPS compatible SSL encryption.
5
5
:keywords: ssl, tls, authentication, encryption, encrypted, security, fips, fips 140, fips 140-2, nist, hipaa
6
6
7
-
Federal Information Processing Standards (FIPS) 140 is a U.S. government standard established by the National Institute of Standards and Technology (NIST) which is used to accredit cryptographic modules such as those used in TLS network encryption. While FIPS 140 compliance is primarily required for federal agencies and their contractors, it also is used in the healthcare sector under regulations like the Health Insurance Portability and Accountability Act (HIPAA) to protect patient data.
7
+
Federal Information Processing Standards (FIPS) 140 is a U.S. government standard established by the National Institute of Standards and Technology (NIST) which is used to accredit cryptographic modules such as those used in TLS network encryption.
8
+
While FIPS 140 compliance is primarily required for federal agencies and their contractors, it also is used in the healthcare sector under regulations like the Health Insurance Portability and Accountability Act (HIPAA) to protect patient data.
* https://cloudsecurityalliance.org/blog/2023/03/23/what-is-fips-140-and-what-does-it-mean-to-be-fips-compliant[What is FIPS 140 and What Does it Mean to Be “FIPS Compliant”?]
13
+
* https://csrc.nist.gov/pubs/fips/140-2/upd2/final[FIPS 140-2. Security Requirements for Cryptographic Modules]
13
14
14
-
This is a guide to help configure Neo4j to use TLS / SSL encryption in a FIPS compatible way.
15
+
This is a guide on how to configure Neo4j to use TLS / SSL encryption in a FIPS compatible way.
15
16
It is supplementary to the xref:security/ssl-framework.adoc[] documentation, as many of the configuration processes and requirements are the same.
16
17
17
18
// . Enable a FIPS certified cryptographic provider
@@ -21,15 +22,17 @@ It is supplementary to the xref:security/ssl-framework.adoc[] documentation, as
21
22
// . verify?
22
23
23
24
25
+
[[ssl-fips-prerequisites]]
24
26
== Prerequisites
25
27
26
28
* Verify that the machine running Neo4j has FIPS compatible hardware and operating system.
27
29
Only xref:installation/requirements.adoc#deployment-requirements-software[Linux operating systems] are supported for Neo4j FIPS compatibility at this time.
28
-
* Neo4j Enterprise 5.23.0 or later.
30
+
* Use Neo4j Enterprise 5.23.0 or later.
29
31
* Install and configure a non-native authentication provider, for example LDAP or SSO. See xref:authentication-authorization/index.adoc[].
30
32
// * Follow the xref:security/checklist.adoc[] to ensure good security practices.
31
33
32
-
== Enable FIPS SSL Provider (Docker)
34
+
[[fips-ssl-provider-docker]]
35
+
== Enable FIPS SSL provider (Docker)
33
36
34
37
The Neo4j RedHat UBI9 Docker image comes with the SSL provider and dependencies pre-installed, but it is not enabled by default.
35
38
@@ -53,37 +56,39 @@ docker run -it --rm \
53
56
neo4j:{neo4j-version-exact}-enterprise-ubi9
54
57
----
55
58
59
+
[[fips-ssl-provider]]
56
60
== Enable FIPS SSL provider
57
61
58
62
[IMPORTANT]
59
63
====
60
64
Skip this section if using Neo4j in Docker.
61
65
====
62
66
63
-
The secure networking in Neo4j is provided through the Netty library, which supports both the native JDK SSL provider as well as Netty-supported OpenSSL derivatives.
64
-
Specifically Netty's "Forked Tomcat Native" library called https://github.com/netty/netty-tcnative[netty-tcnative].
67
+
The secure networking in Neo4j is provided through the Netty library, which supports both the native JDK SSL provider and Netty-supported OpenSSL derivatives.
68
+
Specifically Netty's _Forked Tomcat Native_ library called https://github.com/netty/netty-tcnative[netty-tcnative].
65
69
66
-
The `netty-tcnative` library is provided in several variants, but
67
-
to be FIPS compatible the dynamically linked version of `netty-tcnative` must be used, alongside a FIPS compatible installation of OpenSSL.
68
-
This dynamically linked library requires that the following dependencies are installedfootnote:[https://netty.io/wiki/forked-tomcat-native.html]:
70
+
The `netty-tcnative` library is provided in several variants.
71
+
However, to achieve FIPS compliance, you must use the dynamically linked version of `netty-tcnative` alongside a FIPS-compatible installation of OpenSSL.
72
+
73
+
The dynamically linked library requires the following dependencies to be installedfootnote:[https://netty.io/wiki/forked-tomcat-native.html]:
69
74
70
75
* Apache Portable Runtime Library
71
76
* A FIPS certified version of OpenSSL, with a FIPS provider installed and set as default.
72
77
73
-
Refer to https://netty.io/wiki/forked-tomcat-native.html for more information.
78
+
Refer to https://netty.io/wiki/forked-tomcat-native.html/[Forked Tomcat Native] for more information.
74
79
75
80
76
81
[NOTE]
77
82
====
78
-
Netty provide a convenient pre-build, statically linked version of `netty-tcnative` using BoringSSL, but this is not FIPS certifiedfootnote:[https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md].
83
+
Netty provides a convenient pre-build, statically linked version of `netty-tcnative` using BoringSSL, but this is not FIPS certifiedfootnote:[https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md].
79
84
80
85
By using the dynamic `netty-tcnative` library variant combined with a FIPS certified OpenSSL installation, Neo4j's cryptographic operations are delegated by `netty-tcnative` to OpenSSL, transitively giving FIPS compatibility.
81
86
====
82
87
83
88
[[install-apr]]
84
89
=== Install Apache portable runtime library
85
90
86
-
The simplest way to install https://apr.apache.org[Apache Portable Runtime Library] is to use the operating system's package manager.
91
+
To install https://apr.apache.org[Apache Portable Runtime Library], use the operating system's package manager.
87
92
88
93
In Debian/Ubuntu this package is usually called `libapr1`
89
94
[source, console, subs="attributes"]
@@ -92,45 +97,42 @@ In Debian/Ubuntu this package is usually called `libapr1`
92
97
apt install -y libapr1
93
98
----
94
99
95
-
In RedHat Enterprise Linux the package is usually called `apr`:
100
+
In RedHat Enterprise Linux, the package is usually called `apr`:
96
101
97
102
[source, console, subs="attributes"]
98
103
.Install Apache Portable Runtime Library in RedHat
99
104
----
100
105
dnf install -y apr
101
106
----
102
107
108
+
[[install-openssl]]
103
109
=== Install OpenSSL
104
110
105
-
Instructions on how to build and install a FIPS compatible OpenSSL are out of scope for this document. Installation steps can differ depending on operating system, and other security requirements you might have for OpenSSL.
111
+
Instructions on how to build and install a FIPS-compatible OpenSSL are out of the scope of this document.
112
+
Installation steps can differ depending on operating system and other security requirements you might have for OpenSSL.
106
113
107
114
In general:
108
115
109
-
* A list of FIPS certified OpenSSL versions can be found at https://openssl-library.org/source/
116
+
* For a list of FIPS certified OpenSSL versions, see https://openssl-library.org/source/[].
110
117
* A FIPS provider must be installed into OpenSSL.
111
118
* OpenSSL must be configured to use the FIPS provider by default.
For instructions, see https://docs.openssl.org/master/man7/fips_module/[].
118
121
119
-
and on the project's Github page:
122
+
You can find OpenSSL documentation at https://openssl-library.org/[] and on the project's Github page https://github.com/openssl/openssl[].
120
123
121
-
* https://github.com/openssl/openssl
122
124
125
+
[[install-netty-tcnative-lib]]
126
+
=== Install the correct `netty-tcnative` library
123
127
124
-
=== Install correct `netty-tcnative` library
125
-
126
-
Since Neo4j 5.23.0, builds of `netty-tcnative` dynamic library are provided in
127
-
the Neo4j `lib` directory under their own subfolder called `netty-tcnative`.
128
+
Since Neo4j 5.23.0, builds of `netty-tcnative` dynamic library are provided in the Neo4j `lib` directory under their own subfolder called `netty-tcnative`.
128
129
129
130
To install the `netty-tcnative` dynamic library:
130
131
131
132
. Locate the Neo4j `lib` directory.
132
133
+
133
-
The location of the `lib` directory is different depending on the method used to install Neo4j. Check the xref:configuration/file-locations.adoc#neo4j-lib[file locations] documentation for the correct location.
134
+
The location of the `lib` directory is different depending on the method used to install Neo4j.
135
+
Check the xref:configuration/file-locations.adoc#neo4j-lib[file locations] documentation for the correct location.
134
136
+
135
137
This location will be referred to as _<NEO4J_LIB>_.
136
138
. Make sure there are no `netty-tcnative-boringssl` libraries present in the _<NEO4J_LIB>_ folder.
The `ldd` command will show a list of library dependencies and where they will be loaded from on the local machine.
171
+
The `ldd` command shows a list of library dependencies and where they will be loaded from on the local machine.
170
172
** If any dependencies are missing, they must be installed or Neo4j will fail to run.
171
173
** The `libssl.so` and `libcrypto.so` libraries listed must be the ones installed with OpenSSL in the previous steps.
172
174
+
@@ -175,37 +177,40 @@ The `ldd` command will show a list of library dependencies and where they will b
175
177
[NOTE]
176
178
====
177
179
Only copy *one* of the jars, otherwise Neo4j will not be able to resolve dependencies at runtime.
178
-
The error, if this happens, will contain a message like:
180
+
The error, if this happens, contains a message like:
179
181
[source]
180
182
----
181
183
"Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative]".
182
184
----
183
185
====
184
186
185
-
187
+
[[generate-ssl-cert-private-key]]
186
188
== Generate SSL certificate and private key
187
189
188
-
Neo4j SSL encryption requires a xref:security/ssl-framework.adoc#term-ssl-certificate[certificate] in the xref:security/ssl-framework.adoc#term-ssl-x509[X.509] standard, encoded in PEM format.
189
-
and a private key in xref:security/ssl-framework.adoc#term-ssl-pkcs8[PKCS #8] format, also PEM encoded.
190
-
*For FIPS compatibility, the private key must be secured with a password*.
190
+
Neo4j SSL encryption requires a xref:security/ssl-framework.adoc#term-ssl-certificate[certificate] in the xref:security/ssl-framework.adoc#term-ssl-x509[X.509] standard and a private key in xref:security/ssl-framework.adoc#term-ssl-pkcs8[PKCS #8] format, both encoded in PEM format.
191
+
192
+
[IMPORTANT]
193
+
====
194
+
For FIPS compatibility, the private key must be secured with a password.
195
+
====
191
196
192
197
Refer to the xref:security/ssl-framework.adoc#ssl-certificates[SSL certificate and key instructions] for more information.
193
198
194
199
200
+
[[configure-neo4j-ssl-encryption]]
195
201
== Configure Neo4j to use SSL encryption
196
202
197
-
198
-
SSL configuration is described in detail at xref:security/ssl-framework.adoc#ssl-configuration[SSL framework configuration].
203
+
SSL configuration is described in detail in xref:security/ssl-framework.adoc#ssl-configuration[SSL framework configuration].
199
204
200
205
This section describes configuration that must be done *in addition to* standard non-FIPS compliant SSL configuration.
201
206
202
-
207
+
[[bolt-ssl-fips]]
203
208
=== Bolt
204
209
205
210
. Set `xref:configuration/configuration-settings.adoc#config_dbms.netty.ssl.provider[dbms.netty.ssl.provider]=OPENSSL`
206
211
. Set `xref:configuration/configuration-settings.adoc#config_server.bolt.tls_level[server.bolt.tls_level]=REQUIRED`
207
-
. Follow instructions to xref:security/ssl-framework.adoc#ssl-bolt-config[Configure SSL over bolt].
208
-
. Set additional bolt configurations:
212
+
. Follow instructions on how to xref:security/ssl-framework.adoc#ssl-bolt-config[Configure SSL over Bolt].
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework/Using encrypted private key] to configure `dbms.ssl.policy.bolt.private_key_password` to dynamically read the password from an encrypted password file. The password must NOT be set in plain text.
222
+
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework -> Using encrypted private key] to configure `dbms.ssl.policy.bolt.private_key_password` to dynamically read the password from an encrypted password file.
223
+
The password must *not* be set in plain text.
218
224
219
225
226
+
[[https-ssl-fips]]
220
227
=== HTTPS
221
228
222
229
This section is only applicable if HTTPS is enabled.
223
230
224
-
. Follow instructions to xref:security/ssl-framework.adoc#ssl-https-config[Configure SSL over HTTPS].
231
+
. Follow instructions on how to xref:security/ssl-framework.adoc#ssl-https-config[Configure SSL over HTTPS].
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework/Using encrypted private key] to configure `dbms.ssl.policy.https.private_key_password` to dynamically read the password from an encrypted password file. The password must NOT be set in plain text.
242
+
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework -> Using encrypted private key] to configure `dbms.ssl.policy.https.private_key_password` to dynamically read the password from an encrypted password file. The password must NOT be set in plain text.
236
243
244
+
[[intra-cluster-encryption-ssl-fips]]
237
245
=== Intra-cluster encryption
238
246
239
247
For FIPS compatbility, intra-cluster encryption must be enabled if you are running a Neo4j cluster.
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework/Using encrypted private key] to configure `dbms.ssl.policy.cluster.private_key_password` to dynamically read the password from an encrypted password file. The password must NOT be set in plain text.
260
+
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework -> Using encrypted private key] to configure `dbms.ssl.policy.cluster.private_key_password` to dynamically read the password from an encrypted password file.
261
+
The password must *not* be set in plain text.
253
262
254
263
264
+
[[backup-ssl-fips]]
255
265
=== Backup
256
266
257
267
This section is applicable on instances or cluster members used for taking backups.
258
268
259
-
. Follow instructions to xref:security/ssl-framework.adoc#ssl-backup-config[configure SSL for backup communication].
269
+
. Follow instructions on how to xref:security/ssl-framework.adoc#ssl-backup-config[Configure SSL for backup communication].
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework/Using encrypted private key] to configure `dbms.ssl.policy.backup.private_key_password` to dynamically read the password from an encrypted password file. The password must NOT be set in plain text.
280
+
. Follow the instructions in xref:security/ssl-framework.adoc#ssl-config-private-key[SSL Framework -> Using encrypted private key] to configure `dbms.ssl.policy.backup.private_key_password` to dynamically read the password from an encrypted password file.
0 commit comments