Skip to content

[8.19](backport #45053) [Filebeat] Use existing constant for FIPS distribution#45074

Merged
ycombinator merged 1 commit into8.19from
mergify/bp/8.19/pr-45053
Jul 3, 2025
Merged

[8.19](backport #45053) [Filebeat] Use existing constant for FIPS distribution#45074
ycombinator merged 1 commit into8.19from
mergify/bp/8.19/pr-45053

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Jun 26, 2025

Proposed commit message

This PR is a follow up to #45036. In that PR, a new constant was introduced in libbeat, common.FIPSMode to determine if we're running a FIPS-capable distribution of a Beat or not. Turns out there was already such a constant in place, version.FIPSDistribution. So this PR here deletes common.FIPSMode and reuses version.FIPSDistribution instead.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

$ go test ./filebeat/input/v2/ -test.run TestLoader_ConfigureFIPS -test.count 1 -test.v
=== RUN   TestLoader_ConfigureFIPS
    loader_test.go:209: FIPS mode = false; err = <nil>
--- PASS: TestLoader_ConfigureFIPS (0.00s)
PASS
ok  	github.com/elastic/beats/v7/filebeat/input/v2	0.006s

In an environment configured for FIPS, i.e. with the Microsoft Go fork installed and with the OpenSSL FIPS provider installed:

$ GOEXPERIMENT=systemcrypto go test -tags requirefips ./filebeat/input/v2/ -test.run TestLoader_ConfigureFIPS -test.count 1 -test.v
=== RUN   TestLoader_ConfigureFIPS
    loader_test.go:209: FIPS mode = true; err = running a FIPS-capable distribution but input [a] is not FIPS capable
--- PASS: TestLoader_ConfigureFIPS (0.00s)
PASS
ok  	github.com/elastic/beats/v7/filebeat/input/v2	0.014s

This is an automatic backport of pull request #45053 done by [Mergify](https://mergify.com).

@mergify mergify Bot added the backport label Jun 26, 2025
@mergify mergify Bot requested a review from a team as a code owner June 26, 2025 16:54
@mergify mergify Bot requested review from faec and mauri870 and removed request for a team June 26, 2025 16:54
@mergify mergify Bot added the backport label Jun 26, 2025
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 26, 2025
@github-actions github-actions Bot added release-note:skip The PR should be ignored when processing the changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Jun 26, 2025
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 26, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Jun 30, 2025

This pull request has not been merged yet. Could you please review and merge it @ycombinator? 🙏

@ycombinator ycombinator force-pushed the mergify/bp/8.19/pr-45053 branch 2 times, most recently from e219693 to 35a17f3 Compare July 2, 2025 18:24
@ycombinator
Copy link
Copy Markdown
Contributor

@mauri870 @faec Thanks for your LGTMs. AFAICT, the CI failures on this PR are unrelated to the changes in the PR. If you agree, @pierrehilbert could we please force merge this PR so it makes it into 8.19.0? Thanks.

(cherry picked from commit 6798fe5)
@ycombinator ycombinator force-pushed the mergify/bp/8.19/pr-45053 branch from 35a17f3 to 97a24e8 Compare July 3, 2025 12:49
@ycombinator ycombinator merged commit fcdc9fb into 8.19 Jul 3, 2025
200 checks passed
@ycombinator ycombinator deleted the mergify/bp/8.19/pr-45053 branch July 3, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release-note:skip The PR should be ignored when processing the changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants