Skip to content

Commit ee8e73a

Browse files
committed
Review
1 parent 5f07492 commit ee8e73a

1 file changed

Lines changed: 49 additions & 39 deletions

File tree

modules/ROOT/pages/fips-140-3-compliance-support.adoc

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,42 @@ Mule doesn't run in FIPS security mode by default. To enable it, you must:
1515

1616
FIPS 140-3 support requires:
1717

18-
* Mule 4.10 or later
19-
+
20-
For earlier versions of Mule runtime, use xref:fips-140-2-compliance-support.adoc[FIPS 140-2 Compliance Support] which requires:
18+
* Mule 4.10 or later (for earlier versions of Mule runtime, use xref:fips-140-2-compliance-support.adoc[FIPS 140-2 Compliance Support])
2119
* Java 17 or later
2220
* FIPS license from the license `.zip` file provided by MuleSoft (the non-FIPS license isn't valid for FIPS mode)
2321

2422
== Assumptions
2523

2624
This document assumes you're familiar with https://csrc.nist.gov/publications/detail/fips/140/3/final[FIPS 140-3], the US government security standard that requires that compliant parties use only cryptographic algorithms and techniques that have been certified by NIST.
2725

28-
These instructions use Bouncy Castle 2.0.0, the recommended FIPS 140-3 certified security provider for Mule runtime. If you use a different https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules[certified security provider], refer to that provider's documentation for configuration instructions.
26+
These instructions use BC-FJA, the recommended FIPS 140-3 certified security provider for Mule runtime (https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/4943[Certificate #4943]). If you use a different https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules[certified security provider], refer to that provider's documentation for configuration instructions.
2927

3028
[[set_up_environment]]
31-
== Installing Bouncy Castle Security Provider
3229

33-
Mule runtime uses Bouncy Castle 2.0.0 as its FIPS 140-3 certified cryptography provider.
30+
== Installing BC-FJA Security Provider
31+
32+
Mule runtime uses BC-FJA 2.1.2 as its FIPS 140-3 certified cryptography provider.
3433

3534
=== Installation Steps
3635

37-
These instructions show how to install and configure Bouncy Castle security provider in Java 17 or later.
36+
These instructions show how to install and configure BC-FJA security provider in Java 17 or later.
3837

3938
. Verify that you're using Java 17 or later and `JAVA_HOME` is set.
40-
. Download the Bouncy Castle 2.0.0 provider files from https://www.bouncycastle.org/fips-java/[the BouncyCastle website].
41-
. Copy the required JAR files to the `$MULE_HOME/lib/boot` folder:
39+
. Download the BC-FJA 2.1.2 provider files from https://www.bouncycastle.org/fips-java/[the BouncyCastle website].
40+
. Copy the required JAR files to the `${MULE_HOME}/lib/boot` folder:
4241
+
4342
----
44-
bc-fips-2.0.0.jar
45-
bctls-fips-2.0.19.jar
46-
bcpkix-fips-2.0.7.jar
47-
bcutil-fips-2.0.3.jar
48-
bcpg-fips-2.0.9.jar
49-
bcjmail-fips-2.0.5.jar
43+
bc-fips-2.1.2.jar
44+
bcutil-fips-2.1.5.jar
45+
bctls-fips-2.1.22.jar
46+
bcpkix-fips-2.1.10.jar
5047
----
5148
+
52-
. Configure the security providers in the `$JAVA_HOME/conf/security/java.security` file:
49+
. Configure the security providers in the `${JAVA_HOME}/conf/security/java.security` file:
5350
+
5451
----
5552
security.provider.1=org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider
5653
security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider fips:BCFIPS
57-
security.provider.3=SUN
5854
----
5955
+
6056
. Configure the key manager and trust manager algorithms in the same `java.security` file:
@@ -66,9 +62,9 @@ ssl.TrustManagerFactory.algorithm=PKIX
6662

6763
== Running Mule in FIPS Security Mode
6864

69-
After installing the Bouncy Castle provider, configure Mule to run in FIPS 140-3 mode:
65+
After installing the BC-FJA provider, configure Mule to run in FIPS 140-3 mode:
7066

71-
. Open your `wrapper.conf` file (located in `$MULE_HOME/conf`).
67+
. Open your `wrapper.conf` file (located in `${MULE_HOME}/conf`).
7268
. Add these properties. Replace `<n>` with the next sequential number in your file:
7369
+
7470
----
@@ -80,6 +76,9 @@ wrapper.java.additional.<n>=-Dorg.bouncycastle.fips.approved_only=true
8076
8177
# Required for Java 17+ module access
8278
wrapper.java.additional.<n>=--add-opens=java.base/sun.security.provider=org.bouncycastle.fips.core
79+
80+
# Set keystore type to BCFKS
81+
wrapper.java.additional.<n>=-Dmule.keystore.type=BCFKS
8382
----
8483
+
8584
. If you're using a clustered environment, also add the cluster encryption key:
@@ -92,9 +91,9 @@ For more information about clustering in FIPS mode, see xref:mule-high-availabil
9291
+
9392
. Save your changes and start Mule runtime.
9493

95-
[NOTE]
94+
[IMPORTANT]
9695
--
97-
Starting with Mule 4.10, BCFKS is the default keystore type. Setting `mule.keystore.type=BCFKS` in your `wrapper.conf` file isn't required.
96+
In FIPS-compliant environments, all keystores and truststores typically require BCFKS format. However, you may need to support legacy JKS stores, such as the default Java truststore at `${JAVA_HOME}/lib/security/cacerts`. See <<FIPS 140-3 Compliant Keystore Formats>> for configuration options.
9897
--
9998

10099
When Mule launches, the startup logs show that FIPS 140-3 security mode is enabled. Mule automatically restricts protocol negotiations to use only approved cryptographic cipher suites.
@@ -131,42 +130,53 @@ These cipher suites are enabled by default when running Mule in FIPS 140-3 mode.
131130

132131
[NOTE]
133132
--
134-
These cipher suites are configured in the `$MULE_HOME/conf/tls-fips140-3.conf` file. FIPS 140-3 requires support for TLS 1.3 and TLS 1.2. Earlier TLS versions aren't supported.
133+
These cipher suites are configured in the `${MULE_HOME}/conf/tls-fips140-3.conf` file. FIPS 140-3 requires support for TLS 1.3 and TLS 1.2. Earlier TLS versions aren't supported.
135134
--
136135

137136
== FIPS 140-3 Compliant Keystore Formats
138137

139-
Keystores or truststores in Mule apps are usually formatted as `PKCS12` or `JKS`. These formats aren't FIPS compliant. For compliance, convert them to `BCFKS` format:
140-
141-
. Download the `bc-fips-2.0.0.jar` file from the https://www.bouncycastle.org/download/bouncy-castle-java-fips/[Bouncy Castle website].
142-
. Use this example command to convert a keystore to `BCFKS` format:
138+
Keystores or truststores in non-FIPS environments are typically formatted as `PKCS12` or `JKS`. Since these formats are not FIPS-compliant, they need to be converted to `BCFKS` format.
143139

140+
. Use this example command to convert a `JKS` keystore to `BCFKS` format. If the source keystore is `PKCS12`, set `-srcstoretype` to `PKCS12` in the `keytool` command:
141+
+
144142
----
145-
BC_FIPS_JAR=${BC_PATH}/bc-fips-2.0.0.jar # Replace with a correct path
146-
OLD_KEYSTORE="keystore.jks" # Replace with the keystore to convert
147-
OLD_PASSWD="changeit" # Replace with the keystore password
148-
NEW_KEYSTORE="keystore.bcfks" # Replace with the new keystore
149-
NEW_PASSWD="changeit" # Replace with the new keystore password
143+
BC_FIPS_JAR=${MULE_HOME}/lib/boot/bc-fips-2.1.2.jar # Replace with a correct path
144+
OLD_KEYSTORE="keystore.jks" # Replace with the keystore to convert
145+
OLD_PASSWD="changeit" # Replace with the keystore password
146+
NEW_KEYSTORE="keystore.bcfks" # Replace with the new keystore
147+
NEW_PASSWD="changeit" # Replace with the new keystore password
150148
151149
keytool -importkeystore \
150+
-providerclass sun.security.provider.Sun \
152151
-providerclass org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider \
153152
-providerpath ${BC_FIPS_JAR} \
154153
-srckeystore ${OLD_KEYSTORE} -srcstoretype JKS -srcstorepass ${OLD_PASSWD} \
155154
-destkeystore ${NEW_KEYSTORE} -deststoretype BCFKS -deststorepass ${NEW_PASSWD}
156155
----
157-
158-
[NOTE]
159-
If the source keystore is `PKCS12`, set `-srcstoretype` to `PKCS12` in the `keytool` command.
160-
161-
[start=4]
162-
. Update the xref:tls-configuration.adoc[TLS configuration] in the Mule configuration file to use the new keystore or truststore:
163-
156+
. Update the xref:tls-configuration.adoc[TLS configuration] in your Mule application to use the new keystore or truststore:
157+
+
164158
----
165159
<tls:context>
166160
<tls:key-store type="bcfks" path="server.bcfks" password="changeit" keyPassword="changeit" alias="default" />
167161
<tls:trust-store type="bcfks" path="client.bcfks" password="changeit" />
168162
</tls:context>
169163
----
164+
. A special case is the truststore of the JVM, which is a `JKS` store by default, located at `${JAVA_HOME}/lib/security/cacerts`. There are two approaches to handle this special case:
165+
** Convert to BCFKS
166+
*** Convert the `JKS` store to `BCFKS` using the `keytool` command as described in <<FIPS 140-3 Compliant Keystore Formats>>, pointing OLD_KEYSTORE to `${JAVA_HOME}/lib/security/cacerts` and NEW_KEYSTORE to `${JAVA_HOME}/lib/security/cacerts.bcfks`
167+
*** Add the following properties to your `wrapper.conf` file:
168+
+
169+
----
170+
wrapper.java.additional.<n>=-Djavax.net.ssl.trustStore=${JAVA_HOME}/lib/security/cacerts.bcfks
171+
wrapper.java.additional.<n>=-Djavax.net.ssl.trustStorePassword=changeit
172+
wrapper.java.additional.<n>=-Djavax.net.ssl.trustStoreType=bcfks
173+
----
174+
** Allow legacy `JKS` store
175+
*** Add the following property to your `wrapper.conf` file:
176+
+
177+
----
178+
wrapper.java.additional.<n>=-Dorg.bouncycastle.jca.enable_jks=true
179+
----
170180

171181
== Connectors Compatibility
172182

@@ -188,6 +198,6 @@ Only connectors tagged as `fips-140-3-verified` in Anypoint Exchange are certifi
188198

189199
== See Also
190200

191-
* https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules[Validated FIPS-3 Cryptographic Modules]
201+
* https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules[Validated FIPS 140-3 Cryptographic Modules]
192202
* https://csrc.nist.gov/publications/detail/fips/140/3/final[FIPS 140-3 Standard]
193203
* xref:fips-140-2-compliance-support.adoc[FIPS 140-2 Compliance Support]

0 commit comments

Comments
 (0)