-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Deprecate username/password in elastic-agent #29434
Deprecate username/password in elastic-agent #29434
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
@@ -5,8 +5,11 @@ outputs: | |||
default: | |||
type: elasticsearch | |||
hosts: [127.0.0.1:9200] | |||
username: elastic | |||
password: changeme | |||
api_key: "example-key" |
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'm a bit confused if this attribute should be api_key
or service_token
.
the libbeat output config expects api_key
, but some config from within the agent refers to it as service_token
.
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.
api_key is for the output, service_token is for what is passed to fleet-server. This is not the same thing, see other comments.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
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.
could you describe api_key and service_token and their usage?
i see some outputs gained token other ones api_key
I retargeted this PR to 7.17. If we need it also in 7.16, lets make sure it is backported. |
@@ -150,3 +150,4 @@ | |||
- Add diagnostics collect command to gather beat metadata, config, policy, and logs and bundle it into an archive. {pull}28461[28461] | |||
- Add `KIBANA_FLEET_SERVICE_TOKEN` to Elastic Agent container. {pull}28096[28096] | |||
- Allow pprof endpoints for elastic-agent or beats if enabled. {pull}28983[28983] {pull}29155[29155] | |||
- Mark username/password settings as deprecated. {pull}29434[29434] |
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.
username / password for fleet-server are deprecated. If we should deprecate username / password for Elastic Agent in a more general way for the output is another discussion.
username: elastic | ||
password: changeme | ||
api_key: "example-key" | ||
# Note that basic auth is deprecated and will be removed in 8.0 |
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.
This does not apply to the general output. +1 on having the api_key here but username / password for the output part stay around AFAIK.
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.
ah, much simpler then. i'll just log it there.
@@ -5,8 +5,11 @@ outputs: | |||
default: | |||
type: elasticsearch | |||
hosts: [127.0.0.1:9200] | |||
username: elastic | |||
password: changeme | |||
api_key: "example-key" |
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.
api_key is for the output, service_token is for what is passed to fleet-server. This is not the same thing, see other comments.
/test |
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.
Lets make sure we also follow up with docs to deprecate it also in the docs.
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.
also please as a followup coordinate with cloud/or make sure they're aware of the upcoming change
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 think this also needs an update on
FLEET_SERVER_ELASTICSEARCH_USERNAME - elasticsearch username for Fleet Server [$ELASTICSEARCH_USERNAME] |
/test |
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.
Change LGTM. Lets try to get CI pass and get it in.
* Deprecate username/password in elastic-agent * Appy deprecation only to fleet-server * Review feedback * Add deprecation notes in container help output (cherry picked from commit 1810b78)
* Deprecate username/password in elastic-agent * Appy deprecation only to fleet-server * Review feedback * Add deprecation notes in container help output (cherry picked from commit 1810b78) Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
What does this PR do?
Add deprecation logs when username/password is detected by the elastic-agent.
Checklist
I have commented my code, particularly in hard-to-understand areasI have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues