-
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
[Fleet] Encrypt ssl fields in logstash output #129131
[Fleet] Encrypt ssl fields in logstash output #129131
Conversation
Yeah I was afraid of this possibility. The right way to solve this would be to add a parameter to the output service to accept a regular SO client, with the encrypted SO client wrapper. This would requiring adding a new parameter to several code paths for this client, including any path that modifies an agent policy or integration policy since those result in needing to generating the full agent policy in the As discussed on Slack, I think we'll need to do something similar to this fake request strategy used here: https://github.com/elastic/kibana/blob/8bad83e3eb5d03c5dfbaf18069c707f8a87c0fa3/x-pack/plugins/fleet/server/services/agent_policy_update.ts/#L39 |
@joshdover I was able to get it working with the fake request hack, I had to wait on the licence to be available otherwise I get an error with unauthorized call to |
@elasticmachine merge upstream |
Pinging @elastic/fleet (Team:Fleet) |
...ublic/applications/fleet/sections/settings/components/edit_output_flyout/use_output_form.tsx
Show resolved
Hide resolved
...ns/fleet/sections/settings/components/edit_output_flyout/encryption_key_required_callout.tsx
Outdated
Show resolved
Hide resolved
...ns/fleet/sections/settings/components/edit_output_flyout/encryption_key_required_callout.tsx
Outdated
Show resolved
Hide resolved
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.
Overall approach LGTM
> | ||
<FormattedMessage | ||
id="xpack.fleet.encryptionKeyRequired.calloutDescription" | ||
defaultMessage="To configure logstash output, set a value of {key} in your {file} file. {link}" |
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: I wonder if we should use different wording here since not all environments use kibana.yml (eg. docker users use env vars often).
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.
yes we probably can update this, (I think it can come as a follow up PR as merging this one will unlock testing the logstash output) the doc do not specify the docker env var variables either maybe it could be fixed here.
@elasticmachine merge upstream |
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.
I've offered suggestions for text string changes, but would like @gchaps to confirm.
...ns/fleet/sections/settings/components/edit_output_flyout/encryption_key_required_callout.tsx
Outdated
Show resolved
Hide resolved
...ns/fleet/sections/settings/components/edit_output_flyout/encryption_key_required_callout.tsx
Outdated
Show resolved
Hide resolved
...eet/public/applications/fleet/sections/settings/components/edit_output_flyout/index.test.tsx
Outdated
Show resolved
Hide resolved
...eet/public/applications/fleet/sections/settings/components/edit_output_flyout/index.test.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: DeDe Morton <[email protected]>
id: options?.id ?? newSo.id, | ||
...newSo.attributes, | ||
}; | ||
return outputSavedObjectToOutput(newSo); |
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.
So is newSo.ssl
unencrypted here? (but has been encrypted when written to ES?)
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.
Yes that is correct, when you use dangerouslyExposeValue
in the saved object declaration the wrapped saved object client return the decrypted values
@elasticmachine merge upstream |
…ibana into encrypt-saved-object-logstash
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.
UI text LGTM!
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.
UI copy and docslink LGTM.
@elasticmachine merge upstream |
💛 Build succeeded, but was flakyTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @nchaulet |
(cherry picked from commit 420359b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 420359b) Co-authored-by: Nicolas Chaulet <[email protected]>
Summary
Encrypt the ssl secrets in the logstash output using encrypted saved object
This require the user to set the encryption key in kibana.yml
UI Changes