Openshift API for Data Protection
The openshift api for data protection saves and restores cluster state and persistent volumes. You set it up by deploying the operator and binding roles to storage targets. Most teams start by granting broad cluster roles so backup jobs run fast. Still, wide permissions let any user with backup rights read secrets across all namespaces. If an engineer or service account gets too much power, private data faces risk. How the openshift api for data protection works This backup interface runs on
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
The openshift api for data protection saves and restores cluster state and persistent volumes. You set it up by deploying the operator and binding roles to storage targets. Most teams start by granting broad cluster roles so backup jobs run fast. Still, wide permissions let any user with backup rights read secrets across all namespaces. If an engineer or service account gets too much power, private data faces risk.
How the openshift api for data protection works
This backup interface runs on standard Kubernetes role rules to read cluster objects. In this model, a Role sets permissions inside one single namespace. A ClusterRole is not namespaced and can cover resources across all namespaces. When you run a backup, the service account needs rules to read pods. It also needs rules to snapshot volumes and copy secret objects to storage.
Permissions in this system are purely additive, which means there are no deny rules. You link a user or backup service account to these rules with bindings. A RoleBinding grants permissions inside one namespace, while a ClusterRoleBinding grants access cluster-wide. Backup tools often use a ClusterRoleBinding so one job can copy every project. That design makes daily snapshots simple, yet it creates a huge security blast radius.
What native roles solve and what they miss
Native role bindings decide who can start a backup or restore a volume. They also control which accounts can read pod logs or run commands inside containers. In Kubernetes, role rules refer to subresources with a slash, like the pod log endpoint. Admins must grant separate subresource permissions if an operator needs to run pre-backup scripts.
Still, native role checks stop once the API server approves the initial request. The cluster checks if a user can run a pod command or read data. It does not inspect what happens inside that session while commands run in flight. An engineer who fixes a failed restore often gets full shell access to containers. Native roles cannot mask emails, phone numbers, card numbers, or national IDs in outputs. They also cannot require peer review for a single risky command during a restore.
Runtime API Protection + OpenShift RBAC: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Scoping backup and restore permissions
To reduce risk, teams should split backup administration from daily app fixing work. Avoid giving human users the same cluster-wide bindings that the backup operator uses. Instead, give app teams a RoleBinding that applies only to their own namespace. This stops a developer in one namespace from restoring or reading another team's backups.
You should also review which roles allow subresource calls on backup pods. If an engineer only needs to check backup status, grant read rules on logs. Do not grant container command execution unless the task requires live shell debugging. Keeping human permissions small ensures that automated data protection stays safe and predictable.
Add request guardrails and response masking beside Kubernetes
Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev runs beside the API server as a sidecar for your Kubernetes API and checks every request and response alongside RBAC.
With hoop.dev Kubernetes controls, guardrails can allow listing Secret names while refusing reads of Secret data before execution. Data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.
Frequently asked questions
What does the openshift api for data protection back up?
It backs up cluster resource definitions, internal images, and persistent volume data. Teams can filter backups by namespace or label to save specific app workloads.
Can I deny access to specific secrets during a backup?
No, native Kubernetes role rules are purely additive and include no deny rules. You must scope roles carefully so accounts only reach the namespaces they need.
Why do backup operators need subresource permissions?
Operators often run hooks inside containers to freeze databases before taking a snapshot. This requires permission on the pod execution subresource to run those pre-backup commands.
Related guides
In this post