Loading
Draft: feat: add a FIPS 140-3 build of glab
What does this MR do and why?
Draft, opened to gather information. It's not ready for review yet.
Adds a FIPS 140-3 build of glab for the Duo Flows executor image. glab is built against the Go Cryptographic Module v1.0.0 (CMVP #5247), the same approach the CNG -fips images use for Gitaly and gitlab-shell.
- Release: adds a
linux-fipsgoreleaser build (linux/amd64,GOFIPS140=v1.0.0) and aglab_<ver>_linux_amd64_fips.tar.gzarchive on the normal release.nfpmsanddockersnow setidsexplicitly so they don't pick up the FIPS binary. - SHA-1: SHA-1 panics under
GODEBUG=fips140=only. Our two uses aren't for security (GitLab'sline_codeformat, and the UUIDv5 used bygovern audit sync), so they're wrapped infips140.WithoutEnforcement. auth dpop generate: hidden when FIPS mode is on. Passphrase-protected SSH keys are decrypted with bcrypt_pbkdf, which is outside the module.tests:fips: a new CI job.make check-fips-binarychecks that the binary recordsGOFIPS140=v1.0.0,fips140=onand thefips140v1.0tag, and contains no BoringCrypto or OpenSSL symbols.make test-fipsruns the unit tests underfips140=only, so new non-approved crypto fails CI.
Related to https://gitlab.com/gitlab-org/cli/-/work_items/8682
What this pipeline should tell us
-
build_test: the goreleaser snapshot builds thelinux-fipstarget and the_fipsarchive, and thenfpmsanddockersidschanges don't break packaging or images. -
tests:fips: binary verification and unit tests pass underfips140=onlyin CI. Locally, 6724 tests passed apart from one timing flake that is unrelated. - How long
tests:fipstakes.
Still to do before review
- Docs for the FIPS asset.
- Security Compliance confirmation that #5247 covers glab (tracked in 8682).
Edited by Jay McCure