|
| 1 | +:description: how to configure SSL in Neo4j 4.4 to be FIPS 140-2 compliant. |
| 2 | + |
| 3 | +:page-role: enterprise-edition |
| 4 | + |
| 5 | +[[neo4j-ssl-fips-compliance]] |
| 6 | += Configure SSL for FIPS 140-2 compatibility |
| 7 | + |
| 8 | +The National Institute of Standards and Technology (NIST) developed the Federal Information Processing Standard (FIPS) Publication 140-2 as a security standard that sets forth requirements for cryptographic modules, including hardware, software, and/or firmware, for U.S. federal agencies. |
| 9 | +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. |
| 10 | + |
| 11 | +Neo4j 4.4 officially supports FIPS 140-2 compliance. |
| 12 | + |
| 13 | +This guide helps configure Neo4j to use TLS/SSL encryption in a FIPS-compliant way. |
| 14 | +It is supplementary to the xref:security/ssl-framework.adoc[SSL framework documentation], as many of the configuration processes and requirements are the same. |
| 15 | + |
| 16 | + |
| 17 | +[[fips-prerequisites]] |
| 18 | +== Prerequisites |
| 19 | + |
| 20 | +* Verify that the machine running Neo4j has FIPS-compatible hardware and operating system. |
| 21 | +Only xref:installation/requirements.adoc#deployment-requirements-software[Linux operating systems] are supported for Neo4j FIPS compatibility. |
| 22 | +* Deploy OpenSSL 3.0.8/3.0.9 in the FIPS mode. |
| 23 | +* Install and configure a non-native authentication provider, for example LDAP or SSO. |
| 24 | +See xref:authentication-authorization/index.adoc[]. |
| 25 | + |
| 26 | + |
| 27 | +[[fips-ssl-providers]] |
| 28 | +== Enable FIPS SSL provider |
| 29 | + |
| 30 | +Set SSL policies on Bolt and HTTPS in the _neo4j.conf_ file. |
| 31 | +See xref:security/ssl-framework.adoc#ssl-configuration[SSL framework -> Configuration] for detailed instructions. |
| 32 | + |
| 33 | +=== Set SSL provider to OpenSSL |
| 34 | + |
| 35 | +Instructions on how to build and install a FIPS-compatible OpenSSL are out of scope for this document. |
| 36 | +Installation steps can differ depending on operating system, and other security requirements you might have for OpenSSL. |
| 37 | + |
| 38 | +* For a list of FIPS certified OpenSSL versions, see link:https://openssl-library.org/source/[]. |
| 39 | +* A FIPS provider must be installed into OpenSSL. |
| 40 | +* OpenSSL must be configured to use the FIPS provider by default. |
| 41 | + |
| 42 | +=== Use the correct version of the `netty-tcnative` library |
| 43 | + |
| 44 | +To achieve FIPS compliance, you must use the dynamically linked version of `netty-tcnative` alongside a FIPS-compatible installation of OpenSSL. |
| 45 | + |
| 46 | +. The dynamically linked library requires the Apache Portable Runtime Library also to be installed. |
| 47 | +To install it, use the operating system’s package manager. |
| 48 | ++ |
| 49 | +In Debian/Ubuntu this package is usually called `libapr1`. |
| 50 | ++ |
| 51 | +[source, console, subs="attributes"] |
| 52 | +.Install Apache Portable Runtime Library in Debian or Ubuntu |
| 53 | +---- |
| 54 | +apt install -y libapr1 |
| 55 | +---- |
| 56 | ++ |
| 57 | +In RedHat Enterprise Linux, the package is usually called `apr`: |
| 58 | ++ |
| 59 | +[source, console, subs="attributes"] |
| 60 | +.Install Apache Portable Runtime Library in RedHat |
| 61 | +---- |
| 62 | +dnf install -y apr |
| 63 | +---- |
| 64 | ++ |
| 65 | +. Neo4j compatible JAR files can be found at: |
| 66 | +https://assets.neo4j.com/netty-tcnative/2.0.65.Final/simplified/netty-tcnative-2.0.65.Final-all.tar |
| 67 | + |
| 68 | +=== Locate the Neo4j `lib` directory. |
| 69 | + |
| 70 | +[NOTE] |
| 71 | +==== |
| 72 | +The location of the `lib` directory is dependent on the installation and your operating system. |
| 73 | +Default file locations are documented in the xref:configuration/file-locations.adoc[Configuration -> Default file locations]. |
| 74 | +==== |
| 75 | + |
| 76 | +. Make sure there are no `netty-tcnative-boringssl` libraries present in the `lib` folder. |
| 77 | ++ |
| 78 | +---- |
| 79 | +find <NEO4J_LIB> -name "netty-tcnative-boringssl*.jar" -delete |
| 80 | +---- |
| 81 | ++ |
| 82 | +. Check which `netty-tcnative` libraries are available: |
| 83 | ++ |
| 84 | +---- |
| 85 | +ls -l <NEO4J_LIB>/netty-tcnative |
| 86 | +---- |
| 87 | ++ |
| 88 | +. Configure paths to the `netty-tcnnative` library using the Neo4j `lib` directory. |
| 89 | ++ |
| 90 | +---- |
| 91 | +export LD_LIBRARY_PATH=/usr/local/openssl/lib64:/home/ec2-user/{neo4j-version-exact}/lib |
| 92 | +export PATH=/home/ec2-user/{neo4j-version-exact}/:$PATH |
| 93 | +---- |
| 94 | + |
| 95 | +=== Generate SSL certificate and private key |
| 96 | + |
| 97 | +[IMPORTANT] |
| 98 | +==== |
| 99 | +For FIPS compatibility, the private key must be secured with a password. |
| 100 | +==== |
| 101 | +Refer to the xref:security/ssl-framework.adoc#ssl-certificates[SSL certificate and key instructions] for more information. |
| 102 | + |
| 103 | +=== Configure _neo4j.conf_ |
| 104 | + |
| 105 | +At last, you have to configure the _neo4j.conf_ file to use FIPS 140-2 approved ciphers. |
| 106 | + |
| 107 | +.Example Bolt SSL configuration |
| 108 | +[source, shell] |
| 109 | +---- |
| 110 | +dbms.ssl.policy.bolt.enabled=true |
| 111 | +dbms.ssl.policy.bolt.base_directory=certificates/https |
| 112 | +dbms.ssl.policy.bolt.private_key=private.key |
| 113 | +dbms.ssl.policy.bolt.public_certificate=public.crt |
| 114 | +dbms.ssl.policy.bolt.client_auth=NONE |
| 115 | +dbms.ssl.policy.bolt.ciphers=TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA |
| 116 | +---- |
| 117 | + |
| 118 | +.Example HTTPS SSL configuration |
| 119 | +[source, shell] |
| 120 | +---- |
| 121 | +dbms.ssl.policy.https.enabled=true |
| 122 | +dbms.ssl.policy.https.base_directory=certificates/https |
| 123 | +dbms.ssl.policy.https.private_key=private.key |
| 124 | +dbms.ssl.policy.https.public_certificate=public.crt |
| 125 | +dbms.ssl.policy.https.client_auth=NONE |
| 126 | +dbms.ssl.policy.https.ciphers=TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_RS A_WITH_AES_128_CBC_SHA |
| 127 | +dbms.netty.ssl.provider=OPENSSL |
| 128 | +---- |
| 129 | + |
| 130 | + |
0 commit comments