Cherry-pick #18096 to 7.x: Add k8s keystore backend#18774
Merged
ChrsMark merged 2 commits intoelastic:7.xfrom May 28, 2020
Merged
Cherry-pick #18096 to 7.x: Add k8s keystore backend#18774ChrsMark merged 2 commits intoelastic:7.xfrom
ChrsMark merged 2 commits intoelastic:7.xfrom
Conversation
(cherry picked from commit b772f2a)
Contributor
|
Pinging @elastic/integrations-platforms (Team:Platforms) |
Contributor
💔 Build FailedExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
CHANGELOG.next.asciidoc
Outdated
| - Add support for AWS IAM `role_arn` in credentials config. {pull}17658[17658] {issue}12464[12464] | ||
| - Add Kerberos support to Elasticsearch output. {pull}17927[17927] | ||
| - Add k8s keystore backend. {pull}18096[18096] | ||
| - Add support for fixed length extraction in `dissect` processor. {pull}17191[17191] |
jsoriano
approved these changes
May 28, 2020
jsoriano
reviewed
May 28, 2020
| } | ||
|
|
||
| builders, err := autodiscover.NewBuilders(config.Builders, nil) | ||
| builders, err := autodiscover.NewBuilders(config.Builders, nil, nil) |
Member
There was a problem hiding this comment.
Maybe we should start thinking in a different way of setting optional features in these autodiscover builders (and config mappers above).
Member
Author
There was a problem hiding this comment.
Yeap, that would make sense!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #18096 to 7.x branch. Original message:
What does this PR do?
This PR implements a new Keystore Backend, which is used to retrieve k8s secrets and use them in configurations provided by hints-based autodiscover feature. Any hints based configuration has only access to the secrets of the same namespace of the pod by which was triggered.
We still need to decide if this keystone should be used along with the already used FileKeystore in static autodiscover configurations.
Why is it important?
This is important for the users so as to avoid having sensitive data on hints' configurations and being able to leverage k8s secrets for that purpose.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Test k8s keystore backend with hints autodiscover
Start metricbeat and ensure that Redis module is properly started and collecting metrics from the Redis server using the password provided via the k8s secret.
Use
https://github.com/elastic/beats/blob/master/deploy/kubernetes/metricbeat-kubernetes.yamlbut make sure thatsecretsis added in the list ofresourcesinClusterRole.Redeploy redis Pod with a different password to check that it will fail to authenticate. Change:
--requirepass 'passpass2'Test k8s keystore backend with static autodiscover templates
For Secret creation and Redis target pod use the steps from the previous scenario.
Test basic keystore with static autodiscover templates
passpass:Related issues
cc: @exekias this one is still in progress and needs cleanups, docs and error handling but the approach is not expected to change.
TODOs: