# The report reader that could read Secrets

A Kubernetes service account can get and list a report ConfigMap, but its Role
also grants access to Secrets. Reduce its permissions without losing report
access. The Secret contains only a fixed synthetic value, never a credential.

## Before you begin

Use Docker, kind, kubectl, Python 3 and Bash on a disposable machine. The lab
creates a single-node kind cluster named `breakfix-secops-04` and a separate
kubeconfig under `~/.kube`. Docker may download the node image. Do not use
this cluster for other work or put real credentials in the lab. Kubernetes
Secrets are not inherently encrypted just because their values are base64.

```sh
./setup.sh
```

Use the kubeconfig path printed by setup for **every** kubectl command. Inspect
the `report-reader` Role and RoleBinding in namespace `breakfix-secops-04`.
The verifier uses Kubernetes impersonation and includes the service account's
normal groups; no service-account token is minted or mounted.

Remove Secret access from the Role while retaining `get` and `list` access to
ConfigMaps. Preserve the existing RoleBinding, service account, report and
synthetic Secret.

```sh
./verify.sh
./teardown.sh
```

Verification tests the real Kubernetes API's authorization and reads the
report as the impersonated account. Teardown verifies the recorded kind node
identity before deleting the entire lab cluster and its dedicated kubeconfig.
If setup or teardown fails, inspect the cluster and files before manual cleanup.
