Repository navigation
feat: publish -fips images built against the validated Go crypto module - #4997
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
|
Comments Outside DiffThese findings could not be posted inline.
|
igor-kupczynski
left a comment
There was a problem hiding this comment.
At 30% this makes sense to me ✅
- the PR uses the new native Go Cryptographic Module v1.0.0 which is certified by nist
- the right args are passed to
goin the dockerfiles
^^^ i have some amount of nickpicks which an agent can probably solve quickly, i'll raise them separately.
One big concern i have (also cc @abelanger5 to chime in) is if we need a fips base image:
- the PR doesn't change the base and uses
golang:1.26-alpinefor build and alpine for the runtime image - my interpretation is that the approach in this PR is OK, because of the
CGO_ENABLED=0we don't shell for the native crypto of the base image but rather use fips go module - the base still has
libcrypto3/libssl3(not fips validated/compliant) which may come up on audit scans
igor-kupczynski
left a comment
There was a problem hiding this comment.
Great stuff @mnafees; i've raised a lot of comments, i'd like to see them responded to before merging, so ❌ for now. Let me know WDYT.
igor-kupczynski
left a comment
There was a problem hiding this comment.
🤖 Opus 5.5 on behalf of Igor:
Approving. This replaces my earlier changes-requested. Thanks for working through all of it.
I've left two suggestions inline: docs for switching to -fips, and a written position on the Alpine base image. Your call on whether they go in this PR or a follow-up.
Greptile also has an open P1 on the set-password ordering with no reply yet: #4997 (comment). The risk is low in practice, since old bcrypt passwords can't log in on FIPS builds anyway. Writing the hash first and revoking sessions afterwards closes it; if revocation fails, you just re-run the command.
| aes256GcmHandle, err := keyset.NewHandle(aeadTemplate) | ||
| for _, k := range h.KeysetInfo().GetKeyInfo() { | ||
| if k.GetTypeUrl() == aesGCMKeyTypeURL { | ||
| return fmt.Errorf("master keyset uses AES-GCM, which is not FIPS-approved: run `hatchet-admin keyset create-local-keys` from a FIPS build to regenerate the master and JWT keysets together, then re-create secrets encrypted under the old master key (OAuth tokens, Slack and inbound webhook credentials)") |
There was a problem hiding this comment.
🤖 Opus 5.5 on behalf of Igor:
Docs suggestion: once this merges, the next tag publishes -fips:latest. Anyone pointing it at an existing database will hit three things that aren't written down anywhere:
- Users with bcrypt passwords get a 400 on login, and the only hint is a server-side warning. The fix is
hatchet-admin user set-password. - The server refuses to start on an AES-GCM master key. Regenerating with
keyset create-local-keysmakes the stored secrets unreadable (OAuth tokens, Slack and webhook credentials), so they have to be re-created. - Regenerating the JWT keysets invalidates every existing API token, so workers need new tokens. Worth a sentence in this error message too.
A short self-hosting page on switching to -fips would cover it.
| # openssl and bash needed for admin build | ||
| RUN apk update && apk add --no-cache openssl bash ca-certificates tzdata | ||
| # openssl is used by hatchet-admin quickstart to generate dev certs; FIPS images do not ship it | ||
| RUN apk update && apk add --no-cache bash ca-certificates tzdata $([ "$FIPS" = "true" ] || echo openssl) |
There was a problem hiding this comment.
🤖 Opus 5.5 on behalf of Igor:
Following up on the base-image thread, which was resolved without a reply. Dropping openssl and blocking cert generation in quickstart fixes the real problem, so I'm fine with staying on Alpine.
libcrypto3/libssl3 from the Alpine base are still in the image, and scanners will flag them even though nothing loads them (CGO_ENABLED=0). I'd state that in the FIPS docs so support has something to point customers at. Distroless or scratch can be a follow-up if an audit asks for it.
Non-blocking notes, take them or leave them:
|
Description
Publish new set of
-fipssuffixed images for all of our GHCR images. The Go binaries are linked with the validated Go Cryptography Module (GOFIPS140=v1.0.0, CMVP #4985).Much inspiration was taken from the go-fips hardened image from Chainguard meaning that we have
CGO_ENABLED=0, -ldflags=-w, DefaultGODEBUG=fips140=on.FIPS=truebuild arg on the servers, frontend, and dashboard Dockerfiles, the build stage fails unlessgo version -mshows the validated module./apiwithhatchet-staticfileserverinstead ofnginxso the whole serving path is Go.hack/ci/assert-fips.shinspects every Go binary in an image. Runs on PRs (fipsjob), on regular prerelease images (must not link the module) and on-fipsprerelease images before manifests are combined.Type of change
Checklist
Changes have been:
🤖 AI Disclosure