Set service-account-private-key-file

VerifiedSafe

Ensure the controller manager uses a private key file for service account tokens.

Sby Skills Guide Bot
SecurityBeginner
7/25/2026
Claude CodeCursorCodex
#cis-benchmark#openshift#kubernetes#compliance#controller-manager

Recommended for

Automated summary

Checks CIS OpenShift Container Platform v1.9.0 control 1.3.3 by inspecting the kube-controller-manager ConfigMap to confirm the --service-account-private-key-file argument points at the expected key file.

Strengths

  • Ships the exact oc plus jq command, ready to copy and run.
  • States the expected return value so the result is unambiguous.
  • Explains the security rationale: a dedicated key pair allows service account token rotation.
  • Notes that remediation is not applicable because OpenShift sets this path by default, avoiding pointless changes.

Limitations

  • Read-only audit: no remediation or automated fix is provided.
  • Assumes oc and jq are installed and the shell is authenticated to the cluster.
  • Tied to a specific path and benchmark version; hand-modified clusters may legitimately differ.
When to use it

Use it during a CIS compliance audit of an OpenShift control plane to validate control 1.3.3.

When not to use it

Don't use it on vanilla Kubernetes clusters without OpenShift, or to actually rotate or replace service account signing keys.

Security analysis

Safe
Quality score92/100

The skill provides a read-only audit command using oc and jq to inspect the OpenShift kube-controller-manager configuration. It does not perform destructive actions, exfiltrate data, or use obfuscated payloads. The only execution risk is a shell pipeline for a legitimate compliance check.

No concerns found

How this analysis is made

Examples

Verify CIS 1.3.3
Run the CIS OpenShift v1.9.0 control 1.3.3 check on my cluster and tell me whether --service-account-private-key-file is set to the expected path.
Inspect controller manager config
Dump the config.yaml from the config ConfigMap in openshift-kube-controller-manager and show me the service-account-private-key-file extended argument.
Explain the audit result
I ran the oc get configmaps config -n openshift-kube-controller-manager check for CIS 1.3.3 and got an empty value — explain what that means and whether I can fix it.

name: cis-ocp-v190-1.3.3 description: "Ensure that the --service-account-private-key-file argument is set as appropriate (Manual)" category: cis-openshift version: "1.9.0" author: cyberstrike-official tags: [cis, openshift, kubernetes, redhat, controller-manager, service-account, private-key, certificates] cis_id: "1.3.3" cis_benchmark: "CIS Red Hat OpenShift Container Platform Benchmark v1.9.0" tech_stack: [kubernetes, openshift, redhat] cwe_ids: [] chains_with: [] prerequisites: [] severity_boost: {}

CIS Red Hat OpenShift Container Platform Benchmark v1.9.0 - Control 1.3.3

Profile Applicability

  • Level: 1

Description

Explicitly set a service account private key file for service accounts on the controller manager.

Rationale

To ensure that keys for service account tokens can be rotated as needed, a separate public/private key pair should be used for signing service account tokens. The private key should be specified to the controller manager with --service-account-private-key-file as appropriate.

Impact

You would need to securely maintain the key file and rotate the keys based on your organization's key rotation policy.

Audit Procedure

OpenShift starts the Kubernetes Controller Manager with service-account-private-key-file set to /etc/kubernetes/static-pod-resources/secrets/service-account-private-key/service-account.key.

The bootstrap configuration and overrides are available here:

Run the following command:

oc get configmaps config -n openshift-kube-controller-manager -ojson | \
  jq -r '.data["config.yaml"]' | \
  jq -r '.extendedArguments["service-account-private-key-file"][]'

Verify that the following is returned:

/etc/kubernetes/static-pod-resources/secrets/service-account-private-key/service-account.key

Remediation

None.

Default Value

By default, OpenShift starts the controller manager with service-account-private-key-file set to /etc/kubernetes/static-pod-resources/secrets/service-account-private-key/service-account.key. OpenShift manages the service account credentials for the scheduler automatically.

References

  1. https://docs.openshift.com/container-platform/latest/operators/operator-reference.html
  2. https://docs.openshift.com/container-platform/4.13/security/certificate_types_descriptions/control-plane-certificates.html
  3. https://github.com/openshift/cluster-kube-controller-manager-operator/blob/release-4.5/bindata/bootkube/bootstrap-manifests/kube-controller-manager-pod.yaml
  4. https://github.com/openshift/cluster-kube-controller-manager-operator/blob/release-4.5/bindata/bootkube/config/bootstrap-config-overrides.yaml
  5. https://github.com/openshift/cluster-kube-controller-manager-operator/blob/release-4.5/bindata/v4.1.0/kube-controller-manager/kubeconfig-cm.yaml
  6. https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/

CIS Controls

| Controls Version | Control | IG 1 | IG 2 | IG 3 | | ---------------- | ------------------------ | ---- | ---- | ---- | | v8 | 5.2 Use Unique Passwords | X | X | X | | v7 | 4.4 Use Unique Passwords | | X | X |

MITRE ATT&CK Mappings

| Techniques / Sub-techniques | Tactics | Mitigations | | --------------------------- | ------- | ----------- | | T1552 | TA0006 | M1022 |

Profile

Level 1 (Manual)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/set-service-account-private-key-file-mrzxury4/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/set-service-account-private-key-file-mrzxury4' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/set-service-account-private-key-file-mrzxury4/download' --output '.skill-downloads/set-service-account-private-key-file-mrzxury4/SKILL.md.part' && mv '.skill-downloads/set-service-account-private-key-file-mrzxury4/SKILL.md.part' '.skill-downloads/set-service-account-private-key-file-mrzxury4/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/set-service-account-private-key-file-mrzxury4/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills