Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Secure Dell CSM & Kubernetes Nodes: Admin Access

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide shows you how to lock down Dell Container Storage Modules (CSM) and your Kubernetes nodes against unauthenticated admin access. By the end, you will have enforced authentication for the CSM sidecar and main containers, restricted node access to authorized administrators, and verified that anonymous requests are rejected. This is essential for production clusters where a breach could expose persistent storage and cluster secrets.

What You'll Need

  • A running Kubernetes cluster (v1.24 or later recommended) with admin kubectl access.
  • Dell CSM (Container Storage Modules) installed, including the CSM Operator and at least one driver (e.g., PowerMax, PowerStore, Unity XT).
  • Helm (v3) if you plan to modify CSM via Helm charts.
  • Basic familiarity with Kubernetes RBAC, Secrets, and node SSH.

Step-by-Step

  1. Verify current CSM authentication settings.
    Check the CSM CR (Custom Resource) for your driver. For example, for PowerMax:
    kubectl get csm powermax -n dell-csm-operator -o yaml
    Look for the auth section under spec.driver. If it's missing or set to none, you are exposed.
  2. Enable authentication in the CSM CR.
    Edit the CR and set the auth section to use a secret. For example:
    spec:
      driver:
        auth:
          enabled: true
          secret: csm-auth-secret
    Save and apply. The CSM Operator will restart the sidecar containers with authentication enabled.
  3. Create the authentication secret.
    Generate a strong password (at least 16 characters, mix of upper/lowercase, numbers, symbols). Create the secret in the same namespace as the CSM driver:
    kubectl create secret generic csm-auth-secret \
      --from-literal=username=admin \
      --from-literal=password='YourStrongPassword!' \
      -n dell-csm-operator
    The CSM sidecar will use these credentials to authenticate requests.
  4. Restrict CSM API to authenticated users only.
    In the CSM CR, set authorization to required (if available) or ensure the sidecar's --insecure flag is removed. For most CSM versions, the sidecar container accepts requests only if they carry a valid token. Confirm by checking the sidecar logs:
    kubectl logs -n dell-csm-operator <driver-pod> -c csm-auth
    Look for lines indicating "authentication required" or "401 Unauthorized" for anonymous requests.
  5. Harden Kubernetes node access.
    Nodes should not allow anonymous SSH or kubelet access. For each node:
    • Disable password-based SSH: edit /etc/ssh/sshd_config and set PasswordAuthentication no.
    • Restrict SSH to specific users: add AllowUsers adminuser (replace with your admin usernames).
    • Restart SSH: sudo systemctl restart sshd (or ssh on some distros).
    Ensure only authorized public keys are in ~/.ssh/authorized_keys.
  6. Secure the kubelet API.
    The kubelet exposes an API on port 10250. By default, it may allow anonymous access. On each node, edit /var/lib/kubelet/config.yaml and set:
    authentication:
      anonymous:
        enabled: false
      webhook:
        enabled: true
    authorization:
      mode: Webhook
    Restart kubelet: sudo systemctl restart kubelet. This forces all kubelet requests to be authenticated via the Kubernetes API server.
  7. Apply RBAC to limit admin actions.
    Create a Role and RoleBinding that grants admin permissions only to specific service accounts or users. For example, create a YAML file:
    apiVersion: rbac.authorization.k8s.io/v1
    kind: Role
    metadata:
      namespace: dell-csm-operator
      name: csm-admin-role
    rules:
    - apiGroups: [""]
      resources: ["pods", "secrets", "configmaps"]
      verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: RoleBinding
    metadata:
      name: csm-admin-binding
      namespace: dell-csm-operator
    subjects:
    - kind: User
      name: "alice@example.com"  # replace with your admin user
      apiGroup: rbac.authorization.k8s.io
    roleRef:
      kind: Role
      name: csm-admin-role
      apiGroup: rbac.authorization.k8s.io
    Apply with kubectl apply -f rbac.yaml. Avoid granting cluster-admin to non-essential users.
  8. Verify that anonymous access is blocked.
    Test by making an unauthenticated request to the CSM API and to the kubelet. For CSM, you can use curl from within the cluster:
    kubectl run curl-test --image=curlimages/curl --rm -it --restart=Never -- \
      curl -k https://<csm-service>:8080/api
    You should receive a 401 or 403. For kubelet, try:

    curl -k https://<node-ip>:10250/pods
    This should also fail. If you get data, revisit the previous steps.

