-
Notifications
You must be signed in to change notification settings - Fork 3
W-21348100-gov-cloud-fips-140-support-kt #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kevintroller
wants to merge
10
commits into
latest
Choose a base branch
from
W-21348100-gov-cloud-fips-140-support-kt
base: latest
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
31a5a4e
W-21348100: Gov Cloud index updates
kevintroller bf9bb6a
Add FIPS 140-3 compliance support documentation
kevintroller 146b760
Apply suggestion from @dmerlob
kevintroller c717c3e
Apply suggestion from @dmerlob
kevintroller 728ad6e
Apply suggestion from @dmerlob
kevintroller 71b155a
Apply suggestion from @dmerlob
kevintroller 4b6d4c8
Apply suggestion from @dmerlob
kevintroller f7fba24
Apply suggestion from @dmerlob
kevintroller cb1afdd
Apply suggestions from code review
kevintroller f483ebe
Update gov-cloud-fips-140-3-support.adoc
kevintroller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,292 @@ | ||
| = FIPS 140-3 Compliance Support | ||
| ifndef::env-site,env-github[] | ||
| include::_attributes.adoc[] | ||
| endif::[] | ||
| :keywords: fips, certifications, security, fips-140-3, government cloud | ||
|
|
||
| Configure Mule runtime engine (Mule) to run in a Federal Information Processing Standard (FIPS) 140-3 certified environment in MuleSoft Government Cloud. | ||
|
|
||
| Mule doesn't run in FIPS security mode by default. To enable it, you must: | ||
|
|
||
| * Install a certified cryptography module in your Java environment. | ||
| * Adjust Mule runtime settings to run in FIPS security mode. | ||
|
|
||
| Follow the migration path that matches your scenario: | ||
|
|
||
| * <<migrate-fips1402-to-fips1403,Migrating Mule from FIPS 140-2 to FIPS 140-3>> | ||
| * <<migrate-non-fips-to-fips1403,Migrating Mule from Non-FIPS to FIPS 140-3>> | ||
|
|
||
|
|
||
| == Compatibility | ||
|
|
||
| FIPS 140-3 support in MuleSoft Government Cloud requires: | ||
|
|
||
| * Mule runtime engine 4.9 (Government Cloud supported version) | ||
| * Java 17 or later | ||
| * FIPS license from the license `.zip` file provided by MuleSoft (the non-FIPS license is not valid for FIPS mode) | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
|
|
||
| == Assumptions | ||
|
|
||
| This document assumes you are familiar with https://csrc.nist.gov/publications/detail/fips/140/3/final[FIPS 140-3], the US government security standard that requires compliant parties to use only cryptographic algorithms and techniques certified by NIST. | ||
|
|
||
| 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. | ||
|
|
||
| [[migrate-fips1402-to-fips1403]] | ||
| == Migrating from FIPS 140-2 to FIPS 140-3 | ||
|
|
||
| If you are currently running Mule in FIPS 140-2 mode and want to move to FIPS 140-3, apply these cipher and configuration changes. | ||
|
|
||
| === Cipher and Protocol Changes | ||
|
|
||
| * TLS and cipher suites: + | ||
| FIPS 140-3 requires support for TLS 1.3 and TLS 1.2. Earlier TLS versions aren't supported. Use only the FIPS 140-3 compliant cipher suites listed in the xref:#fips-140-3-compliant-cipher-suites[FIPS 140-3 Compliant Cipher Suites] section. Remove or replace any custom TLS or cipher configuration that references FIPS 140-2-only or non–FIPS 140-3 cipher suites. | ||
| * Configuration file: + | ||
| FIPS 140-3 uses the `$MULE_HOME/conf/tls-fips140-3.conf` file for TLS cipher configuration. Ensure your runtime uses this file and that you have removed or replaced references to any FIPS 140-2 TLS configuration file. | ||
|
|
||
| === Security Provider and Java Configuration | ||
|
|
||
| * Bouncy Castle version: + | ||
| Replace the FIPS 140-2 Bouncy Castle provider (typically 1.x FIPS) with Bouncy Castle 2.0.0 FIPS. Install the JARs listed in xref:#set_up_environment[Installing Bouncy Castle Security Provider] and update `java.security` to use `BouncyCastleFipsProvider` and `BouncyCastleJsseProvider` as shown there. | ||
|
|
||
| * KeyManagerFactory and TrustManagerFactory: + | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
| In `$JAVA_HOME/conf/security/java.security`, set: | ||
| + | ||
| ---- | ||
| ssl.KeyManagerFactory.algorithm=PKIX | ||
| ssl.TrustManagerFactory.algorithm=PKIX | ||
| ---- | ||
|
|
||
| === Runtime Configuration (wrapper.conf) | ||
|
|
||
| * Security model: + | ||
| Change the Mule security model from FIPS 140-2 to FIPS 140-3: | ||
| + | ||
| ---- | ||
| # Enable FIPS 140-3 security mode (replace fips140-2) | ||
| wrapper.java.additional.<n>=-Dmule.security.model=fips140-3 | ||
| ---- | ||
| * Approved-only mode: + | ||
| Add or ensure: | ||
| + | ||
| ---- | ||
| wrapper.java.additional.<n>=-Dorg.bouncycastle.fips.approved_only=true | ||
| ---- | ||
| * Java 17+ module access: + | ||
| Add: | ||
| + | ||
| ---- | ||
| wrapper.java.additional.<n>=--add-opens=java.base/sun.security.provider=org.bouncycastle.fips.core | ||
| ---- | ||
|
|
||
| === Keystore Format | ||
|
|
||
| * BCFKS: + | ||
| FIPS 140-3 requires keystores and truststores in `BCFKS` format. If you are still using `PKCS12` or `JKS` from your FIPS 140-2 setup, convert them to `BCFKS` using the steps in xref:#fips-140-3-compliant-keystore-formats[FIPS 140-3 Compliant Keystore Formats]. Update all TLS contexts in your Mule apps to reference the new keystores and set `type="bcfks"`. | ||
|
|
||
| === Connectors and Post-Migration | ||
|
|
||
| * Use only connectors tagged as `fips-140-3-verified` in Anypoint Exchange. Replace or remove connectors that were only verified for FIPS 140-2. | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
| * Restart Mule after all changes and confirm in startup logs that FIPS 140-3 security mode is enabled. | ||
|
|
||
| [[migrate-non-fips-to-fips1403]] | ||
| == Migrating from Non-FIPS to FIPS 140-3 | ||
|
|
||
| If you are running Mule in standard (non-FIPS) mode and need to move directly to FIPS 140-3, complete the following steps. | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
|
|
||
| === Prerequisites | ||
|
|
||
| * Mule runtime engine 4.9, Java 17 or later, and a FIPS license from the license `.zip` file provided by MuleSoft. | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
|
|
||
| === Steps | ||
|
|
||
| . Install the FIPS 140-3 certified cryptography provider: + | ||
| Follow xref:#set_up_environment[Installing Bouncy Castle Security Provider] to install Bouncy Castle 2.0.0 FIPS and configure `java.security` (providers and `ssl.KeyManagerFactory.algorithm` / `ssl.TrustManagerFactory.algorithm`). | ||
|
|
||
| . Configure Mule for FIPS 140-3 mode: + | ||
| In `$MULE_HOME/conf/wrapper.conf`, add the properties described in xref:#running-mule-in-fips-security-mode[Running Mule in FIPS Security Mode] (`mule.security.model=fips140-3`, `org.bouncycastle.fips.approved_only=true`, and the `--add-opens` option). For Mule 4.9, set the keystore type explicitly: | ||
| + | ||
| ---- | ||
| wrapper.java.additional.<n>=-Dmule.keystore.type=BCFKS | ||
| ---- | ||
|
|
||
| . Convert keystores and truststores to BCFKS: + | ||
| Standard Mule setups often use `PKCS12` or `JKS`. Convert all keystores and truststores used by your applications to `BCFKS` using the procedure in xref:#fips-140-3-compliant-keystore-formats[FIPS 140-3 Compliant Keystore Formats]. | ||
|
|
||
| . Update TLS configuration in Mule apps: + | ||
| In your Mule configuration files, update every `tls:context` to use the new BCFKS keystores and truststores with `type="bcfks"` as shown in xref:#fips-140-3-compliant-keystore-formats[FIPS 140-3 Compliant Keystore Formats]. | ||
|
|
||
| . Remove non-compliant cipher and protocol usage: + | ||
| Don't configure custom cipher suites or TLS versions that are not FIPS 140-3 compliant. Rely on the default FIPS 140-3 cipher suites (see xref:#fips-140-3-compliant-cipher-suites[FIPS 140-3 Compliant Cipher Suites]) and ensure no connectors or custom code force non-approved algorithms. | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
|
|
||
| . Verify connector compliance: + | ||
| Only use connectors tagged as `fips-140-3-verified` in Anypoint Exchange. Replace or remove any connector that is not FIPS 140-3 verified (see xref:#connectors-compatibility[Connectors Compatibility]). | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
|
|
||
| . Restart Mule and validate: + | ||
| Save all changes, restart Mule, and confirm in startup logs that FIPS 140-3 security mode is enabled. Test connectivity and integrations that use TLS and cryptography. | ||
|
|
||
| [[set_up_environment]] | ||
| == Installing Bouncy Castle Security Provider | ||
|
|
||
| Mule runtime uses Bouncy Castle 2.0.0 as its FIPS 140-3 certified cryptography provider. | ||
|
|
||
| === Installation Steps | ||
|
|
||
| These instructions show how to install and configure the Bouncy Castle security provider with Java 17 or later. | ||
|
|
||
| . Verify that you are using Java 17 or later and `JAVA_HOME` is set. | ||
| . Download the Bouncy Castle 2.0.0 provider files from https://www.bouncycastle.org/fips-java/[the BouncyCastle website]. | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
| . Copy the required JAR files to the `$MULE_HOME/lib/boot` folder: | ||
| + | ||
| ---- | ||
| bc-fips-2.0.0.jar | ||
| bctls-fips-2.0.19.jar | ||
| bcpkix-fips-2.0.7.jar | ||
| bcutil-fips-2.0.3.jar | ||
| bcpg-fips-2.0.9.jar | ||
| bcjmail-fips-2.0.5.jar | ||
| ---- | ||
| + | ||
| . Configure the security providers in the `$JAVA_HOME/conf/security/java.security` file: | ||
| + | ||
| ---- | ||
| security.provider.1=org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider | ||
| security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider fips:BCFIPS | ||
| security.provider.3=SUN | ||
| ---- | ||
| + | ||
| . Configure the key manager and trust manager algorithms in the same `java.security` file: | ||
| + | ||
| ---- | ||
| ssl.KeyManagerFactory.algorithm=PKIX | ||
| ssl.TrustManagerFactory.algorithm=PKIX | ||
| ---- | ||
|
|
||
| [[running-mule-in-fips-security-mode]] | ||
| == Running Mule in FIPS Security Mode | ||
|
|
||
| After installing the Bouncy Castle provider, configure Mule to run in FIPS 140-3 mode: | ||
|
|
||
| . Open your `wrapper.conf` file (located in `$MULE_HOME/conf`). | ||
| . Add these properties. Replace `<n>` with the next sequential number in your file: | ||
| + | ||
| ---- | ||
| # Enable FIPS 140-3 security mode | ||
| wrapper.java.additional.<n>=-Dmule.security.model=fips140-3 | ||
|
|
||
| # Enable Bouncy Castle approved-only mode | ||
| wrapper.java.additional.<n>=-Dorg.bouncycastle.fips.approved_only=true | ||
|
|
||
| # Required for Java 17+ module access | ||
| wrapper.java.additional.<n>=--add-opens=java.base/sun.security.provider=org.bouncycastle.fips.core | ||
|
|
||
| # For Mule 4.9: set keystore type to BCFKS | ||
| wrapper.java.additional.<n>=-Dmule.keystore.type=BCFKS | ||
| ---- | ||
| + | ||
| . If you are using a clustered environment, also add the cluster encryption key: | ||
| + | ||
| ---- | ||
| wrapper.java.additional.<n>=-Dmule.cluster.network.encryption.key={your-encryption-key} | ||
| ---- | ||
| + | ||
| For more information about clustering in FIPS mode, see the Mule runtime documentation on high-availability clusters and FIPS. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is where you'll add the link to docs? |
||
| + | ||
| . Save your changes and start Mule runtime. | ||
|
|
||
| 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. | ||
|
|
||
| [IMPORTANT] | ||
| -- | ||
| Not all connectors are FIPS 140-3 compliant. Only connectors tagged as `fips-140-3-verified` in Anypoint Exchange are certified for use in FIPS 140-3 environments. Always verify compliance in Exchange before deploying. | ||
| -- | ||
|
|
||
| [[fips-140-3-compliant-cipher-suites]] | ||
| == FIPS 140-3 Compliant Cipher Suites | ||
|
|
||
| These cipher suites are enabled by default when running Mule in FIPS 140-3 mode. Use these when planning or validating migrations from FIPS 140-2 or non-FIPS runtimes. | ||
|
|
||
| === TLS 1.3 Cipher Suites | ||
|
|
||
| * TLS_AES_128_GCM_SHA256 | ||
| * TLS_AES_256_GCM_SHA384 | ||
| * TLS_AES_128_CCM_SHA256 | ||
| * TLS_AES_128_CCM_8_SHA256 | ||
|
|
||
| === TLS 1.2 Cipher Suites | ||
|
|
||
| * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 | ||
| * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | ||
| * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 | ||
| * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 | ||
| * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 | ||
| * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 | ||
| * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 | ||
| * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | ||
| * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | ||
| * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | ||
| * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | ||
|
|
||
| [NOTE] | ||
| -- | ||
| 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 are not supported. | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
| -- | ||
|
|
||
| [[fips-140-3-compliant-keystore-formats]] | ||
| == FIPS 140-3 Compliant Keystore Formats | ||
|
|
||
| Keystores or truststores in Mule apps are often formatted as `PKCS12` or `JKS`. These formats are not FIPS compliant. For compliance, convert them to `BCFKS` format: | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
|
|
||
| . Download the `bc-fips-2.0.0.jar` file from the https://www.bouncycastle.org/download/bouncy-castle-java-fips/[Bouncy Castle website]. | ||
| . Use this example command to convert a keystore to `BCFKS` format: | ||
|
|
||
| ---- | ||
| BC_FIPS_JAR=${BC_PATH}/bc-fips-2.0.0.jar # Replace with a correct path | ||
| OLD_KEYSTORE="keystore.jks" # Replace with the keystore to convert | ||
| OLD_PASSWD="changeit" # Replace with the keystore password | ||
| NEW_KEYSTORE="keystore.bcfks" # Replace with the new keystore | ||
| NEW_PASSWD="changeit" # Replace with the new keystore password | ||
|
|
||
| keytool -importkeystore \ | ||
| -providerclass org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider \ | ||
| -providerpath ${BC_FIPS_JAR} \ | ||
| -srckeystore ${OLD_KEYSTORE} -srcstoretype JKS -srcstorepass ${OLD_PASSWD} \ | ||
| -destkeystore ${NEW_KEYSTORE} -deststoretype BCFKS -deststorepass ${NEW_PASSWD} | ||
| ---- | ||
|
|
||
| [NOTE] | ||
| If the source keystore is `PKCS12`, set `-srcstoretype` to `PKCS12` in the `keytool` command. | ||
|
|
||
| [start=4] | ||
| . Update the TLS configuration in your Mule configuration file to use the new keystore or truststore: | ||
|
|
||
| ---- | ||
| <tls:context> | ||
| <tls:key-store type="bcfks" path="server.bcfks" password="changeit" keyPassword="changeit" alias="default" /> | ||
| <tls:trust-store type="bcfks" path="client.bcfks" password="changeit" /> | ||
| </tls:context> | ||
| ---- | ||
|
|
||
| [[connectors-compatibility]] | ||
| == Connectors Compatibility | ||
|
|
||
| Only connectors tagged as `fips-140-3-verified` in Anypoint Exchange are certified for use in FIPS 140-3 environments. To check compliance in Exchange before deploying: | ||
|
|
||
| . Open Anypoint Exchange. | ||
| . Search for the connector. | ||
| . Check for the `fips-140-3-verified` tag. | ||
|
|
||
| == Tips and Limitations | ||
|
|
||
| * Not all encryption schemes and signatures are FIPS 140-3 compliant. If your app uses a non-approved algorithm, you may see a runtime error such as: | ||
|
kevintroller marked this conversation as resolved.
Outdated
|
||
| + | ||
| .... | ||
| Could not find encryption algorithm '<algorithm-name>'. | ||
| You are running in FIPS mode, so please verify that | ||
| the algorithm is compliant with FIPS. | ||
| .... | ||
| * Different environments can have different security configurations. Test before deploying to production. | ||
|
|
||
| == See Also | ||
|
|
||
| * xref:gov-cloud-security.adoc[Security in MuleSoft Government Cloud] | ||
| * xref:index.adoc[Government Cloud Overview] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.