Repository navigation
docs(operator): document the DGDR workload-creation trust boundary #14429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
56de603
3ff6403
26a01ca
96188bb
742b571
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -452,6 +452,49 @@ replacement behavior and requires the complete desired argument list. | |||||||||||||||
| For the complete merge, metadata, and validation rules, see | ||||||||||||||||
| [DGDR Reference — Generated DGD overrides](../../reference/kubernetes-api/dynamo-graph-deployment-request.mdx#generated-dgd-overrides). | ||||||||||||||||
|
|
||||||||||||||||
| ### Profiling job overrides and the trust boundary | ||||||||||||||||
|
|
||||||||||||||||
| `spec.overrides.profilingJob` accepts a partial Kubernetes `JobSpec` that the operator merges | ||||||||||||||||
| into the profiling Job it launches (for example, to add tolerations or adjust resources). Because | ||||||||||||||||
| the operator creates that Job on your behalf, treat this the way Kubernetes treats any | ||||||||||||||||
| workload-creation API: | ||||||||||||||||
|
|
||||||||||||||||
| > [!IMPORTANT] | ||||||||||||||||
| > Any principal that can create workloads in a namespace where Dynamo runs — a `Pod` directly, or | ||||||||||||||||
| > any resource that creates Pods (`Job`, `Deployment`, `DynamoGraphDeploymentRequest`, …) — is | ||||||||||||||||
| > inside that namespace's trust boundary: it can run code with the Secrets and ServiceAccount | ||||||||||||||||
| > tokens mounted in that namespace. Creating a DGDR is one such path and is no more privileged than | ||||||||||||||||
| > creating a `Job` or `Pod` there — including through `overrides.profilingJob`. This is by design | ||||||||||||||||
| > and matches how Kubernetes treats every Pod-spawning resource. | ||||||||||||||||
| > | ||||||||||||||||
| > Enforce Pod security **centrally on the resulting Pods** with | ||||||||||||||||
| > [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) | ||||||||||||||||
| > (and any admission webhooks), which applies the full | ||||||||||||||||
| > [Pod Security Standards](https://kubernetes.io/docs/concepts/security/pod-security-standards/) — | ||||||||||||||||
| > not only `securityContext` fields but also `privileged`, host namespaces, `hostPath` volumes, and | ||||||||||||||||
| > host ports. PSA applies no policy until you label the namespace — set | ||||||||||||||||
| > `pod-security.kubernetes.io/enforce: <level>` (plus the matching `audit`/`warn` labels) on every | ||||||||||||||||
| > namespace where Dynamo runs, exactly as you would for any workload. The operator does not | ||||||||||||||||
| > re-implement those checks. | ||||||||||||||||
| > | ||||||||||||||||
| > Dynamo's operator-generated workloads — including the DGDR profiling Job — satisfy the **`baseline`** | ||||||||||||||||
| > standard. Enforce **`baseline`** to block the privileged-container, host-namespace, host-device, and | ||||||||||||||||
| > `hostPath` escalation paths while keeping Dynamo running. | ||||||||||||||||
|
Comment on lines
+480
to
+482
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The profiling Job does satisfy baseline, but "Dynamo's operator-generated workloads" does not: the inter-pod GMS layout mounts a hostPath at
Suggested change
|
||||||||||||||||
| > | ||||||||||||||||
| > PSA governs a Pod's security *posture*, not its *identity*: `overrides.profilingJob` can set the | ||||||||||||||||
| > Job's `serviceAccountName` and `automountServiceAccountToken`, and those are bounded by RBAC and | ||||||||||||||||
| > namespace membership, not by PSA — the same authority any Pod author in the namespace already has. | ||||||||||||||||
| > So grant `create`/`update` on DGDRs — and on workload resources generally — only to principals you | ||||||||||||||||
| > would trust to create Pods in that namespace, and use namespaces as the tenancy boundary — see | ||||||||||||||||
| > [Kubernetes RBAC good practices](https://kubernetes.io/docs/concepts/security/rbac-good-practices/#workload-creation). | ||||||||||||||||
|
|
||||||||||||||||
| The profiling Job object always remains in the DGDR's own namespace and overrides cannot relocate | ||||||||||||||||
| it — but namespace containment is not node or cross-tenant isolation. If admission permits | ||||||||||||||||
| privileged containers, host namespaces, host devices, or `hostPath` mounts, a DGDR creator can | ||||||||||||||||
| obtain those capabilities through the operator, exactly as any Pod author in the namespace could. | ||||||||||||||||
|
Comment on lines
+492
to
+494
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one points the other way and overstates the surface by one item.
Suggested change
|
||||||||||||||||
| Enforcing `baseline` non-exempt on every resulting Pod closes those paths; use namespaces as the | ||||||||||||||||
| tenancy boundary for anything stronger. | ||||||||||||||||
|
|
||||||||||||||||
| ## Next steps | ||||||||||||||||
|
|
||||||||||||||||
| | Goal | Guide | | ||||||||||||||||
|
|
||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.