Skip to content
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

Stop running auditbeat container as root by default #21202

Merged
merged 3 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- File integrity dataset (macOS): Replace unnecessary `file.origin.raw` (type keyword) with `file.origin.text` (type `text`). {issue}12423[12423] {pull}15630[15630]
- Change event.kind=error to event.kind=event to comply with ECS. {issue}18870[18870] {pull}20685[20685]
- Change network.direction values to ECS recommended values (inbound, outbound). {issue}12445[12445] {pull}20695[20695]
- Docker container needs to be explicitly run as user root for auditing. {pull}21202[21202]

*Filebeat*

Expand Down
2 changes: 1 addition & 1 deletion auditbeat/docs/running-on-docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ It is also essential to run {beatname_uc} in the host PID namespace.

["source","sh",subs="attributes"]
----
docker run --cap-add=AUDIT_CONTROL,AUDIT_READ --pid=host {dockerimage}
docker run --cap-add=AUDIT_CONTROL --cap-add=AUDIT_READ --user=root --pid=host {dockerimage}
----
2 changes: 1 addition & 1 deletion auditbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func Package() {

// TestPackages tests the generated packages (i.e. file modes, owners, groups).
func TestPackages() error {
return devtools.TestPackages(devtools.WithRootUserContainer())
return devtools.TestPackages()
}

// Update is an alias for running fields, dashboards, config, includes.
Expand Down
1 change: 0 additions & 1 deletion auditbeat/scripts/mage/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func CustomizePackaging(pkgFlavor PackagingFlavor) {
args.Spec.ReplaceFile("/etc/{{.BeatName}}/{{.BeatName}}.reference.yml", referenceConfig)
sampleRulesTarget = "/etc/{{.BeatName}}/" + defaultSampleRulesTarget
case devtools.Docker:
args.Spec.ExtraVar("user", "root")
default:
panic(errors.Errorf("unhandled package type: %v", pkgType))
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/auditbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func Package() {

// TestPackages tests the generated packages (i.e. file modes, owners, groups).
func TestPackages() error {
return devtools.TestPackages(devtools.WithRootUserContainer())
return devtools.TestPackages()
}

// Update is an alias for running fields, dashboards, config.
Expand Down