-
Notifications
You must be signed in to change notification settings - Fork 154
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
FIPS Build #6565
FIPS Build #6565
Conversation
This pull request does not have a backport label. Could you fix it @michel-laterman? 🙏
|
|
a9b4565
to
3f18bfc
Compare
3f18bfc
to
9217e60
Compare
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
This should come with a test that the binary we produce actually works, ideally one that can confirm it properly uses the FIPS OpenSSL in the expected way. You'll also need to update CI to actually build the FIPS variant, the package steps for testing are in
|
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.
Similar to what @cmacknz already suggested, there should be some tests. IMO there would ideally also be some unit tests for the mage functionality, which shouldn't be too hard given it is regular go code.
Cleanup/fix build tag deduplication. Only set FIPS env when true is passed. Add FIPS binary verification test and attempt to add to pipeline.
This pull request is now in conflicts. Could you fix it? 🙏
|
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.
Left some more comments, mostly trying to follow the complexity in the mage/release logic or seeing whether it can be reduced a bit to reduce the surface for bugs.
Let's wait for a review from @pchila as this is related to packaging. |
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.
Thanks for iterating.
There seem to be a few failing tests in CI e.g. https://buildkite.com/elastic/elastic-agent-extended-testing/builds/7357#019520ad-6465-47f3-8b18-7fca000d61ba could you please take a look?
The current failure error is:
When I download the artifact and extract it, i can see the folder it creates is missing the |
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.
Good enough to get a first FIPS compliant agent package in order to start testing.
There are some parts that will need modification to integrate with elastic-agent packaging code but that will be done in a follow-up PR that will produce FIPS artifacts along with the current ones.
Left a couple of comments as a reminder of what needs modifying
buildkite test this |
buildkite test this |
💛 Build succeeded, but was flaky
Failed CI StepsHistory
|
|
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.
LGTM
Adds FIPS env var to magefile to enable FIPS compliant binary builds using the microsoft/go toolchain. (cherry picked from commit b20efc1)
Adds FIPS env var to magefile to enable FIPS compliant binary builds using the microsoft/go toolchain. (cherry picked from commit b20efc1)
What does this PR do?
Adds
FIPS
env var to magefile to enable FIPS compliant builds using the microsoft/go toolchain.This PR will not be sufficient to ensure that every artifact made with these changes are compliant, we still need to verify our crypto use.
Why is it important?
FIPS artifacts must be built with compliant toolchains.
Checklist
I 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 toolI have added an integration test or an E2E testDisruptive User Impact
None
How to test this PR locally
Assuming microsoft go is available, run
FIPS=true mage build:binary