opa-rbac-templates

Apply OPA templates to block cluster-admin bindings and wildcard permissions in Kubernetes RBAC.

3|3|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill opa-rbac-templates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opa-rbac-templates
Source: https://github.com/adaptive-enforcement-lab/claude-skills/tree/main/plugins/enforce/skills/opa-rbac-templates
Command: npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill opa-rbac-templates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires kubectl, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Provides OPA-based RBAC templates to block cluster-admin bindings, restrict dangerous verbs, and disallow wildcard permissions across Kubernetes RBAC.

Core Features & Use Cases

  • Cluster-Admin Prevention: Blocks cluster-admin role bindings except for approved break-glass accounts.
  • Privileged Verb Restrictions: Prevents use of escalation, bind, and impersonate verbs in RBAC rules.
  • Wildcard Prevention: Requires explicit resources and verbs instead of resources: [""] or verbs: [""].
  • Implementation & Examples: Includes ready-to-apply templates (cluster-admin.yaml, privileged-verbs.yaml, wildcards.yaml) and reference guidance for audits.

Quick Start

Apply the opa-rbac-templates policies to enforce least-privilege RBAC in your cluster and block cluster-admin bindings, dangerous verbs, and wildcard permissions.

Frequently Asked Questions about opa-rbac-templates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent cluster-admin role bindings in Kubernetes using OPA?

Prevent cluster-admin role bindings in Kubernetes by applying OPA templates that block bindings except for approved break-glass accounts. These templates enforce least-privilege RBAC governance at admission control, stopping unauthorized privilege escalation across namespaces.

What is the best way to restrict dangerous verbs like escalate and impersonate in Kubernetes RBAC?

Restrict dangerous verbs in Kubernetes RBAC by deploying OPA policy templates that explicitly prohibit escalate, bind, and impersonate verbs. This policy-as-code approach prevents privilege escalation attempts during cluster admission control.

How do I disallow wildcard permissions in Kubernetes RBAC policies?

Disallow wildcard permissions in Kubernetes RBAC by applying OPA templates that reject resources: ["*"] or verbs: ["*"] configurations. This forces explicit resource and verb definitions, ensuring strict least-privilege enforcement across your cluster.

Do I need kubectl and jq to apply OPA RBAC templates for Kubernetes governance?

Yes, you need kubectl and jq as dependencies to apply OPA RBAC templates for Kubernetes governance. These tools facilitate the deployment of policy files like cluster-admin.yaml and wildcards.yaml, supporting ongoing audit references.

Can I create break-glass admin exceptions in OPA policies for Kubernetes?

Yes, you can create break-glass admin exceptions in OPA policies for Kubernetes. The templates allow specific approved accounts to receive cluster-admin bindings while blocking all other unauthorized attempts, maintaining governance during emergencies.

Why should I use policy-as-code for Kubernetes RBAC audits instead of manual reviews?

Use policy-as-code for Kubernetes RBAC audits to automatically block cluster-admin bindings, dangerous verbs, and wildcard permissions. This provides documented policy files and reference implementations, ensuring continuous governance instead of error-prone manual reviews.