-
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
[Fleet] Fix agent enrollment script to not create a new enrollment token #18365
[Fleet] Fix agent enrollment script to not create a new enrollment token #18365
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
@@ -30,19 +30,31 @@ function enroll(){ | |||
if [[ -n "${FLEET_ENROLLMENT_TOKEN}" ]] && [[ ${FLEET_ENROLLMENT_TOKEN} == 1 ]]; then | |||
apikey = "${FLEET_ENROLLMENT_TOKEN}" | |||
else | |||
enrollResp=$(curl -X POST ${KIBANA_HOST:-http://localhost:5601}/api/ingest_manager/fleet/enrollment-api-keys \ | |||
enrollResp=$(curl -X GET ${KIBANA_HOST:-http://localhost:5601}/api/ingest_manager/fleet/enrollment-api-keys \ |
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 response return the list of API keys but not the secret API key that you can only get doing a specific request to the ressource
💔 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
|
dev-tools/packaging/templates/docker/docker-entrypoint.elastic-agent.tmpl
Outdated
Show resolved
Hide resolved
Is this a bug that should also be backported to 7.8? |
Yes this should probably backported 👍 |
testing this today |
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, tested on ubuntu and enrolled correctly
please just bring this even with master you might have a conflicts here
…e-fix-agent-enrollment-script
@michalpristas I am not sure why test are failing here, can I get some help? |
@nchaulet probably flakyness i restarted test, try merging with master |
@elasticmachine merge upstream |
…e-fix-agent-enrollment-script
failures do not seem related, locally libbeat passes, i think it's ok to get this in |
Description
This script is creating a new enrollment token associated to a non existing config (
default
is not a valid id, the id of the default config is a random uuid)I updated this script to get the default enrollment token created during fleet setup instead.
Related to elastic/kibana#65669
Also created an issue on kibana elastic/kibana#65752 to not allow the creation of an enrollment token for a non existing agent config id.