Skip to content

[Agent/Docker] FLEET_ENROLL in Docker agent enrollment is broken #24146

@axw

Description

@axw

Version: the latest 7.12-SNAPSHOT image (and I think 7.13-SNAPSHOT and 8.0.0-SNAPSHOT)

Reproducer:


docker run --rm --env FLEET_ENROLL=1 --env FLEET_ENROLL_INSECURE=1 --env KIBANA_HOST=http://kibana:5601 --env FLEET_ENROLLMENT_TOKEN=abc123 -t docker.elastic.co/beats/elastic-agent:7.12.0-SNAPSHOT

abc123
The Elastic Agent is currently in BETA and should not be used in production

Error: fail to enroll: fail to execute request to Kibana: 1 error occurred:
        * missing enrollment api key

I'm pretty sure this is due to the breaking changes in #23865. Formatting the token and host as flags works:

docker run --rm --env FLEET_ENROLL=1 --env FLEET_ENROLL_INSECURE=1 --env KIBANA_HOST="--kibana-url=http://kibana:5601" --env FLEET_ENROLLMENT_TOKEN="--enrollment-token=abc123" -t docker.elastic.co/beats/elastic-agent:7.12.0-SNAPSHOT

--enrollment-token=abc123
The Elastic Agent is currently in BETA and should not be used in production

Error: fail to enroll: fail to execute request to Kibana: Status code: 401, Kibana returned an error: Unauthorized, message: security_exception

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions