Repository navigation
FIPS builds keep an explicit AWS_USE_FIPS_ENDPOINT - #1652
Merged
Merged
Conversation
clickhouse-backup-fips set AWS_USE_FIPS_ENDPOINT=true unconditionally at startup, overwriting the value the process was started with. With a custom s3.endpoint (MinIO, Ceph RGW, other S3-compatible storage) the AWS SDK endpoint rules then fail every S3 call with "A custom endpoint cannot be combined with FIPS", and AWS_USE_FIPS_ENDPOINT=false had no effect. Default to true only when the variable is unset. The variable only selects AWS s3-fips.* hostnames; the FIPS 140-3 crypto module is unaffected.
shanky-259
force-pushed
the
fix-fips-endpoint-respect-env
branch
from
October 28, 2026 19:12
416ead0 to
5a0622d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clickhouse-backup-fipssetAWS_USE_FIPS_ENDPOINT=trueunconditionally at startup (os.Setenvinmain()), overwriting the environment. With any customs3.endpoint(MinIO, Ceph RGW, internal S3-compatible storage) the AWS SDK endpoint rules then reject every request before a connection is opened:AWS_USE_FIPS_ENDPOINT=falsehad no effect, anduse_fips_endpoint = falsein~/.aws/configis never read because the SDK checks the environment first, so no FIPS build could use a non-AWS S3 endpoint.test/testflows/clickhouse_backup/configs/backup/fips/config-fips-outbound-s3-tls.ymldocuments this and works around it by leavings3.endpointunset.This keeps
trueas the default for FIPS builds but only sets it when the variable is unset. FIPS builds against AWS behave as before. The variable only selects AWSs3-fips.*hostnames; the FIPS 140-3 crypto module is unaffected.setDefaultFIPSEndpoint(version)replaces the inlineSetenvincmd/clickhouse-backup/main.go.TestSetDefaultFIPSEndpoint: unset →trueon FIPS builds; explicitfalse/truekept; non-FIPS builds untouched.test/integration/fips_test.goalready passesAWS_USE_FIPS_ENDPOINT=trueexplicitly, so it is unaffected.go test ./cmd/clickhouse-backup/passes.