Common Mistakes

  • Leaving the default CSM secret in place. The default credentials (often admin/password) are widely known. Always change them.
  • Disabling authentication for testing and forgetting to re-enable. Some guides suggest disabling auth for troubleshooting—make sure you re-enable it.
  • Only securing the CSM sidecar but not the main driver container. The main driver also exposes APIs; ensure authentication is enforced for all containers in the driver pod.
  • Ignoring kubelet anonymous access. Many clusters leave kubelet open by default; this is a common vector for privilege escalation.
  • Using weak SSH keys or passwords. Even with password auth disabled, weak private keys can be brute-forced. Use ed25519 keys with a passphrase.

Tips

  • Use a dedicated service account for CSM operations, and rotate its token regularly.
  • Enable audit logging on the cluster to track admin actions. Configure the API server audit policy to log requests to the CSM namespace.
  • For multi-node clusters, use a configuration management tool (Ansible, Puppet) to apply kubelet and SSH settings consistently.
  • Regularly review the CSM operator logs for any failed authentication attempts—this can reveal potential attacks.
  • Consider using network policies to restrict access to the CSM service to only the Kubernetes API server and authorized monitoring pods.

Troubleshooting

  • CSM sidecar still accepts anonymous requests.
    Check that the auth.enabled field is actually set to true in the CR, and that the secret name matches exactly. Also verify the sidecar image version—older versions may not support auth. Restart the driver pod after changes.
  • Kubelet fails to start after changing config.
    If you set authentication.webhook.enabled: true but the cluster does not have the webhook configured (which is standard in most clusters), kubelet will fail. Ensure your Kubernetes control plane has the webhook authentication enabled (it is by default in managed clusters). If not, revert to webhook: false and use client certs instead.
  • Cannot SSH to nodes after disabling password auth.
    Make sure your public key is correctly placed in ~/.ssh/authorized_keys for the user you intend to use. If you are locked out, you may need to access the node via console (e.g., cloud provider console) to fix the SSH config.
  • CSM driver pods crash after enabling auth.
    This often happens if the secret is missing or the password contains special characters that break YAML parsing. Recreate the secret using kubectl create secret (not from a YAML file) to avoid escaping issues. Check pod logs for authentication errors.
  • RBAC changes not taking effect.
    RBAC changes are immediate, but if you are testing with a cached kubeconfig, the token may be stale. Run kubectl auth whoami to see your current user, and ensure your RoleBinding matches the user or group.

Frequently Asked Questions

Why is unauthenticated admin access a risk?

If an attacker can access the CSM API or kubelet without credentials, they can read or modify storage configurations, delete volumes, or even execute commands on nodes. This can lead to data loss and cluster compromise.

Does this guide work for all Dell storage drivers?

The general steps are the same for PowerMax, PowerStore, Unity XT, and others, but the exact CR fields may vary. Always check the official Dell CSM documentation for your driver version.

Can I use a different authentication method, like LDAP?

CSM supports basic auth (username/password) out of the box. For LDAP integration, you would need to configure an external authentication proxy, which is beyond the scope of this guide.

What is the default CSM admin password?

There is no default password—you must create the secret yourself. If you used a sample from documentation, it is often password or admin, which you should change immediately.

How often should I rotate the CSM auth secret and SSH keys?

At least every 90 days for secrets, and immediately if you suspect a compromise. For SSH keys, consider rotating them every 6-12 months.

Will these changes affect normal cluster operations?

No, as long as you configure authentication correctly. The CSM sidecar will require a token for API calls, but the Kubernetes control plane uses its own certificates, so normal operations continue unaffected.