Skip to content

Commit 8532ee6

Browse files
Editorial review of the page ssl-fips-compatibility (#1839)
1 parent 5a338f7 commit 8532ee6

File tree

1 file changed

+61
-49
lines changed

1 file changed

+61
-49
lines changed

modules/ROOT/pages/security/ssl-fips-compatibility.adoc

Lines changed: 61 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
:description: How to configure Neo4j to use FIPS compatible SSL encryption.
55
:keywords: ssl, tls, authentication, encryption, encrypted, security, fips, fips 140, fips 140-2, nist, hipaa
66

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.
89

9-
For more information see:
10+
For more information, see:
1011

11-
* https://cloudsecurityalliance.org/blog/2023/03/23/what-is-fips-140-and-what-does-it-mean-to-be-fips-compliant
12-
* https://csrc.nist.gov/pubs/fips/140-2/upd2/final
12+
* 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]
1314

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.
1516
It is supplementary to the xref:security/ssl-framework.adoc[] documentation, as many of the configuration processes and requirements are the same.
1617

1718
// . Enable a FIPS certified cryptographic provider
@@ -21,15 +22,17 @@ It is supplementary to the xref:security/ssl-framework.adoc[] documentation, as
2122
// . verify?
2223

2324

25+
[[ssl-fips-prerequisites]]
2426
== Prerequisites
2527

2628
* Verify that the machine running Neo4j has FIPS compatible hardware and operating system.
2729
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.
2931
* Install and configure a non-native authentication provider, for example LDAP or SSO. See xref:authentication-authorization/index.adoc[].
3032
// * Follow the xref:security/checklist.adoc[] to ensure good security practices.
3133

32-
== Enable FIPS SSL Provider (Docker)
34+
[[fips-ssl-provider-docker]]
35+
== Enable FIPS SSL provider (Docker)
3336

3437
The Neo4j RedHat UBI9 Docker image comes with the SSL provider and dependencies pre-installed, but it is not enabled by default.
3538

@@ -53,37 +56,39 @@ docker run -it --rm \
5356
neo4j:{neo4j-version-exact}-enterprise-ubi9
5457
----
5558

59+
[[fips-ssl-provider]]
5660
== Enable FIPS SSL provider
5761

5862
[IMPORTANT]
5963
====
6064
Skip this section if using Neo4j in Docker.
6165
====
6266

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].
6569

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]:
6974

7075
* Apache Portable Runtime Library
7176
* A FIPS certified version of OpenSSL, with a FIPS provider installed and set as default.
7277

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.
7479

7580

7681
[NOTE]
7782
====
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].
7984
8085
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.
8186
====
8287

8388
[[install-apr]]
8489
=== Install Apache portable runtime library
8590

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.
8792

8893
In Debian/Ubuntu this package is usually called `libapr1`
8994
[source, console, subs="attributes"]
@@ -92,45 +97,42 @@ In Debian/Ubuntu this package is usually called `libapr1`
9297
apt install -y libapr1
9398
----
9499

95-
In RedHat Enterprise Linux the package is usually called `apr`:
100+
In RedHat Enterprise Linux, the package is usually called `apr`:
96101

97102
[source, console, subs="attributes"]
98103
.Install Apache Portable Runtime Library in RedHat
99104
----
100105
dnf install -y apr
101106
----
102107

108+
[[install-openssl]]
103109
=== Install OpenSSL
104110

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.
106113

107114
In general:
108115

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/[].
110117
* A FIPS provider must be installed into OpenSSL.
111118
* OpenSSL must be configured to use the FIPS provider by default.
112119
+
113-
See: https://docs.openssl.org/master/man7/fips_module/
114-
115-
OpenSSL documentation can be found at:
116-
117-
* https://openssl-library.org/
120+
For instructions, see https://docs.openssl.org/master/man7/fips_module/[].
118121

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[].
120123

121-
* https://github.com/openssl/openssl
122124

125+
[[install-netty-tcnative-lib]]
126+
=== Install the correct `netty-tcnative` library
123127

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`.
128129

129130
To install the `netty-tcnative` dynamic library:
130131

131132
. Locate the Neo4j `lib` directory.
132133
+
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.
134136
+
135137
This location will be referred to as _<NEO4J_LIB>_.
136138
. Make sure there are no `netty-tcnative-boringssl` libraries present in the _<NEO4J_LIB>_ folder.
@@ -146,7 +148,7 @@ find <NEO4J_LIB> -name "netty-tcnative-boringssl*.jar" -delete
146148
----
147149
ls -l <NEO4J_LIB>/netty-tcnative
148150
----
149-
There are linux and fedora linux variants available, compiled for both x86_64 and ARM 64 architectures.
151+
There are Linux and Fedora Linux variants available, compiled for both x86_64 and ARM 64 architectures.
150152
Select the one matching the local machine's operating system and architecture.
151153
+
152154
. Verify the dependencies are correctly installed using https://www.man7.org/linux/man-pages/man1/ldd.1.html[`ldd`]:
@@ -160,13 +162,13 @@ rm -rf /tmp/META-INF
160162
----
161163
+
162164
[source, console]
163-
.Verify fedora variant of netty-tcnative dependencies are installed
165+
.Verify Fedora variant of netty-tcnative dependencies are installed
164166
----
165167
unzip -d /tmp <NEO4J_LIB>/netty-tcnative/netty-tcnative-*-linux-$(arch)-fedora.jar
166168
ldd /tmp/META-INF/native/libnetty_tcnative_linux_$(arch).so
167169
rm -rf /tmp/META-INF
168170
----
169-
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.
170172
** If any dependencies are missing, they must be installed or Neo4j will fail to run.
171173
** The `libssl.so` and `libcrypto.so` libraries listed must be the ones installed with OpenSSL in the previous steps.
172174
+
@@ -175,37 +177,40 @@ The `ldd` command will show a list of library dependencies and where they will b
175177
[NOTE]
176178
====
177179
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:
179181
[source]
180182
----
181183
"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]".
182184
----
183185
====
184186

185-
187+
[[generate-ssl-cert-private-key]]
186188
== Generate SSL certificate and private key
187189

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+
====
191196

192197
Refer to the xref:security/ssl-framework.adoc#ssl-certificates[SSL certificate and key instructions] for more information.
193198

194199

200+
[[configure-neo4j-ssl-encryption]]
195201
== Configure Neo4j to use SSL encryption
196202

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].
199204

200205
This section describes configuration that must be done *in addition to* standard non-FIPS compliant SSL configuration.
201206

202-
207+
[[bolt-ssl-fips]]
203208
=== Bolt
204209

205210
. Set `xref:configuration/configuration-settings.adoc#config_dbms.netty.ssl.provider[dbms.netty.ssl.provider]=OPENSSL`
206211
. 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].
213+
. Set additional Bolt configurations:
209214
+
210215
[source, properties]
211216
----
@@ -214,14 +219,16 @@ dbms.ssl.policy.bolt.tls_level=REQUIRED
214219
dbms.ssl.policy.bolt.tls_versions=TLSv1.2,TLSv1.3
215220
dbms.ssl.policy.bolt.ciphers=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_AES_128_CCM_8_SHA256,TLS_AES_128_CCM_SHA256
216221
----
217-
. 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.
218224

219225

226+
[[https-ssl-fips]]
220227
=== HTTPS
221228

222229
This section is only applicable if HTTPS is enabled.
223230

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].
225232
+
226233
. Set additional HTTPS configurations:
227234
+
@@ -232,8 +239,9 @@ dbms.ssl.policy.https.tls_level=REQUIRED
232239
dbms.ssl.policy.https.tls_versions=TLSv1.2,TLSv1.3
233240
dbms.ssl.policy.https.ciphers=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_AES_128_CCM_8_SHA256,TLS_AES_128_CCM_SHA256
234241
----
235-
. 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.
236243

244+
[[intra-cluster-encryption-ssl-fips]]
237245
=== Intra-cluster encryption
238246

239247
For FIPS compatbility, intra-cluster encryption must be enabled if you are running a Neo4j cluster.
@@ -249,14 +257,16 @@ dbms.ssl.policy.cluster.client_auth=REQUIRED
249257
dbms.ssl.policy.cluster.tls_versions=TLSv1.2,TLSv1.3
250258
dbms.ssl.policy.cluster.ciphers=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_AES_128_CCM_8_SHA256,TLS_AES_128_CCM_SHA256
251259
----
252-
. 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.
253262

254263

264+
[[backup-ssl-fips]]
255265
=== Backup
256266

257267
This section is applicable on instances or cluster members used for taking backups.
258268

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].
260270
. Set additional backup configurations:
261271
+
262272
[source, properties]
@@ -267,4 +277,6 @@ dbms.ssl.policy.backup.trust_all=false
267277
dbms.ssl.policy.backup.tls_versions=TLSv1.2,TLSv1.3
268278
dbms.ssl.policy.backup.ciphers=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_AES_128_CCM_8_SHA256,TLS_AES_128_CCM_SHA256
269279
----
270-
. 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.
281+
The password must *not* be set in plain text.
282+

0 commit comments

Comments
 (0)