-
Notifications
You must be signed in to change notification settings - Fork 735
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
Support api_key authentication for agent-elasticsearch association #7598
Conversation
78baea0
to
6d8c951
Compare
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 left a few minor comments but it looks good!
I need a bit more time for testing.
thank you for the comments @thbkrkr , glad that this approach makes sense to you! Please take as much time as you need to do testing; I tested this with two agents (one Daemonset and one Deployment) referencing an external Elastic Search cluster starting with a secret containing |
@thbkrkr would it make sense to try to include this feature in |
68e2e4f
to
e92237d
Compare
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 wonder if we should also support api_key
in Beats. Logstash would be another candidate but we should probably coordinate with the Logstash team on that.
hey @pebrc, I can give it a try 🙂 would you like to couple this under this PR or first wait for this one to get merged and then open a subsequent one? |
We can split it in two PRs if that's easier. But it should be very similar to the agent code you wrote. |
yep you are right, I just pushed the relevant commit |
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.
LGTM I think we want some documentation around this. Are you planning to cover that as well (in a separate PR?)
…ture the supporting of specifying an api-key
…_agent_es_association
docs/orchestrating-elastic-stack-applications/agent-standalone.asciidoc
Outdated
Show resolved
Hide resolved
buildkite test this -f p=gke,E2E_TAGS=agent |
buildkite test this -f p=gke,E2E_TAGS=kibana |
This PR introduces support for utilising an
api-key
instead of ausername
,password
from theelasticsearchRefs.secretName
to authenticate against unmanaged ElasticSearch clusters for theAgent
type only. Since references, such as ElasticSearch, KibanaRef, etc., of all types are captured in the code asAssociations
, this PR altersAgentESAssociation
to introduce auth apikey support. In my thinking parsing of secrets could also be migrated per Association and thus achieve more special handling per one. More than happy to discuss the best way to introduce this feature.