Skip to content

[Integration Testing] Allow tests to declare themselves as needing a FIPS environment #8083

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

Merged
merged 2 commits into from
May 6, 2025

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented May 5, 2025

What does this PR do?

This PR allows integration tests to declare that they should be run in a FIPS-configured environment, e.g. a Linux VM with OpenSSL configured with the FIPS provider.

Further, the Buildkite pipeline for running integration tests is updated with a new group for running these FIPS integration tests. Note the FIXMEs and commented out sections of the Buildkite pipeline in this PR; they will need to be addressed when a FIPS-configured VM image and an FRH ECH environment are available.

Why is it important?

To allow FIPS-related integration tests to declare themselves as needing a FIPS environment, so they can be run in a FIPS-configured environment against an FRH ECH environment.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • 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/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None; this PR enhances the integration testing framework.

@ycombinator ycombinator added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog backport-8.19 Automated backport to the 8.19 branch labels May 5, 2025
@ycombinator ycombinator requested review from a team as code owners May 5, 2025 22:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

michel-laterman
michel-laterman previously approved these changes May 6, 2025
Copy link
Contributor

@michel-laterman michel-laterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; assuming the TLS fix is backported to 1.24.

Also, I have another PR that should use a custom image related with the PR for integration tests: #8035 I think the FIPS testing should run with those deployments

Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments

@pchila
Copy link
Member

pchila commented May 6, 2025

Is there a specific reason for the FIPS integration test not to be defined in their own package and run independently from the melting pot that is the integration package right now ?

@ycombinator
Copy link
Contributor Author

ycombinator commented May 6, 2025

Is there a specific reason for the FIPS integration test not to be defined in their own package and run independently from the melting pot that is the integration package right now ?

In terms of definition, there is no reason to keep the FIPS tests in the integration package other than it keeps all integration / system tests in a single place in the codebase. Most of the shared code is in other packages anyway so I don't think it would be a big lift to break out our integration tests into multiple packages, starting with the FIPS ones.

In terms of running, the FIPS tests will run independently of the other integration tests, on their own FIPS-configured VM.

Since there is a bit of an urgency for the FIPS work, I suggest we move this refactoring discussion to it's own issue so we can properly discuss it with the team and proceed accordingly. [EDIT] Created issue for discussion: #8087

@ycombinator
Copy link
Contributor Author

There is overlap between the Buildkite pipeline parts of this PR and what @michel-laterman has done in #8035. We sync'd up about this and decided that we'll keep all the Buildkite changes in #8035 so I'm going to remove those bits from this PR here.

@ycombinator ycombinator force-pushed the it-fips-tests-define branch from 58543e8 to 62ac705 Compare May 6, 2025 21:04
@ycombinator ycombinator enabled auto-merge (squash) May 6, 2025 21:26
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@ycombinator ycombinator merged commit 89902d1 into elastic:main May 6, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @ycombinator

mergify bot pushed a commit that referenced this pull request May 6, 2025
…FIPS environment (#8083)

* Define FIPS requirement field

* Implement FIPS filter in testmain

(cherry picked from commit 89902d1)
@ycombinator ycombinator deleted the it-fips-tests-define branch May 7, 2025 01:32
v1v added a commit to v1v/elastic-agent that referenced this pull request May 8, 2025
* upstream/main:
  Guard against `nil` pointer dereference (elastic#8107)
  Generate NOTICE.txt with only modules used by binaries (elastic#8053)
  Retry enrollment requests when an error is returned, add enrollment timeout (elastic#8056)
  Changelog for 8.17.6 version (elastic#8062) (elastic#8106)
  [main][Automation] Update versions (elastic#8098)
  Allow using beats receivers for self-monitoring (elastic#8031)
  Adding new configuration setting: `agent.upgrade.rollback.window` (elastic#8065)
  [Integration Testing] Allow tests to declare themselves as needing a FIPS environment (elastic#8083)
  fix(agentless): overcome SIGPIPE in agentless promotion pipeline (elastic#8094)
  ksm autosharing integration configuration update (elastic#8086)
ycombinator added a commit that referenced this pull request May 12, 2025
…FIPS environment (#8083) (#8095)

* Define FIPS requirement field

* Implement FIPS filter in testmain

(cherry picked from commit 89902d1)

Co-authored-by: Shaunak Kashyap <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.19 Automated backport to the 8.19 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants