Files
awoooi/k8s/awoooi-prod/07-rbac.yaml
ogt c185d7544b
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m9s
CD Pipeline / build-and-deploy (push) Successful in 4m35s
CD Pipeline / post-deploy-checks (push) Successful in 1m49s
fix(security): isolate allowlisted execution broker
2026-07-11 01:24:01 +08:00

131 lines
2.9 KiB
YAML

# AWOOOI workload identities
# Public API and signal worker are read-only. The Ansible execution broker
# receives no Kubernetes API token and owns the only host transport mount.
apiVersion: v1
kind: ServiceAccount
metadata:
name: awoooi-api
namespace: awoooi-prod
labels:
app: awoooi
component: api
system: awoooi
annotations:
description: "AWOOOI API - read-only control-plane identity"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: awoooi-api-reader-role
labels:
app: awoooi
component: observer
rules:
- apiGroups: [""]
resources:
- pods
- pods/status
- events
- namespaces
- services
- configmaps
- persistentvolumeclaims
- nodes
- nodes/status
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get"]
- apiGroups: ["apps"]
resources:
- deployments
- deployments/status
- replicasets
- statefulsets
- daemonsets
verbs: ["get", "list", "watch"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["autoscaling"]
resources: ["horizontalpodautoscalers"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes", "pods"]
verbs: ["get", "list"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["velero.io"]
resources:
- backups
- backupstoragelocations
- backuprepositories
- podvolumebackups
- podvolumerestores
- restores
- schedules
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: awoooi-api-reader-binding
labels:
app: awoooi
component: api
subjects:
- kind: ServiceAccount
name: awoooi-api
namespace: awoooi-prod
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: awoooi-api-reader-role
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: awoooi-worker
namespace: awoooi-prod
labels:
app: awoooi
component: worker
system: awoooi
annotations:
description: "AWOOOI signal worker - read-only evidence identity"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: awoooi-worker-reader-binding
labels:
app: awoooi
component: worker
subjects:
- kind: ServiceAccount
name: awoooi-worker
namespace: awoooi-prod
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: awoooi-api-reader-role
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: awoooi-executor-broker
namespace: awoooi-prod
labels:
app: awoooi
component: execution-broker
system: awoooi
annotations:
description: "AWOOOI allowlisted Ansible broker - no Kubernetes API token"