-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Verify Fleet Messaging Service can sign messages in FIPS mode #195282
Comments
Pinging @elastic/fleet (Team:Fleet) |
Pinging @elastic/kibana-security (Team:Security) |
Hey @ferullo, iirc this service is owned by your team. Would you mind having a look? |
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
The signatures generated here are validated by the Elastic Agent for actions here and policy changes here. This functionality was added in elastic/elastic-agent#2348. We will have to verify that these code blocks can tolerate a change in the signature key correctly. The key is delivered in the checkin response so this should be the case but I am unsure if this has dedicated tests. The agent side of this looks to be FIPS compliant because it is only parsing the key, the crypto primitives used to verify the key appear FIPS approved here: |
I’ve completed the initial validation on the described environment and can confirm that we are able to:
|
++ thank you for the quick turnaround! Just to clarify:
This is desired behavior? |
It is! :) |
@kc13greiner I was able to validate the behavior with FIPS both disabled and enabled, and I can confirm that this change does not seem to affect any functionalities our team owns that utilize Fleet’s signed messages. Please review the methodology I followed and let me know if anything might have been overlooked in terms of environment setup or validation assumptions. Elasticsearch:
curl -X POST --cacert config/certs/http_ca.crt -u elastic:YOUR_PASSWORD_HERE "https://localhost:9200/_license/start_trial?acknowledge=true&pretty" Kibana:
docker run --rm -it \
-v "$(pwd)"/config/keyStore.p12:/keyStore.p12:ro \
-e XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY="4ba83274dab90fe88cef7f904dff2327" \
-e XPACK_SECURITY_FIPSMODE_ENABLED='false' \
-p 5601:5601/tcp docker.elastic.co/kibana-ci/kibana-ubi-fips:9.0.0-SNAPSHOT-412a745685504415e750e90a8815a36ae0327c45
docker run --rm -it \
-v "$(pwd)"/config/keyStore.p12:/keyStore.p12:ro \
-e XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY="4ba83274dab90fe88cef7f904dff2327" \
-e XPACK_SECURITY_FIPSMODE_ENABLED='true' \
-p 5601:5601/tcp docker.elastic.co/kibana-ci/kibana-ubi-fips:9.0.0-SNAPSHOT-412a745685504415e750e90a8815a36ae0327c45
Validation after upgrading Kibana from NON-FIPS to FIPS:
|
Apologies, @szwarckonrad that test is not valid. I provided the old env var in my instructions, Setting the new env var to We can try to use a "default" image for the non-FIPS portion of this test. I will provide the image soon. |
I was able to achieve the same validation results as mentioned above by following this setup process: Elasticsearch:
curl -X POST --cacert config/certs/http_ca.crt -u elastic:YOUR_PASSWORD_HERE "https://localhost:9200/_license/start_trial?acknowledge=true&pretty" Kibana:
docker run --rm -it \
-e XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY="4ba83274dab90fe88cef7f904dff2327" \
-p 5601:5601/tcp docker.elastic.co/kibana-ci/kibana-cloud:9.0.0-SNAPSHOT-c858162866dd9b2ff145b061f0cfd30f1c064fec
docker run --rm -it \
-v "$(pwd)"/config/keyStore.p12:/keyStore.p12:ro \
-e XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY="4ba83274dab90fe88cef7f904dff2327" \
-e XPACK_SECURITY_EXPERIMENTAL_FIPSMODE_ENABLED="true" \
-p 5601:5601/tcp docker.elastic.co/kibana-ci/kibana-ubi-fips:9.0.0-SNAPSHOT-c858162866dd9b2ff145b061f0cfd30f1c064fec
@dasansol92 |
Excellent @szwarckonrad - that test looks good! Thank you so much for getting this checked so quickly 🚀 |
@kc13greiner |
Yes! I think we are all set with this testing. Thanks again for the fast turnaround 🚀 |
Summary
Verify Fleet message signing service works in FIPS mode
Details
While running the new Jest FIPS pipeline I noticed an error while running
x-pack/plugins/fleet/server/services/security/message_signing_service.test.ts
kibana/x-pack/plugins/fleet/server/services/security/message_signing_service.test.ts
Lines 192 to 211 in 17fcaa5
Specifically this code:
kibana/x-pack/plugins/fleet/server/services/security/message_signing_service.ts
Lines 128 to 132 in 17fcaa5
Based on the code, everything looks FIPS compliant, and the Key Pair generation looks good as well.
I "patched" some other errors for this image (related #194944) so I could have this image build.
Once the other errors were patched, the failing jest test above started passing 🤔
I was unable to reproduce the failing test in my local FIPS env, so it was always suspicious.
I would like to verify that this functionality works as expected in FIPS mode, but I am not familiar enough with Fleet to do so.
Setup a FIPS environment locally
Start an ES instance in a method of your choosing, but not using yarn es snapshot. I like to use a 9.0.0-snapshot from the .es/cache directory by running
tar -xzvf elasticsearch-9.9.0-SNAPSHOT-darwin-aarch64.tar.gz
and cd into the new directory's bin folder to run ./elasticsearchIn a new terminal window, navigate to your the top level of your elasticsearch folder and run:
curl -X POST --cacert config/certs/http_ca.crt -u elastic:YOUR_PASSWORD_HERE "https://localhost:9200/_license/start_trial?acknowledge=true&pretty"
This will enable the trial license for ES.
Ensure you have Docker running locally.
From any command line, run:
This will start Kibana into Interactive Setup mode, copy and paste the token from the ES startup logs.
AC
The text was updated successfully, but these errors were encountered: