moby / moby/swarmkit

Consider replacing Fernet for new raft encryption records

Open
#3,283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

Fernet support was added to SwarmKit to provide a FIPS-compatible alternative to NaCl secretbox. Since then, Go has gained native FIPS 140 support for standard-library cryptographic primitives, making alternatives such as AES-GCM practical without relying on Fernet.

The fernet-go module also appears lightly maintained and has no tagged releases, leaving consumers pinned to pseudo-versions.

We should investigate:

  • using a stdlib AEAD, likely AES-GCM, for newly written encrypted raft records;
  • whether the existing FIPS/non-FIPS write-format split can be removed;
  • retaining Fernet decryption, and probably the fernet-go dependency initially, for existing raft state, backups, and migration compatibility.

This would not initially remove Fernet support entirely; it would only stop creating new Fernet-encrypted records once compatibility and mixed-version upgrade behavior have been addressed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the related PR #2535 and trace the current Fernet encryption and decryption paths for raft records, including FIPS and non-FIPS write formats. Investigate a standard-library AEAD for new records while preserving Fernet reads, then verify compatibility with existing state, backups, and mixed-version upgrades.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cryptography, distributed-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.