-
Notifications
You must be signed in to change notification settings - Fork 20
Add the fipsonly package when building with boringcrypto #3246
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: main
Are you sure you want to change the base?
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
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.
Pull request overview
This PR adds FIPS-only TLS enforcement for builds that use BoringCrypto. The implementation uses Go build tags to conditionally import the crypto/tls/fipsonly package only when GOEXPERIMENT=boringcrypto is set, ensuring non-FIPS builds continue to compile successfully.
Key changes:
- Created a new
fipspackage with conditional build support - Added blank import of the
fipspackage to enforce FIPS settings at runtime
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/fips/fips.go | Conditionally imports crypto/tls/fipsonly when building with boringcrypto to enforce FIPS-only TLS settings |
| pkg/fips/no_fips.go | Empty placeholder file to allow compilation when not building with boringcrypto |
| cmd/confluent/main.go | Adds blank import of the fips package to activate FIPS enforcement at application startup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| package fips | ||
|
|
||
| // This file exists to suppress build errors when not building with boringcrypto |
Copilot
AI
Dec 30, 2025
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.
Missing build tag constraint. This file should have //go:build !boringcrypto as the first line to ensure it's only compiled when the boringcrypto build tag is not set, preventing conflicts with fips.go.
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.
Unnecessary since there's no real code in this file anyway, so there are no conflicts when compiling both files.
|





Release Notes
Breaking Changes
New Features
Bug Fixes
Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
The fipsonly package forces the use of fips configuration settings for TLS to prevent the binary from falling back to a non fips approved setting.
This PR only adds this import for builds that export
GOEXPERIMENT=boringcryptobecause package is empty otherwise (causing non-fips builds to fail to compile).Blast Radius
Any impact would be limited to FIPS enabled builds. The impact itself should be minimal since it should only restrict the set of allowed cipher suites, which we aren't setting anyway.
References
Test & Review
Manual testing: https://docs.google.com/document/d/18oTfJEL2X-uZxDGuHj3is6x2rMWOarj8nPAUmeHJm_I/edit?usp=sharing