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

Support for Bound Service Account Token projected volume #2485

Closed
tspearconquest opened this issue Apr 10, 2023 · 9 comments
Closed

Support for Bound Service Account Token projected volume #2485

tspearconquest opened this issue Apr 10, 2023 · 9 comments

Comments

@tspearconquest
Copy link
Contributor

tspearconquest commented Apr 10, 2023

Motivation

As demonstrated in #2476, falco is not detecting a rotated service account token credential, and is therefore failing to connect to the api server once the credential has been rotated by the kubelet.

Feature

Falco needs to detect when the service account token has been rotated and begin using the new token so that it doesn't crash.

There are a few OSS repos where I can find fixes for this same issue. Datadog has a fix due to crashing, and Cert-Manager has an example helm chart values file for configuring cert-manager with this feature.

Alternatives

Turn off the feature and automount the service account token

Additional context

Best practices recommend disabling serviceaccount token automount, so we have used kustomize to add the automountServiceAccountToken: false field and added the service account token volume and volumeMount to the helm values.yaml file. Falco operates properly with this enabled, however when the token gets rotated, it doesn't detect the change, and continues to try to connect to the API server with a now-stale token, which causes falco to exit.

@tspearconquest
Copy link
Contributor Author

Forgot to mention that this feature was made stable in Kubernetes 1.22: https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#bound-service-account-token-volume

@Andreagit97
Copy link
Member

hey @tspearconquest this is a known issue we are working on fixing all the issues related to the Kubernetes client here #2973, thank you again @alacuku !

@Andreagit97 Andreagit97 added this to the 0.36.0 milestone Apr 12, 2023
@poiana
Copy link
Contributor

poiana commented Jul 11, 2023

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

@tspearconquest
Copy link
Contributor Author

tspearconquest commented Jul 11, 2023 via email

@Speeddymon
Copy link

@jasondellaluce help?

Looks like the bot removed and re-added the same label...

@poiana
Copy link
Contributor

poiana commented Aug 13, 2023

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

@Speeddymon
Copy link

Speeddymon commented Aug 13, 2023 via email

@Andreagit97
Copy link
Member

The new k8smeta plugin should solve this issue, give it a try with our dedicated helm chart and Falco 0.36.2 #2973 (comment)

@Andreagit97
Copy link
Member

This should be solved by Falco 0.37.0! Feel free to reopen if this is still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants