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

automountServiceAccountToken missing for Redpanda + Operator + Connectors #1525

Open
Aransh opened this issue Sep 16, 2024 · 0 comments
Open

Comments

@Aransh
Copy link

Aransh commented Sep 16, 2024

What would you like to be added?

Need the Redpanda + Operator + Connectors charts to support disabling automountServiceAccountToken.
Also need additional volumes and volumeMounts for the Operator chart.

Why is this needed?

Azure Microsoft defender reported a High Severity security finding as below

"Kubernetes clusters should disable automounting API credentials" - Disable automounting API credentials to prevent a potentially compromised Pod resource to run API commands against Kubernetes clusters. For more information, see https://aka.ms/kubepolicydoc.

So in order to mitigate the above finding need to disable automounting of service account token by setting automountServiceAccountToken = false .
This is not possible with the Redpanda, Operator and Connectors charts currently (only with the console chart), so opening this issue to request support for this.

I'm assuming the Operator (and perhaps others) requires access to Kubernetes API, so I also mention that the operator currently does not allow adding additional volumes and volumeMounts to manually mount the serviceAccount token.

Note - while it is best-practice to disable, the app might require the Kubernetes credentials, so in order for this to work you must also manually mount the service account credentials, example:

    volumes:
      - name: kube-api-access
        projected:
          defaultMode: 420
          sources:
          - serviceAccountToken:
              expirationSeconds: 3607
              path: token
          - configMap:
              items:
              - key: ca.crt
                path: ca.crt
              name: kube-root-ca.crt
          - downwardAPI:
              items:
              - fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
                path: namespace
    volumeMounts:
      - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
        name: kube-api-access
        readOnly: true

JIRA Link: K8S-360

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

No branches or pull requests

1 participant