Giter Site home page Giter Site logo

kubearmor-relay-server's Introduction

KubeArmor Relay Server

KubeArmor's relay server collects all messages, alerts, and system logs generated by KubeArmor in each node, and then it allows other logging systems to simply collect those through the service ('kubearmor.kube-system.svc') of the relay server.

By default, the relay server is deployed with KubeArmor.

Kubearmor Relay Server HLD

Streaming Kubearmor Telemetry to external SIEM tools

KubeArmor emits following types of Telemetry events:

  1. Alert: When policy is violated
  2. Log: When a pod executes a syscall or any other action (such as file access, process creation, network socket create/connect/accept etc)
  3. Message: Internal Kubearmor daemon messages

There are two approaches that one can take to stream the kubearmor events.

  1. Using kubearmor-relay stdout: This is the easiest way i.e. if the SIEM tool connects to the k8s pod logging interface then all the kubearmor events (across all nodes) are available at the kubearmor-relay stdout. Fluentd/Microsoft Sentinel does support this mode wherein the stdout of the pod can be streamed to the SIEM tool. By default the stdout is turned off to not impact performance. To enable it update the environment variable in the deployment yaml ENABLE_STDOUT_LOGS, ENABLE_STDOUT_ALERTS , ENABLE_STDOUT_MSGS as true

example

        env:
          - name: ENABLE_STDOUT_LOGS
            value: "true"
          - name: ENABLE_STDOUT_ALERTS
            value: "true"
          - name: ENABLE_STDOUT_MSGS
            value: "true"

  1. Creating an adapter for the SIEM tool. Kubearmor-relay events could be accessed using its GRPC server (ref code) and then the events could be streamed to the SIEM tool (splunk/elk/MS-sentinel ...). An example adaptor is OpenTemetery-Adapater for KubeArmor, The OpenTelemetry KubeArmor receiver connects to KubeArmor-Relay and converts KubeArmor telemetry data to the OpenTelemetry format which in turn can be configured to connect to SIEM Tools like Splunk,Grafana etc. Here's the tutorial for the same.

Microsoft Sentinel is used as an example in this figure

kubearmor-relay-server's People

Contributors

achrefbensaad avatar aryan-sharma11 avatar daemon1024 avatar delusionaloptimist avatar dku-boanlab avatar nam-jaehyun avatar nyrahul avatar prateeknandle avatar rksharma95 avatar seswarrajan avatar shreyas220 avatar stefin9898 avatar therealsibasishbehera avatar utkar5hm avatar vishnusomank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kubearmor-relay-server's Issues

versioned release for kubearmor-relay

At this point we are making release for kubearmor-relay with latest tag. we should have versioned release as well as stable release workflow in the CI.

Add GitHub action

Add GitHub action to test the code and push a new image to DockerHub.

optionally print alerts/messages/telemetry to stdout

Currently, the alerts, logs are mandatorily printed to the stdout. This can induce an overhead in some deployments since the telemetry events could be substantially high. It would be better to enable the print to stdout only on the basis of an env var (PRINT_TO_STDOUT=1).

problem with channel handling

PR #14 introduced a fix for race-condition handling. However, the handling might not be fool-proof i.e.,we are spawning a go routine for every client in the Watch*() APIs.

Need to understand the best way of handling the channels.

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.