-
Notifications
You must be signed in to change notification settings - Fork 10
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
Publish events to Falco via a Falco plugin #21
Conversation
@@ -0,0 +1,7 @@ | |||
- rule: Seccomp Agent |
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.
- rule: Seccomp Agent | |
- required_engine_version: 11 | |
- rule: Seccomp Agent |
Not strictly required, but recommended.
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.
Updated, thanks!
I updated the Falco rule in this way:
And it produces events like this:
|
falco-plugin/main.go
Outdated
return &plugins.Info{ | ||
ID: 5, | ||
Name: "seccompagent", | ||
Description: "Seccomp Agent Events", | ||
Contact: "github.com/kinvolk/seccompagent/", | ||
Version: "0.1.0", | ||
RequiredAPIVersion: "0.3.0", | ||
EventSource: "seccompagent", |
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.
Which ID
should I use?
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.
Maybe we can switch to KSA, KSecAgent or something else? It can be Kinvolk Seccomp Agent, but the K can be also Kubernetes.
I think KSA might be too used (like Kubernetes Service Account, Kubernetes Security Announce), but this seems to ask for something shorter
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.
To sync with falcosecurity/plugins#73
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. Thanks, great PR!
@alban in a follow-up PR it will be great to add some doc of any way to deploy/play with falco in a k8s cluster.
extractor.Register(p) | ||
source.Register(p) |
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.
extractor.Register(p) | |
source.Register(p) | |
// TODO: Check if we want to use an extractor/source plugin. Right now this is cargo-cult from docker plugin. | |
extractor.Register(p) | |
source.Register(p) |
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.
We tested without extractor.Register()
and it was not working correctly.
Co-authored-by: Rodrigo Campos <rata@users.noreply.github.com>
msgC := make(chan SeccompAgentMessage) | ||
errC := make(chan error) |
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.
@alban We might want to change the channel to be buffered, so it doesn't block if one message is in the channel already.
Not sure what would be a good size, though. But we probably need to change this in a follow-up PR. What do you think?
Publish events to Falco via a Falco plugin
This PR adds:
A Falco plugin libseccompagent.so that is used by the Falco process. It
receives events on gRPC via the unix socket
/run/seccomp-agent-falco-plugin.sock available via the /run host volume.
A Falco middleware. Users of the Seccomp Agent can add
MIDDLEWARE=falco
inthe SeccompProfile's
listenerMetadata
field. Example:Tested on the following configuration:
helm install falco -f falco-values.yaml falcosecurity/falco
The file
falco-values.yaml
comes from https://github.com/falcosecurity/charts/blob/master/falco/values.yaml but withthe following changes:
How to use
Testing done
Falco logs: