A database password in a ConfigMap
Review the shop namespace’s ConfigMaps and deployments with kubectl. Find the credential stored as plain config, the workload that loads it, and who else can read it.
What you’re looking at
Review the shop namespace’s ConfigMaps and deployments with kubectl. Find the credential stored as plain config, the workload that loads it, and who else can read it.
Your goal: Find a password stored as plain config, the workload that uses it, and who else can read it.
- Briefing
- the story: what happened and what evidence you were handed.
- Terminal
- the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
- Walkthrough
- the numbered path. Each step says what to type and what you should see. Hints open one at a time.
- Answer boxes
- under each question step. Type what you found and press Check.
Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.
Briefing
A security review of the shop namespace asks one question: are all credentials in Secrets? ConfigMaps are readable by anyone with the built-in view role, and they show up in plain text in backups and dashboards.
kubectl get cm -o yaml prints every key. A deployment’s envFrom shows which ConfigMaps and Secrets it loads.
ops-bastion · Kubernetes review
Type help for the command list and objectives for your tasks. Everything runs in this browser.
Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.
The whole walkthrough
Every step in order, written to be read aloud: 265 words, about 2 min. It gives away every answer, so try the steps first.