-
Notifications
You must be signed in to change notification settings - Fork 168
[Integration Test] Ensure that upgrading a FIPS-capable Agent results in a FIPS-capable Agent #7804
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
base: main
Are you sure you want to change the base?
Conversation
This pull request does not have a backport label. Could you fix it @ycombinator? 🙏
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
d71c0a5
to
1bf616f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing looks good; should we also test a scenario where a failure is expected?
917b25c
to
2ced379
Compare
2ced379
to
da48fd6
Compare
It turns out we currently have no way of upgrade a FIPS-capable Agent to another version of a FIPS-capable Agent. I just tried this manually and it doesn't work:
Moving this PR into draft while I implement the missing capability. |
The
@michel-laterman @simitt I think we need https://github.com/elastic/ingest-dev/issues/5264 for these tests? |
Agree |
0f2c12a
to
142ec35
Compare
|
The
The If I look at the build artifacts from the "Packaging: Ubuntu x86_64 FIPS" CI step, I see that But I think this build artifact is on a different Buildkite Agent from the ones that are running the
@michel-laterman is this gap something the BK pipeline changes in #8035 will address? |
The tests are still failing trying to find the FIPS artifacts, but just going off the description I think we are over testing this between all three of these cases:
What coverage are we gaining by testing this in privileged and unprivileged mode? Is there even any difference between privileged and unprivileged with respect to FIPS? What are we gaining by testing Fleet and Standalone? I would expect if we do a single Fleet managed upgrade test we would have effectively smoke tested all of this. All FIPS does is substitute out the implementation of crypto package and change crypto related code. Why do we need to test three variants of an upgrade because of this? |
@@ -583,3 +583,164 @@ func TestLess(t *testing.T) { | |||
}) | |||
} | |||
} | |||
|
|||
func TestEqual(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of duplicating all the test cases from TestLess, maybe easier to just test both things in the same test? Maybe with a different sub-test?
I think maintaining the test cases is most of the work in here so we are better off duplicating them less.
What does this PR do?
This PR allows a FIPS-capable Agent to upgrade to another FIPS-capable Agent.
It also adds three integration tests:
TestStandaloneUpgradeFIPStoFIPS
: to check that a standalone FIPS-capable Agent will upgrade only to another FIPS-capable Agent. This test tests upgrades from and to various FIPS-capable Agent versions.TestFleetManagedUpgradeUnprivilegedFIPS
: to check that a Fleet-managed FIPS-capable unprivileged Agent will upgrade only to another FIPS-capable Agent.TestFleetManagedUpgradePrivilegedFIPS
: to check that a Fleet-managed FIPS-capable privileged Agent will upgrade only to another FIPS-capable Agent.Why is it important?
To preserve FIPS-compliance across upgrades.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksI have added an entry in./changelog/fragments
using the changelog toolDisruptive User Impact
None; this PR adds an integration test.