Code Monkey home page Code Monkey logo

Comments (8)

wazir-ahmed avatar wazir-ahmed commented on August 15, 2024 1

@daemon1024 We already the feature to create service account policy which allows only certain binaries in the Pod to access the token (based on the observability data from discovery-engine) - Ref.

The only addition I see in what you're saying is.. To also recommend a list of deployments which requires automountServiceAccountToken: false.

Correct me if I'm missing something here.

from kubearmor-client.

daemon1024 avatar daemon1024 commented on August 15, 2024 1

The only addition I see in what you're saying is.. To also recommend a list of deployments which requires automountServiceAccountToken: false.

Right! Not mounting at all is more secure than Blocking access to the mount.

from kubearmor-client.

vishnusomank avatar vishnusomank commented on August 15, 2024

@nyrahul The SA directories were selected based on the comment by @wazir-ahmed

The actual path k8s injects the SA is /var/run (Ref: https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#serviceaccount-admission-controller)
Ideally, applications should only access the /var/run SA path. But in Linux, since it is common to see the symlink /run --> /var/run, the process running in the pod might use the /run SA path.

from kubearmor-client.

daemon1024 avatar daemon1024 commented on August 15, 2024

Quick suggestion,

Since we have runtime visibility, why don't we do this the k8s way,

We suggest users to set automount for Service account tokens to false. And tell them in what pods they need to mount it. In addition to that tell them which binaries in the Pod need access to that. (KubeArmor policy)
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server

WDYT?

from kubearmor-client.

vishnusomank avatar vishnusomank commented on August 15, 2024

Rather than asking the user to set automount to false, If we recommend a KubeArmor policy to deny/allow access to the serviceaccount based on runtime data (current scenario) will be better right?

from kubearmor-client.

vishnusomank avatar vishnusomank commented on August 15, 2024

@wazir-ahmed yes it is generated by recommend.createRuntimePolicy() @nyrahul asked to update the logic to show a deny serviceaccount policy if no process is accessing it

from kubearmor-client.

wazir-ahmed avatar wazir-ahmed commented on August 15, 2024

@wazir-ahmed yes it is generated by recommend.createRuntimePolicy() @nyrahul asked to update the logic to show a deny serviceaccount policy if no process is accessing it

@vishnusomank Yeah. I just checked the latest code.

from kubearmor-client.

vishnusomank avatar vishnusomank commented on August 15, 2024

The only addition I see in what you're saying is.. To also recommend a list of deployments which requires automountServiceAccountToken: false.

Right! Not mounting at all is more secure than Blocking access to the mount.

so it'll be printed as an info to the user rather than a block policy?

from kubearmor-client.

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.