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

[Heartbeat] Setuid to regular user / lower capabilities when possible #27878

Merged
merged 51 commits into from
Oct 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
88d2d1d
Checkpoint
andrewvc Sep 11, 2021
66d2e6b
Checkpoint
andrewvc Sep 11, 2021
f050f79
Checkpoint
andrewvc Sep 11, 2021
dbe92db
Add comment
andrewvc Sep 11, 2021
7413b0e
Fix unncessary changes
andrewvc Sep 11, 2021
0d791d9
Fix unncessary changes
andrewvc Sep 11, 2021
992a3c6
Cleanup
andrewvc Sep 11, 2021
f938856
Add license override
andrewvc Sep 11, 2021
58ef9a3
Be more particular
andrewvc Sep 11, 2021
b295517
Tweaks
andrewvc Sep 11, 2021
206b346
Checkpoint
andrewvc Sep 12, 2021
576ca31
Checkpoint
andrewvc Sep 13, 2021
7e26638
Checkpoint
andrewvc Sep 13, 2021
61ae19c
SECCOMP Checkpoint
andrewvc Sep 13, 2021
fa24f7e
More fixes
andrewvc Sep 13, 2021
61542a0
Cleanup and fixes
andrewvc Sep 13, 2021
eaadc02
More fixes
andrewvc Sep 13, 2021
2835b98
CHANGELOG
andrewvc Sep 13, 2021
faa0989
More tweaks
andrewvc Sep 13, 2021
84d7eac
Rename seccomp->security
andrewvc Sep 13, 2021
ddbbf6e
Fix overrides
andrewvc Sep 13, 2021
1623137
Fix seccomp.go
andrewvc Sep 14, 2021
e1799f6
Cleanup
andrewvc Sep 14, 2021
94f95e4
Merge remote-tracking branch 'origin/master' into root-caps
andrewvc Sep 14, 2021
bf90094
Fix lint
andrewvc Sep 14, 2021
d055eb7
Fix lint
andrewvc Sep 14, 2021
7ba5301
separate setcaps
andrewvc Sep 14, 2021
f757217
Apply security to regular heartbeat too
andrewvc Sep 14, 2021
9b7c6e6
Only lookup groups etc. on linux
andrewvc Sep 14, 2021
793214e
Use simpler logic
andrewvc Sep 14, 2021
0aa410c
Fix lint
andrewvc Sep 14, 2021
c9532f3
Make portable to win/darwin
andrewvc Sep 20, 2021
cee1ad6
Fix setcap notation
andrewvc Sep 21, 2021
de41310
Make debugging build failure simpler
andrewvc Sep 21, 2021
3cafd9c
Merge branch 'master' into root-caps
mergify[bot] Sep 21, 2021
1ad68d3
Merge branch 'master' into root-caps
mergify[bot] Sep 22, 2021
7cddfa8
Merge branch 'master' into root-caps
mergify[bot] Sep 23, 2021
1a90113
Only target linux x86/amd64
andrewvc Sep 27, 2021
9dcd749
Merge branch 'root-caps' of github.com:andrewvc/beats into root-caps
andrewvc Sep 27, 2021
735aa76
Merge remote-tracking branch 'origin/master' into root-caps
andrewvc Sep 27, 2021
ea805d9
Fix setcap syntax
andrewvc Sep 27, 2021
0a292ee
Fix extra trailing slash
andrewvc Sep 27, 2021
bdc4c19
Fix setcap
andrewvc Sep 28, 2021
6a49b88
Follow link for setcap
andrewvc Sep 30, 2021
64a9d9e
fix
andrewvc Sep 30, 2021
c55cd77
Finalize
andrewvc Oct 1, 2021
7c2fc33
Merge remote-tracking branch 'origin/master' into root-caps
andrewvc Oct 1, 2021
d5da29c
Remove stdout
andrewvc Oct 1, 2021
39218ae
Incorporate PR feedback
andrewvc Oct 1, 2021
393bd27
Merge remote-tracking branch 'origin/master' into root-caps
andrewvc Oct 12, 2021
70fcce6
Update heartbeat security
andrewvc Oct 12, 2021
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
Prev Previous commit
Next Next commit
Fix lint
  • Loading branch information
andrewvc committed Sep 14, 2021
commit bf900941919779f168b628995eb44ed7d6ddb633
3 changes: 2 additions & 1 deletion heartbeat/beater/heartbeat.go
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ import (
"syscall"
"time"

"kernel.org/pub/linux/libs/security/libcap/cap"

"github.com/elastic/beats/v7/heartbeat/config"
"github.com/elastic/beats/v7/heartbeat/hbregistry"
"github.com/elastic/beats/v7/heartbeat/monitors"
@@ -34,7 +36,6 @@ import (
"github.com/elastic/beats/v7/libbeat/common/reload"
"github.com/elastic/beats/v7/libbeat/logp"
"github.com/elastic/beats/v7/libbeat/management"
"kernel.org/pub/linux/libs/security/libcap/cap"

_ "github.com/elastic/beats/v7/libbeat/processors/script"
)