8. Operator Identity
8. Operator Identity
← Previous: GitOps Identity | Index | Next: AI Agent Identity →
8.1 Kubernetes Operator Patterns
8.1.1 Operator Categories
| Category | Examples | Identity Scope |
|---|---|---|
| Platform Operators | cert-manager, ESO, Vault Operator | Cluster-wide |
| Storage Operators | Rook-Ceph, Longhorn | Cluster-wide |
| Database Operators | PostgreSQL Operator, MongoDB | Namespace or cluster |
| Application Operators | Custom CRDs | Namespace-scoped |
| Monitoring Operators | Prometheus Operator | Cluster-wide (read) |
8.1.2 Operator Identity Requirements
| Requirement | Implementation |
|---|---|
| Kubernetes API access | ServiceAccount + RBAC |
| External resource access | Vault credentials |
| Cross-namespace watch | ClusterRole (if needed) |
| Leader election | Lease or ConfigMap access |
8.1.3 Operator RBAC Pattern
8.2 Controller Service Accounts
8.2.1 Service Account Guidelines
| Guideline | Rationale |
|---|---|
| One SA per controller | Fine-grained audit |
| Descriptive naming | Clear identification |
| Minimal RBAC | Least privilege |
| No token automount by default | Explicit volume mounting |
8.2.2 Controller Deployment Pattern
8.2.3 Cross-Namespace Authority
When operators need cross-namespace access:
| Pattern | Use Case | Configuration |
|---|---|---|
| ClusterRole | Read all namespaces | ClusterRoleBinding |
| Role per namespace | Write to specific namespaces | Multiple RoleBindings |
| Aggregated ClusterRole | Extensible permissions | Label-based aggregation |
Example: Operator that manages resources in specific namespaces only:
8.3 CronJob Identity
8.3.1 CronJob Identity Challenges
| Challenge | Solution |
|---|---|
| Short-lived pods | Pre-provisioned SA tokens |
| Batch nature | Vault Agent init container pattern |
| No persistent state | Stateless authentication |
| Time-sensitive | Minimal bootstrap latency |
8.3.2 CronJob Pattern
8.3.3 CronJob Vault Configuration
8.3.4 CronJob Identity Flow
8.4 Platform Operator Identity
8.4.1 cert-manager Identity
cert-manager needs special identity considerations:
| Access | Purpose |
|---|---|
| Kubernetes Secrets | Store issued certificates |
| Kubernetes CRDs | Manage Certificate, Issuer resources |
| ACME DNS | DNS-01 challenge (cloud API access) |
| Vault PKI | Issue certificates from Vault |
Cloud access for DNS-01:
8.4.2 External Secrets Operator Identity
ESO needs Vault access:
8.4.3 Rook-Ceph Operator Identity
Rook-Ceph requires extensive cluster access:
| Component | RBAC Scope |
|---|---|
| rook-ceph-operator | ClusterRole (pods, nodes, PVs) |
| rook-ceph-osd | Node-level access (hostPath) |
| rook-ceph-mgr | ClusterRole (metrics) |
8.5 Multi-Tenant Operator Patterns
8.5.1 Namespace-as-a-Service Operators
Operators that provision per-tenant namespaces:
8.5.2 Tenant Identity Isolation
| Isolation | Implementation |
|---|---|
| Namespace | Kubernetes namespace per tenant |
| RBAC | Tenant-scoped Roles, no cluster access |
| Secrets | Tenant-prefixed Vault paths |
| Network | NetworkPolicies isolate tenants |
| SPIFFE | Tenant in SPIFFE ID path |
8.5.3 Operator-Created Identity
When operators create resources that need identity:
8.6 Security Considerations
8.6.1 Privilege Escalation Prevention
Operators must not grant more permissions than they have:
| Rule | Enforcement |
|---|---|
RBAC escalate verb restricted | Admission webhook |
bind verb restricted | Admission webhook |
| ClusterRoleBinding creation restricted | OPA/Kyverno policy |
8.6.2 Operator Security Posture
| Security Control | Implementation |
|---|---|
| Pod security | Restricted PSS |
| Network isolation | NetworkPolicies |
| Resource limits | ResourceQuotas |
| Audit | Kubernetes audit + Vault audit |
8.6.3 Compromised Operator Impact
| Operator Type | Blast Radius | Mitigation |
|---|---|---|
| Cluster-wide | All namespaces | Defense in depth, audit |
| Namespace-scoped | Single namespace | Limit scope |
| Multi-tenant | All tenants | Tenant isolation boundaries |
8.7 Compliance Mapping
8.7.1 Invariant Enforcement
| Invariant | Operator Implementation |
|---|---|
| INV-1 | ServiceAccount with projected token |
| INV-2 | Vault tokens ≤ 1h, renewed |
| INV-4 | All Vault access via Kubernetes auth |
| INV-7 | RBAC scoped to required namespaces |
| INV-9 | Operators cannot escalate privileges |
8.7.2 Audit Trail
| Event | Audit Source |
|---|---|
| Operator reconciliation | Controller logs |
| Resource creation | Kubernetes audit |
| Secret access | Vault audit |
| Cross-namespace access | Kubernetes audit |
Document Navigation
| Previous | Index | Next |
|---|---|---|
| ← 7. GitOps Identity | Table of Contents | 9. AI Agent Identity → |
End of Section 8