Skip to content

[9.1](backport #45053) [Filebeat] Use existing constant for FIPS distribution#45103

Merged
ycombinator merged 1 commit into9.1from
mergify/bp/9.1/pr-45053
Jun 28, 2025
Merged

[9.1](backport #45053) [Filebeat] Use existing constant for FIPS distribution#45103
ycombinator merged 1 commit into9.1from
mergify/bp/9.1/pr-45053

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Jun 28, 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).

(cherry picked from commit 6798fe5)
@mergify mergify Bot added the backport label Jun 28, 2025
@mergify mergify Bot requested a review from a team as a code owner June 28, 2025 00:12
@mergify mergify Bot added the backport label Jun 28, 2025
@mergify mergify Bot requested review from VihasMakwana and andrzej-stencel and removed request for a team June 28, 2025 00:12
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 28, 2025
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@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 28, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 28, 2025
@ycombinator ycombinator enabled auto-merge (squash) June 28, 2025 00:14
@ycombinator ycombinator merged commit b5808f4 into 9.1 Jun 28, 2025
204 checks passed
@ycombinator ycombinator deleted the mergify/bp/9.1/pr-45053 branch June 28, 2025 02:22
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.

2 participants