Skip to content
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

[Fleet] add support for message signing without encryption key #152624

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

joeypoon
Copy link
Member

@joeypoon joeypoon commented Mar 2, 2023

Summary

adds support for using MessageSigningService even if encryption key is not configured:

  • generates key pair for message signing even if encryption key is not configured
  • private key passphrase is stored in plain text if no encryption key is configured
  • passphrase will be automatically encrypted if encryption key is added after key pair is generated
  • logs a warning if encryption key is not configured
  • additional unit tests

implements: https://github.com/elastic/security-team/issues/6052

Checklist

For maintainers

* generates key pair for message signing even if encryption key is not
  configured
* private key passphrase is stored in plain text if no encryption key is
  configured
* passphrase will be automatically encrypted if encryption key is added after key pair
  is generated
* logs a warning if encryption key is not configured
* additional unit tests
@joeypoon joeypoon added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team labels Mar 2, 2023
@joeypoon joeypoon changed the title [Fleet] add support for unencrypted message signing [Fleet] add support for message signing without encryption key Mar 2, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 428 430 +2

Total ESLint disabled count

id before after diff
securitySolution 506 508 +2

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@joeypoon joeypoon marked this pull request as ready for review March 2, 2023 23:27
@joeypoon joeypoon requested a review from a team as a code owner March 2, 2023 23:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Should the sign method of the message signing service be updated to to use passphrase_plain when there is no encryption key?

@joeypoon
Copy link
Member Author

joeypoon commented Mar 9, 2023

Should the sign method of the message signing service be updated to to use passphrase_plain when there is no encryption key?

sign gets the passphrase from generateKeyPair which will return the existing passphrase or passphrase_plain depending on which exists. I made everything that needs the keys and passphrase get it via generateKeyPair so that we'll only need to worry about passphrase/passphrase_plain in a single location.

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@joeypoon joeypoon merged commit e8a251a into elastic:main Mar 10, 2023
@joeypoon joeypoon deleted the feature/encryption-key-check branch March 10, 2023 15:15
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Mar 10, 2023
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this pull request Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants