Follow up for #6915. Now addressed directly in #6915
Before the Broker API k8s support is released, add two broker-aware behaviors to the k8s workload attestor:
-
Broker-originated Attest() and AttestReference() requests that ask for selectors for a Kubernetes object should run a Kubernetes SubjectAccessReview before returning selectors. The review should use the broker SPIFFE ID as the SAR username and no groups, allowing the Kubernetes authorizer to decide which objects each broker is allowed to reference.
-
Add a per-broker pod reference scope. The default should restrict pod references to the agent node: the referenced pod must have spec.nodeName matching the configured agent node name (node_name / node_name_env). A broader cluster scope should remove that same-node restriction, while still requiring the SubjectAccessReview check above.
Follow up for #6915.Now addressed directly in #6915Before the Broker API k8s support is released, add two broker-aware behaviors to the k8s workload attestor:
Broker-originated
Attest()andAttestReference()requests that ask for selectors for a Kubernetes object should run a KubernetesSubjectAccessReviewbefore returning selectors. The review should use the broker SPIFFE ID as the SAR username and no groups, allowing the Kubernetes authorizer to decide which objects each broker is allowed to reference.Add a per-broker pod reference scope. The default should restrict pod references to the agent node: the referenced pod must have
spec.nodeNamematching the configured agent node name (node_name/node_name_env). A broaderclusterscope should remove that same-node restriction, while still requiring theSubjectAccessReviewcheck above.