8000 FIPS builds keep an explicit AWS_USE_FIPS_ENDPOINT by shanky-259 · Pull Request #1652 · Altinity/clickhouse-backup · GitHub
[go: up one dir, main page]

Skip to content

FIPS builds keep an explicit AWS_USE_FIPS_ENDPOINT - #1652

Merged
Slach merged 2 commits into
Altinity:masterfrom
shanky-259:fix-fips-endpoint-respect-env
Oct 29, 2026
Merged

Slach merged 2 commits into
Altinity:masterfrom
shanky-259:fix-fips-endpoint-respect-env

Conversation

@shanky-259
@shanky-259 shanky-259 commented Oct 28, 2026 •
Copy link
Copy Markdown

clickhouse-backup-fips set AWS_USE_FIPS_ENDPOINT=true unconditionally at startup (os.Setenv in main()), overwriting the environment. With any custom s3.endpoint (MinIO, Ceph RGW, internal S3-compatible storage) the AWS SDK endpoint rules then reject every request before a connection is opened:

S3 ResolveEndpoint: endpoint rule error, A custom endpoint cannot be combined with FIPS

AWS_USE_FIPS_ENDPOINT=false had no effect, and use_fips_endpoint = false in ~/.aws/config is 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.yml documents this and works around it by leaving s3.endpoint unset.

This keeps true as 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 AWS s3-fips.* hostnames; the FIPS 140-3 crypto module is unaffected.

  • setDefaultFIPSEndpoint(version) replaces the inline Setenv in cmd/clickhouse-backup/main.go.
  • TestSetDefaultFIPSEndpoint: unset → true on FIPS builds; explicit false / true kept; non-FIPS builds untouched.
  • test/integration/fips_test.go already passes AWS_USE_FIPS_ENDPOINT=true explicitly, so it is unaffected.
  • ChangeLog entry under v2.8.3 BUG FIXES; the testflows config comment describes the new behaviour.

go test ./cmd/clickhouse-backup/ passes.

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
shanky-259 force-pushed the fix-fips-endpoint-respect-env branch from 416ead0 to 5a0622d Compare October 28, 2026 19:12
@Slach Slach added this to the 2.8.3 milestone Oct 28, 2026
@Slach
Slach merged commit 0594ace into Altinity:master Oct 29, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0