Skip to content

Upgrade an installation to FIPS 140-3

DataRobot derives internal identifiers, such as blueprint IDs, vertex file names, and cache keys, with a hash function that depends on the FIPS mode of the installation:

FIPS mode Hash algorithm
Standard (no FIPS mode) MD5
FIPS 140-2 (ENABLE_FIPS_140_2_MODE) SHA-1
FIPS 140-3 (ENABLE_FIPS_140_3_MODE) SHA-256

Turning on FIPS 140-3 mode on an existing installation changes the hash algorithm, so the identifiers stored before the upgrade no longer match. To keep them, set SAFE_HASH_LEGACY_ALGORITHM to the algorithm the installation used before the upgrade. DataRobot then keeps that algorithm for these identifiers in FIPS 140-3 mode.

If an existing installation turns on FIPS 140-3 mode without this setting, DataRobot no longer finds data stored under the earlier identifiers. Existing models fail to load, and prediction requests return a Vertex is not stored error.

SAFE_HASH_LEGACY_ALGORITHM is available in Release 11.15 and later.

FIPS 140-3 mode can't be turned off

Turning off FIPS 140-3 mode once it's on isn't supported. Switching back changes the hash algorithm, so DataRobot no longer finds existing models and data. Downgrading the installation to an earlier release isn't supported either.

Note

These hashes identify objects; they don't protect data. No security claim rests on them, so MD5 and SHA-1 remain acceptable for this use in FIPS 140-3 mode. Cryptographic operations, such as TLS, encryption, and password hashing, use FIPS-approved algorithms regardless of this setting.

Choose the legacy hash algorithm

The value depends on the FIPS mode the installation ran in before the upgrade:

Installation before the upgrade SAFE_HASH_LEGACY_ALGORITHM
Standard (no FIPS mode) md5
FIPS 140-2 sha1
FIPS 140-3, with SAFE_HASH_LEGACY_ALGORITHM set Keep the existing value
FIPS 140-3, without SAFE_HASH_LEGACY_ALGORITHM Leave unset
New installation with FIPS 140-3 mode Leave unset

An installation that turned on FIPS 140-3 mode without this setting already stores SHA-256 identifiers, so leave the setting unset when upgrading it. An installation that already has the setting keeps the same value on every later upgrade; removing it changes its identifiers to SHA-256. An empty value counts as unset. Any value other than md5 or sha1 stops DataRobot at startup.

Set the value once and never change it

Set SAFE_HASH_LEGACY_ALGORITHM before DataRobot first starts with FIPS 140-3 mode turned on, and don't change or remove it afterward. Changing the value later changes every identifier derived from it, so DataRobot no longer finds data stored under the earlier identifiers.

Prepare deployments and Portable Prediction Servers

Check the deployments and Portable Prediction Servers that use models from the installation before running the upgrade that turns on FIPS 140-3 mode. Later, in the maintenance window and immediately before the upgrade, move the bundled RabbitMQ brokers to a single node.

Check deployments on earlier runtimes

Some deployments keep running on the runtime image of an earlier release. A runtime image from before Release 11.15 ignores SAFE_HASH_LEGACY_ALGORITHM and hashes by FIPS mode alone. Such a deployment misses its cached vertex files, so its models fail to load, and prediction requests return HTTP 500 with a Vertex is not stored error. The deployment serves again once it moves to a runtime image from Release 11.15 or later.

Serverless deployments created before the upgrade keep serving from their earlier runtime image, with the FIPS mode they were deployed with, until the deployment is next updated, for example by a model replacement or a change to its compute settings. Their predictions don't change during that time. The first update moves the inference server to the runtime image of the upgraded installation, with ENABLE_FIPS_140_3_MODE and SAFE_HASH_LEGACY_ALGORITHM applied. After the upgrade, refresh each of those deployments so that each one moves to the runtime image of the upgraded installation.

Before turning on FIPS 140-3 mode with SAFE_HASH_LEGACY_ALGORITHM set, contact DataRobot Support to identify deployments that run on a runtime image from before Release 11.15 and get the steps to move them.

Update Portable Prediction Servers

A Portable Prediction Server (PPS) that runs model packages from the upgraded installation needs the same FIPS settings as the installation:

  • For a model package built after the upgrade, the docker run code snippet for the deployment already includes ENABLE_FIPS_140_3_MODE, DATAROBOT_FIPS_ENFORCE, and SAFE_HASH_LEGACY_ALGORITHM. Don't add them to the copied command.
  • For a model package built before the upgrade, the snippet doesn't include those settings. Add -e ENABLE_FIPS_140_3_MODE="true", -e DATAROBOT_FIPS_ENFORCE="true", and -e SAFE_HASH_LEGACY_ALGORITHM="<legacyAlgorithm>" yourself, using the same <legacyAlgorithm> value as the upgraded installation (md5 or sha1). If the copied command still has -e ENABLE_FIPS_140_2_MODE="true" (a package from a FIPS 140-2 cluster), remove that argument. Don't run the PPS with both FIPS mode flags.
  • To write your own docker run command for any package from the upgraded installation, launch the PPS with those three settings and without ENABLE_FIPS_140_2_MODE. ENABLE_FIPS_140_3_MODE only selects the hash algorithm. Without DATAROBOT_FIPS_ENFORCE, the PPS doesn't load its FIPS-enforcing OpenSSL configuration.
  • Use a PPS image from Release 11.15 or later. Earlier images ignore SAFE_HASH_LEGACY_ALGORITHM, so they don't serve model packages from the upgraded installation. A prediction request returns HTTP 422 with a misconfigured attributes 'FIPS 140-3 mode' error, or HTTP 500 with a Vertex is not stored error when the model fails to load. If you see either error, update the PPS image tag. Earlier images also ignore DATAROBOT_FIPS_ENFORCE, so they run without the FIPS-enforcing OpenSSL configuration.
  • A PPS launched with these settings also loads the model packages that the installation built before the upgrade, because they use the same hash algorithm. Some model packages exported before 2023-05-03 don't record their hash algorithm. For those, see Model packages that don't record their hash algorithm.

For more information, see Run the PPS for FIPS-enabled model packages.

Move the bundled RabbitMQ brokers to a single node

On a FIPS installation, each RabbitMQ broker that DataRobot includes runs as a single node. For background, see RabbitMQ. When an upgrade applies this to a broker that runs more than one replica, Helm reduces the broker StatefulSet to one replica, but the other nodes stay members of the cluster. The remaining node restarts with the earlier cluster membership, can't elect a leader, and keeps restarting with a timeout_waiting_for_leader error. This happens both when the upgrade turns on global.fips.enabled and when global.fips.enabled is already on and the upgrade brings in the single-node setting.

Installations that use an external RabbitMQ instead of the bundled brokers skip this procedure. A bundled broker that already runs one replica starts under FIPS as it is, so it skips this procedure too. Reset each bundled broker that runs more than one replica immediately before running the upgrade, in the same maintenance window.

Resetting a broker deletes its queued messages

This procedure deletes the data volumes of each broker, so any messages still in its queues are lost. From step 4 until the upgrade recreates the brokers, DataRobot can't send or receive messages, so background work, such as model training or batch predictions, fails or waits. Start the procedure when no background work is in progress, and keep users off the installation until the upgrade completes. To keep queue contents, contact DataRobot Support before the upgrade.

The commands use ${NAMESPACE} for the namespace where DataRobot is installed. Set it before running them, for example export NAMESPACE=DATAROBOT_NAMESPACE, replacing DATAROBOT_NAMESPACE with that namespace.

  1. List the bundled brokers that the installation runs and their replica counts:

    kubectl -n ${NAMESPACE} get statefulset pcs-rabbitmq pcs-enclave-rabbitmq --ignore-not-found -o custom-columns=NAME:.metadata.name,REPLICAS:.spec.replicas
    

    Some installations don't run pcs-enclave-rabbitmq. Reset only the brokers with more than one replica. If every broker runs one replica, skip the rest of this procedure.

  2. Set BROKERS to the brokers that need a reset, separated by spaces. For example, when only pcs-rabbitmq runs more than one replica:

    export BROKERS="pcs-rabbitmq"
    

    When both brokers need a reset, use export BROKERS="pcs-rabbitmq pcs-enclave-rabbitmq".

  3. If Argo CD manages the installation, turn off automated sync and self-heal for the DataRobot application. Otherwise, Argo CD recreates the StatefulSet deleted in the next step from the current values, with the earlier replica count, before the data volumes are deleted. Turn them back on after the upgrade.

  4. Delete the StatefulSet of each broker that needs a reset. The command returns once the broker pods have stopped:

    for broker in ${BROKERS}; do
      kubectl -n ${NAMESPACE} delete statefulset "${broker}" --cascade=foreground --wait
    done
    

    Deleting the StatefulSet, rather than scaling it to zero, lets the rabbitmq-upgrade pre-upgrade hook skip the broker. The hook stops the upgrade when the broker StatefulSet exists with zero replicas. The upgrade recreates the StatefulSet with one replica.

  5. Delete the data volumes of each broker that needs a reset:

    for broker in ${BROKERS}; do
      kubectl -n ${NAMESPACE} get pvc -o name | grep -E "/data-${broker}-[0-9]+$" | xargs -r kubectl -n ${NAMESPACE} delete
    done
    
  6. Run the upgrade, adding --set task-manager.migration.enabled=false and --set compute-spark.queueMigrationJob.enabled=false to the helm upgrade command. The queue migration pre-upgrade hooks run before Helm recreates the broker, so they can't reach a broker. Without the first setting, the dr-queue-migration hook stops the upgrade. Without the second, the Spark queue migration hook retries for about 3 minutes and then skips. The rebuilt broker holds no queues to migrate. On an installation that Argo CD manages, set both values in the application's Helm values for this sync instead.

    • If the upgrade turns on FIPS 140-3 mode, continue with Set the legacy hash algorithm, and apply those settings and global.fips.enabled in the same helm upgrade run. If DataRobot starts in FIPS 140-3 mode without SAFE_HASH_LEGACY_ALGORITHM, existing models fail to load.
    • If FIPS 140-3 mode is already on, keep the existing SAFE_HASH_LEGACY_ALGORITHM setting as it is, as described in Choose the legacy hash algorithm. Don't add the setting to an installation that ran FIPS 140-3 mode without it.

    After the upgrade, each reset broker starts as a single node with an empty data volume. The broker recreates its virtual hosts and the DataRobot user from the definitions in the chart, so nothing needs to be restored or reconfigured.

Set the legacy hash algorithm

Set global.fips.enabled to true, and set SAFE_HASH_LEGACY_ALGORITHM in the core.config_env_vars setting in the values.yaml file of the DataRobot umbrella chart, as described in the datarobot-modeling-envvars config map. Apply both in the same helm upgrade run. Don't set ENABLE_FIPS_140_3_MODE: the chart sets it from global.fips.enabled.

For an installation that ran without FIPS mode before the upgrade:

global:
  fips:
    enabled: true

core:
  config_env_vars:
    SAFE_HASH_LEGACY_ALGORITHM: "md5"

For an installation that ran in FIPS 140-2 mode before the upgrade, also remove ENABLE_FIPS_140_2_MODE. The Helm render fails if it's still turned on:

global:
  fips:
    enabled: true

core:
  config_env_vars:
    SAFE_HASH_LEGACY_ALGORITHM: "sha1"

If core.config_env_vars already has other entries, add the key to the existing section. DataRobot passes ENABLE_FIPS_140_3_MODE and SAFE_HASH_LEGACY_ALGORITHM to every app pod, and to the inference servers it deploys on runtime images from Release 11.15 or later. Release 11.15 doesn't pass either value to custom model or custom task containers, so code in those containers doesn't follow the FIPS mode or the legacy hash algorithm of the installation. If the installation runs custom models or custom tasks, contact DataRobot Support before the upgrade.

global.fips.enabled turns on the FIPS 140-3 startup self-tests and sets ENABLE_FIPS_140_3_MODE, which selects the hash algorithm. To confirm both values after the upgrade, run kubectl -n ${NAMESPACE} get configmap -o yaml | grep -E 'ENABLE_FIPS_140_3_MODE|SAFE_HASH_LEGACY_ALGORITHM'. For the other FIPS 140-3 values, see Helm values.

Refresh serverless deployments after the upgrade

After the upgrade that turns on FIPS 140-3 mode, refresh every serverless deployment that was created before the upgrade. Until you refresh a deployment, it keeps its earlier runtime image and FIPS settings. The image and settings are fixed when the inference server is deployed or updated, so the Helm upgrade alone doesn't move those deployments to the runtime image of the upgraded installation.

  1. For each serverless deployment created before the upgrade, update the deployment so that DataRobot recreates its inference server. For example, change its inference server resources or compute settings, or replace its model.
  2. Check that the deployment serves predictions on the upgraded installation.

For deployments that Support identified as running on a runtime image from before Release 11.15, follow the steps Support provided instead of this procedure.