> For the complete documentation index, see [llms.txt](https://doc.orbeon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.orbeon.com/configuration/advanced/security/fips.md). Agents can also search and read this documentation through its [MCP server](https://doc.orbeon.com/~gitbook/mcp).

# FIPS 140-3 compliance

## Availability

[\[SINCE Orbeon Forms 2026.1\]](https://github.com/orbeon/orbeon-forms-doc/tree/master/release-notes/orbeon-forms-2026.1.md)

## Overview

Orbeon Forms supports running in strict FIPS 140-3 (as well as legacy FIPS 140-2) environments, such as JVMs configured with the Bouncy Castle FIPS provider (`BCFIPS`) in `approved_only` mode.

When `oxf.crypto.fips-mode` is set to `true`:

* **Key derivation and authenticated encryption**:
  * [Field-level encryption](https://doc.orbeon.com/form-builder/advanced/field-level-encryption.md) (for both XML form fields and binary attachments) and Form Runner tokens use `PBKDF2WithHmacSHA256` (with a 16-byte random salt and configurable iteration count) and `AES-256-GCM` (`AES/GCM/NoPadding`) through standard Java Cryptography Architecture (JCA) APIs.
  * Ephemeral runtime encryption uses `PBKDF2WithHmacSHA256` and `AES-256-GCM` instead of `PBKDF2WithHmacSHA1` and `AES/CBC/PKCS5Padding`.
* **Minimum password length**: Orbeon Forms enforces a minimum password length of **15 UTF-8 bytes (120 bits)** across all configured cryptographic passwords, exceeding the 112-bit minimum required by `PBKDF2` in strict FIPS modules.
* **JCA provider selection**: Orbeon Forms honors `oxf.crypto.preferred-provider` across JCA services (`Cipher`, `SecretKeyFactory`, `MessageDigest`, `Mac`, `KeyFactory`, `Signature`, and `KeyPairGenerator`) and automatically prefers `BCFIPS` (when registered) over the default `SunJCE` provider.
* **PE license verification**: Orbeon Forms PE supports `SHA256withRSA`-signed `license.xml` files (also supported since Orbeon Forms PE 2025.1.4), avoiding legacy `SHA1withDSA` verification at startup.

## Configuring FIPS mode

### 1. JVM and JCA provider setup

Configure your JVM and servlet container with a FIPS-validated JCA provider such as Bouncy Castle FIPS:

1. **Classpath**:
   * Remove the standard non-FIPS Bouncy Castle JARs (`bcprov-jdk18on-*.jar`, `bcpkix-jdk18on-*.jar`, `bcutil-jdk18on-*.jar`) from Orbeon Forms' `WEB-INF/lib`.
   * Download the FIPS equivalents (`bc-fips`, `bcpkix-fips`, `bcutil-fips`, and `bctls-fips` if using `BCJSSE`) from the [Bouncy Castle Java FIPS downloads](https://www.bouncycastle.org/download/bouncy-castle-java-fips/) page.
   * Make the FIPS JARs available on the JVM's system classpath. On **Tomcat**, place the JARs in a dedicated directory such as `$CATALINA_BASE/fips-lib/` and add `CLASSPATH="$CLASSPATH:$CATALINA_BASE/fips-lib/*"` to `$CATALINA_BASE/bin/setenv.sh` (or do the equivalent in `setenv.bat` on Windows).
2. **Security providers**: Register the FIPS providers in a security properties override file (rather than modifying the JDK's global `$JAVA_HOME/conf/security/java.security`) and pass `-Djava.security.properties==/path/to/java.security.fips` to the JVM (using `==` to replace the default provider list rather than append to it):

   ```properties
   security.provider.1=org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider
   security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider fips:BCFIPS
   security.provider.3=SUN
   ```

   On **Tomcat**, place the override file at `$CATALINA_BASE/conf/java.security.fips` and add it to `CATALINA_OPTS` in `$CATALINA_BASE/bin/setenv.sh` (or `setenv.bat` on Windows):

   ```bash
   CATALINA_OPTS="$CATALINA_OPTS -Djava.security.properties==$CATALINA_BASE/conf/java.security.fips"
   ```
3. **Approved-only JVM flag**: Pass `-Dorg.bouncycastle.fips.approved_only=true` to the JVM. On **Tomcat**, add it to `CATALINA_OPTS` in `$CATALINA_BASE/bin/setenv.sh` (or `setenv.bat` on Windows):

   ```bash
   CATALINA_OPTS="$CATALINA_OPTS -Dorg.bouncycastle.fips.approved_only=true"
   ```
4. **TLS keystores**: Use `BCFKS` (recommended) or `PKCS12` keystores instead of legacy `JKS` (which is rejected in `approved_only` mode):
   * Convert an existing keystore or generate a new `BCFKS` keystore with `keytool`:

     ```bash
     keytool -importkeystore \
       -srckeystore keystore.jks -srcstoretype JKS \
       -destkeystore keystore.bcfks -deststoretype BCFKS \
       -providerclass org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider \
       -providerpath "$CATALINA_BASE/fips-lib/bc-fips-*.jar"
     ```
   * Configure your Tomcat HTTPS `<Connector>` in `$CATALINA_BASE/conf/server.xml` to use it:

     ```xml
     <SSLHostConfig>
         <Certificate
             certificateKeystoreFile="conf/keystore.bcfks"
             certificateKeystorePassword="..."
             certificateKeystoreType="BCFKS"
             type="RSA"/>
     </SSLHostConfig>
     ```
   * If Tomcat makes outbound HTTPS connections, also point the JVM truststore to a `BCFKS` (or `PKCS12`) truststore via `CATALINA_OPTS` in `setenv.sh` (e.g., `-Djavax.net.ssl.trustStore=... -Djavax.net.ssl.trustStoreType=BCFKS`).

### 2. Orbeon Forms PE license (`license.xml`)

Deploy an RSA-signed `license.xml` (`<signature algorithm="SHA256withRSA">`) under `WEB-INF/resources/config/license.xml`.

{% hint style="warning" %}
Legacy `SHA1withDSA`-signed `license.xml` files are rejected by the FIPS provider when `-Dorg.bouncycastle.fips.approved_only=true` is enabled. Contact Orbeon if you need a `SHA256withRSA`-signed license file for your deployment.
{% endhint %}

### 3. Orbeon Forms properties (`properties-local.xml`)

Configure the following properties in `properties-local.xml`:

```xml
<!-- Enable FIPS mode -->
<property
    as="xs:boolean"
    name="oxf.crypto.fips-mode"
    value="true"/>

<!-- All configured passwords must be at least 15 UTF-8 bytes in FIPS mode -->
<property
    as="xs:string"
    name="oxf.crypto.password"
    value="SET A STRONG PASSWORD OF AT LEAST 15 BYTES"/>
<property
    as="xs:string"
    name="oxf.fr.field-encryption.password"
    value="SET A STRONG PASSWORD OF AT LEAST 15 BYTES"/>
<property
    as="xs:string"
    name="oxf.fr.access-token.password"
    value="SET A STRONG PASSWORD OF AT LEAST 15 BYTES"/>
```

*(Set `oxf.fr.field-encryption.password` and `oxf.fr.access-token.password` if you use* [*Field-level encryption*](https://doc.orbeon.com/form-builder/advanced/field-level-encryption.md) *or* [*Token-based permissions*](https://doc.orbeon.com/form-runner/access-control/tokens.md)*, respectively.)*

## Password rotation and data at rest

Not all cryptographic password properties protect persistent data at rest:

* **`oxf.crypto.password`** and **`oxf.fr.access-token.password`** are **never** used to encrypt persistent form data or attachments at rest (since Orbeon Forms 2023.1). It is safe to change them—when enabling FIPS mode or on a regular rotation schedule—without affecting stored database records:
  * Changing [`oxf.crypto.password`](https://doc.orbeon.com/pages/-LEkBrAoJAmy6iucVDPz#oxf.crypto.password) only invalidates active in-flight browser form sessions and transient internal tokens, so rotate it during a server restart or maintenance window.
  * Changing [`oxf.fr.access-token.password`](https://doc.orbeon.com/form-runner/access-control/tokens.md#token-revocation) immediately revokes any currently unexpired shared access-token links (`?fr-access-token=...`, within the configured `oxf.fr.access-token.validity.*.*` duration).
* **`oxf.fr.field-encryption.password`** **is** used to encrypt form fields and attachments at rest. Never edit `oxf.fr.field-encryption.password` in place without configuring `oxf.fr.field-encryption.password.read-fallback` and running re-encryption, or existing encrypted data will no longer be readable.

## Migrating encrypted data from a non-FIPS installation

### How backward-compatible decryption and re-encryption work

* **On-the-fly decryption**: Pre-2026.1 encrypted values and attachments (Version 0 format, using `SHA-256` key derivation and `AES-128-GCM`) use primitives that remain FIPS-approved for decryption. As long as the password used to decrypt them is at least 15 UTF-8 bytes, a FIPS-enabled Orbeon Forms installation can read existing Version 0 fields and attachments immediately while writing all newly saved data in Version 1 format (`PBKDF2WithHmacSHA256` + `AES-256-GCM`).
* **Bulk re-encryption**: Running [re-encryption](https://doc.orbeon.com/form-runner/form-runner-pages/forms-admin-page.md#re-encryption) from the **Forms Admin** page (`/fr/admin` → **Operations** → **Re-encrypt form definitions**, or `POST /fr/service/persistence/reencrypt/<app>/<form>`) re-encrypts **both XML form fields and binary attachments** in place across relational databases, filesystem attachments, and S3 attachments, including historical revisions and drafts.

Choose **Case A** or **Case B** below depending on the UTF-8 byte length of your current `oxf.fr.field-encryption.password`.

Check the length of your existing `oxf.fr.field-encryption.password` before switching to FIPS mode. Even with `oxf.crypto.check-password-strength` enabled, a complex 12–14 character password can pass the baseline strength check while still being shorter than 15 UTF-8 bytes. Any password of **15 or more characters** is guaranteed to be at least 15 UTF-8 bytes (ASCII characters are 1 byte each; non-ASCII characters are 2–4 bytes).

### Case A: Existing `oxf.fr.field-encryption.password` is already at least 15 UTF-8 bytes

If your current field-encryption password is already 15 UTF-8 bytes or longer, you can switch directly to FIPS mode:

1. **Back up your database** (and external attachment storage, if used), as re-encryption modifies stored data and attachments in place.
2. **Deploy the FIPS environment**: Deploy Orbeon Forms with a `SHA256withRSA`-signed `license.xml` and configure the JVM for FIPS mode as described [above](#configuring-fips-mode).
3. **Update `properties-local.xml`**:

   * Set `oxf.crypto.fips-mode` to `true`.
   * Ensure `oxf.crypto.password` and (if used) `oxf.fr.access-token.password` are at least 15 UTF-8 bytes.
   * Keep your existing `oxf.fr.field-encryption.password`, **or**, if you also want to rotate to a new password at the same time, set `oxf.fr.field-encryption.password` to the new password and `oxf.fr.field-encryption.password.read-fallback` to the previous password (both at least 15 UTF-8 bytes):

   ```xml
   <property
       as="xs:boolean"
       name="oxf.crypto.fips-mode"
       value="true"/>
   <property
       as="xs:string"
       name="oxf.crypto.password"
       value="AT_LEAST_15_UTF8_BYTES"/>
   <property
       as="xs:string"
       name="oxf.fr.field-encryption.password"
       value="NEW_PASSWORD_AT_LEAST_15_BYTES"/>
   <property
       as="xs:string"
       name="oxf.fr.field-encryption.password.read-fallback"
       value="OLD_PASSWORD_AT_LEAST_15_BYTES"/>
   ```
4. **Restart Orbeon Forms**: Existing encrypted fields and attachments remain immediately readable, and newly saved data is encrypted with `PBKDF2WithHmacSHA256` and `AES-256-GCM`.
5. **Re-encrypt existing data and attachments** *(required if rotating passwords; also recommended if your security policy requires all existing data at rest to use `PBKDF2WithHmacSHA256` and `AES-256-GCM` immediately rather than upgrading lazily on save)*:
   * Open the [Forms Admin page](https://doc.orbeon.com/form-runner/form-runner-pages/forms-admin-page.md#re-encryption) (`/fr/admin`), select all forms that use encrypted fields or attachments, and choose **Operations** → **Re-encrypt form definitions** (or call `POST /fr/service/persistence/reencrypt/<app>/<form>`).
   * Wait until re-encryption finishes for all selected forms (`GET /fr/service/persistence/reencrypt` returns `<forms/>` when idle).
6. **Verify and clean up**:
   * Open existing form submissions and download encrypted attachments to confirm they can be read.
   * If you configured `oxf.fr.field-encryption.password.read-fallback`, remove it once re-encryption is complete.

### Case B: Existing `oxf.fr.field-encryption.password` is shorter than 15 UTF-8 bytes

When `oxf.crypto.fips-mode` is `true`, Orbeon Forms enforces the 15-UTF-8-byte minimum on **both** `oxf.fr.field-encryption.password` and `oxf.fr.field-encryption.password.read-fallback`. Because a password shorter than 15 bytes cannot be used in `read-fallback` once FIPS mode is active, rotate to a password of at least 15 UTF-8 bytes **while still in non-FIPS mode** first, and then enable FIPS mode:

1. **Back up your database** (and external attachment storage, if used).
2. **Phase 1 — Rotate to a password of at least 15 UTF-8 bytes in non-FIPS mode**:

   * Keep `oxf.crypto.fips-mode` set to `false`.
   * Set `oxf.fr.field-encryption.password` to a new strong password of **at least 15 UTF-8 bytes**, and set `oxf.fr.field-encryption.password.read-fallback` to the existing shorter password:

   ```xml
   <property
       as="xs:boolean"
       name="oxf.crypto.fips-mode"
       value="false"/>
   <property
       as="xs:string"
       name="oxf.fr.field-encryption.password"
       value="NEW_PASSWORD_AT_LEAST_15_BYTES"/>
   <property
       as="xs:string"
       name="oxf.fr.field-encryption.password.read-fallback"
       value="OLD_SHORT_PASSWORD"/>
   ```

   * Restart Orbeon Forms, open `/fr/admin`, select all forms with encrypted fields or attachments, and run **Operations** → **Re-encrypt form definitions** (or `POST /fr/service/persistence/reencrypt/<app>/<form>`).
   * Once re-encryption finishes, remove `oxf.fr.field-encryption.password.read-fallback` and verify that existing encrypted fields and attachments open properly.
3. **Phase 2 — Enable FIPS mode**:

   * Deploy the `SHA256withRSA`-signed `license.xml` and configure the JVM for FIPS mode as described [above](#configuring-fips-mode).
   * Set `oxf.crypto.fips-mode` to `true`, and ensure `oxf.crypto.password` and (if used) `oxf.fr.access-token.password` are at least 15 UTF-8 bytes:

   ```xml
   <property
       as="xs:boolean"
       name="oxf.crypto.fips-mode"
       value="true"/>
   <property
       as="xs:string"
       name="oxf.crypto.password"
       value="AT_LEAST_15_UTF8_BYTES"/>
   <property
       as="xs:string"
       name="oxf.fr.field-encryption.password"
       value="NEW_PASSWORD_AT_LEAST_15_BYTES"/>
   ```

   * Restart Orbeon Forms.
   * *(If Phase 1 was performed on an earlier Orbeon Forms version before upgrading to 2026.1)*: Run **Operations** → **Re-encrypt form definitions** once more on `/fr/admin` if you want all stored ciphertexts and attachments immediately upgraded at rest to `PBKDF2WithHmacSHA256` and `AES-256-GCM`, then verify opening existing form data and attachments.

## See also

* [Field-level encryption](https://doc.orbeon.com/form-builder/advanced/field-level-encryption.md)
* [Form Runner Forms Admin page — Re-encryption](https://doc.orbeon.com/form-runner/form-runner-pages/forms-admin-page.md#re-encryption)
* [Token-based permissions](https://doc.orbeon.com/form-runner/access-control/tokens.md)
* [General configuration properties — Encryption properties](https://doc.orbeon.com/configuration/properties/general.md#encryption-properties)
* [Security configuration](https://doc.orbeon.com/configuration/advanced/security.md)
* [Security checklist](https://doc.orbeon.com/configuration/advanced/security/security-checklist.md)
