Giter Site home page Giter Site logo

Comments (6)

jasondellaluce avatar jasondellaluce commented on August 24, 2024

Sorry for being late. I'm gonna try to summarize all your proposals just to make sure we're in the same page:

  • Including some/all HTTP headers of the api server webhooks alongside their body payload inside each event generated by the k8s_audit source
  • Extracting the HTTP headers info as Falco rule fields either through the json plugin or with k8saudit-native fields
  • Adding custom fields to the output_fields entry of each Falco rule on top of the ones used in the rule's output
  • Adding custom "label-like" fields in each Falco rule (generic marker strings that are not strictly Falco fields)

from plugins.

sboschman avatar sboschman commented on August 24, 2024

Ah yeah perhaps I should have included a summary of my ramblings.

I think the summary would come down to the following two proposals:

  • optionally include the value of HTTP headers as user definable (custom) fields to each event generated by the k8s_audit plugin
  • add extra fields to the output_fields entry of each Falco rule on top of the ones used in the rule's output

The second proposal is already requested in falco #2127. Of course it depends on the actual solution chosen for 2127, but I am hoping the first proposal would work nicely together with proposal two.

The focus of this issue is the HTTP headers for the k8s_audit plugin. But the implementation also allows other plugins, like the k8saudit-eks plugin to enhance each event with additional fields. The k8s_audit plugin uses HTTP headers as input, but I can imagine the k8saudit-eks plugin using the aws api to retrieve additional custom fields a user might want to add to each event (the additional fields are not part of the k8s audit event itself as defined by kubernetes, but knowing the audit event source the aws api might be able to supply more context of the event, for example the cluster name, or the aws region/zone the cluster is deployed in).

Trying to express the flow of things:

k8s part:
k8s api server -> kubeconfig with auth -> k8s audit event -> (a compatible audit webhook endpoint)

proxy (up to the user to pick one and configure it, so not a k8s_audit plugin problem to solve):
k8s audit event -> reverse proxy -> add custom headers, for example based on the auth supplied from kubeconfig -> forward headers and k8s audit event -> k8s_audit plugin embedded webserver

k8s_audit plugin:
receive headers + k8s audit event -> transform headers to extra fields -> parse k8s audit event, just as it works now -> merge extra fields and parsed fields -> output 'falco event' (SDK PushEvent object) for rule evaluation

falco engine:
PushEvent from plugin sdk/framework -> evaluate rules -> create falco alerts/events -> enhance output_fields of alert/event with extra variables (second proposal) -> emit alert/event

from plugins.

poiana avatar poiana commented on August 24, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

from plugins.

poiana avatar poiana commented on August 24, 2024

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

from plugins.

poiana avatar poiana commented on August 24, 2024

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community.
/close

from plugins.

poiana avatar poiana commented on August 24, 2024

@poiana: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.