-
Notifications
You must be signed in to change notification settings - Fork 529
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
feat(fips): remove keystore subcommand and config handling #15545
base: main
Are you sure you want to change the base?
Conversation
the keystore is providing obfuscation of data on disk by using an empty password by default. This fails in fips only mode with the following error: crypto/hmac: use of keys shorter than 112 bits is not allowed in FIPS 140-only mode Disable the keystore subcommand and do not try to create one when loading the config.
This pull request does not have a backport label. Could you fix it @kruskall? 🙏
|
"github.com/elastic/elastic-agent-libs/keystore" | ||
) | ||
|
||
func TestLoadConfigKeystore(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.
Will this test fail if build with requirefips
?
) | ||
|
||
// loadKeystore returns the appropriate keystore based on the configuration. | ||
func loadKeystore(cfg *config.C) (libkeystore.Keystore, error) { |
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.
nit: why not to add this function directly to internal/beatcmd/keystore_nofips.go
file?
) | ||
|
||
// loadKeystore returns the appropriate keystore based on the configuration. | ||
func loadKeystore(cfg *config.C) (libkeystore.Keystore, error) { |
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.
nit: why not to add this function directly to internal/beatcmd/keystore_fips.go
file?
Motivation/summary
the keystore is providing obfuscation of data on disk by using an empty password by default.
This fails in fips only mode with the following error:
crypto/hmac: use of keys shorter than 112 bits is not allowed in FIPS 140-only mode
Disable the keystore subcommand and do not try to create one when loading the config.
Checklist
For functional changes, consider:
How to test these changes
Related issues