-
Notifications
You must be signed in to change notification settings - Fork 619
Add FIPS migration guide for existing deployments #8936
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
b30d4f4
0edcf76
4ec3a6e
ff5f1e5
a8b1afc
5918654
80dbf93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,133 @@ | ||||||
| Migrate an existing deployment to FIPS-compliant containers | ||||||
| ============================================================ | ||||||
|
|
||||||
| .. include:: ../../../_static/badges/all-commercial.rst | ||||||
| :start-after: :nosearch: | ||||||
|
|
||||||
| From Mattermost v11, each release ships in two image variants: a standard Enterprise build (``mattermost/mattermost-enterprise-edition``) and a FIPS-compliant build (``mattermost/mattermost-enterprise-fips-edition``). Migrating an existing deployment to the FIPS image is primarily a matter of replacing the image and restarting Mattermost. No data migration is required, and rollback is symmetric. | ||||||
|
|
||||||
| This guide covers migrating an existing Mattermost Server deployment running on Docker or Kubernetes. FIPS images are only supported for Docker- and Kubernetes-based deployments; Linux package and tarball installations can't be migrated to FIPS in place. | ||||||
|
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.
Suggested change
Contributor
Author
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. Applied your suggested wording. Pushed in a8b1afc. |
||||||
|
|
||||||
| Mattermost's FIPS offering also covers the Mattermost Operator and a self-hosted Push Proxy. Migrating those components is out of scope for this guide. | ||||||
|
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.
Suggested change
Contributor
Author
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. Applied your suggested wording. Pushed in a8b1afc. |
||||||
|
|
||||||
| For background on what the FIPS build is and how it's constructed, see the :doc:`FIPS overview </deployment-guide/server/deploy-containers>`. | ||||||
|
ewwollesen marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| Before you begin | ||||||
| ---------------- | ||||||
|
|
||||||
| 1. **Back up your database and configuration.** Always take a full backup before changing the image. See the :doc:`backup and disaster recovery </deployment-guide/backup-disaster-recovery>` documentation. | ||||||
|
|
||||||
| 2. **Confirm your deployment type.** FIPS images are supported on Docker, Docker Compose, and Kubernetes only. If you're running Mattermost from a Linux package or tarball, you can't migrate in place. | ||||||
|
|
||||||
| 3. **Check your Mattermost version.** FIPS images are available from v11.0 onward and use the same release tags as the standard Enterprise images. Plan to migrate to the matching FIPS tag for your current version. | ||||||
|
|
||||||
| 4. **Plan for additional plugins.** The FIPS image includes Boards, Playbooks, and Agents prepackaged and running in FIPS mode. Any additional plugins you've installed will continue to run inside the FIPS image, but they run in non-FIPS mode. This is expected behavior, not a configuration error. | ||||||
|
|
||||||
| 5. **PostgreSQL password length.** Beginning with Mattermost v11.7, the Postgres password used by the Mattermost server must be at least 14 characters when running the FIPS image. If your current password is shorter, rotate it and update the connection string in your Mattermost configuration before migrating. | ||||||
|
ewwollesen marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| 6. **Plan for downtime.** The migration requires pulling the new image and restarting the Mattermost container or pod. | ||||||
|
|
||||||
| Migrate a Kubernetes deployment | ||||||
| ------------------------------- | ||||||
|
|
||||||
| These steps assume your deployment is managed by the Mattermost Operator using a ``Mattermost`` custom resource. | ||||||
|
|
||||||
| 1. Edit the ``Mattermost`` custom resource to point at the FIPS image. You can edit the live resource directly: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| kubectl edit mattermost <installation-name> | ||||||
|
|
||||||
| Or update your manifest file and re-apply it. | ||||||
|
|
||||||
| 2. In ``spec.image``, change the value from ``mattermost/mattermost-enterprise-edition`` to ``mattermost/mattermost-enterprise-fips-edition``. Keep ``spec.version`` aligned with your current release tag. For example: | ||||||
|
|
||||||
| .. code-block:: yaml | ||||||
|
|
||||||
| spec: | ||||||
| image: mattermost/mattermost-enterprise-fips-edition | ||||||
| version: 11.6.1 | ||||||
|
|
||||||
| 3. If you edited a manifest file, apply it: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| kubectl apply -f <your-mattermost-manifest>.yaml | ||||||
|
|
||||||
| 4. Watch the rollout to confirm the new pods come up healthy: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| kubectl rollout status deployment/<installation-name> | ||||||
|
|
||||||
| 5. Verify the running pods are using the FIPS image: | ||||||
|
ewwollesen marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| kubectl describe pod <pod-name> | grep Image | ||||||
|
|
||||||
| Migrate a Docker or Docker Compose deployment | ||||||
| --------------------------------------------- | ||||||
|
|
||||||
| These steps are written for the official `Mattermost Docker deployment <https://github.com/mattermost/docker>`_. If you're using a custom Docker setup, adapt the container and service names accordingly. | ||||||
|
|
||||||
| 1. Stop the Mattermost container: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| docker compose stop mattermost | ||||||
|
|
||||||
| 2. Edit ``docker-compose.yml``. In the ``mattermost`` service, change the ``image:`` value from ``mattermost/mattermost-enterprise-edition:<tag>`` to ``mattermost/mattermost-enterprise-fips-edition:<tag>``. Keep the same release tag. For example: | ||||||
|
|
||||||
| .. code-block:: yaml | ||||||
|
|
||||||
| services: | ||||||
| mattermost: | ||||||
| image: mattermost/mattermost-enterprise-fips-edition:11.6.1 | ||||||
|
|
||||||
|
ewwollesen marked this conversation as resolved.
Outdated
|
||||||
| 3. Pull the FIPS image: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| docker compose pull mattermost | ||||||
|
|
||||||
| 4. Recreate the Mattermost container so the new image is applied: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| docker compose up -d mattermost | ||||||
|
|
||||||
| 5. Verify the running container is using the FIPS image: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| docker inspect mattermost --format '{{.Config.Image}}' | ||||||
|
|
||||||
| After migration | ||||||
|
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.
Suggested change
Match action based titles as above
Contributor
Author
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. Done — section renamed to "Verify the migration" for action-based parity with the other headings. Pushed in a8b1afc. |
||||||
| --------------- | ||||||
|
|
||||||
| 1. Confirm Mattermost starts cleanly. Tail the logs and watch for startup errors: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| kubectl logs -f deployment/<installation-name> | ||||||
|
|
||||||
| Or, on Docker: | ||||||
|
|
||||||
| .. code-block:: sh | ||||||
|
|
||||||
| docker compose logs -f mattermost | ||||||
|
|
||||||
| 2. Sign in and verify core functionality (sending messages, file uploads, search). | ||||||
|
|
||||||
| 3. Confirm the prepackaged plugins (Boards, Playbooks, Agents) load successfully. In the System Console, go to **Plugins > Plugin Management** and confirm they're enabled and healthy. | ||||||
|
|
||||||
| 4. If you have additional plugins installed, confirm they still load. They'll run in non-FIPS mode inside the FIPS image — this is expected. | ||||||
|
|
||||||
| Roll back | ||||||
| --------- | ||||||
|
|
||||||
| If the migration doesn't go as planned, rolling back is symmetric: revert the image reference and redeploy. No data migration is involved. | ||||||
|
|
||||||
| - **Kubernetes:** Edit the ``Mattermost`` custom resource and change ``spec.image`` back to ``mattermost/mattermost-enterprise-edition``. Re-apply or save, and watch the rollout. | ||||||
| - **Docker / Docker Compose:** Restore the original ``image:`` value in ``docker-compose.yml`` and run ``docker compose pull mattermost`` followed by ``docker compose up -d mattermost``. | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,3 +103,10 @@ Additionally, consider: | |
| - Set up proper firewall rules to restrict unauthorized access and monitor traffic using tools like Fail2Ban or Wazuh. | ||
|
|
||
| By following these steps, your Mattermost deployment using Docker containers will be accessible securely over HTTPS with efficient proxying through NGINX. Implementing the additional security recommendations will further protect your environment against evolving threats. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :hidden: | ||
| :titlesonly: | ||
|
|
||
| Migrate an existing deployment to FIPS-compliant containers </deployment-guide/server/containers/fips-migration> | ||
|
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. The migration document talks about container and Kubernetes deployments, yet it's placed under the Deploy Containers section. We should rethink where to place this.
Contributor
Author
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. Good call. Moved the page up a level from Separately: FIPS content (the overview tab + this guide) is still only surfaced from the Deploy Containers page, so a Kubernetes reader has to know to look there. Happy to add a short FIPS pointer on the Deploy Kubernetes page as a follow-up if you think that's worthwhile. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title says "containers" but the guide covers Kubernetes too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done — retitled to "Migrate an existing deployment to FIPS-compliant images" (and updated the toctree/link text that referenced the old title). Pushed in a8b1afc.