Epic: Developer environments — platform-managed production clones (someday) #1679

Open
opened 2026-11-05 17:16:29 +00:00 by ginjiruu · 1 comment
Owner

Priority: someday. This is a long way out, behind the other four epics. It records the direction and doesn't commit to anything. Child issues get filed when it becomes real.

Depends on: lab/machine-configs#7 (Security module) and lab/clusters#1668 (Internal network).

Direction (2026-11-05 discussion)

Developers never touch production directly. The platform hands them managed clones of a production site instead:

  • Clone: CSI snapshots of the site's volumes (LINSTOR/ZFS clones are fast, which was part of the reason for leaving CephFS) plus its database, restored into a throwaway namespace and torn down after a TTL.
  • Edit: a dev-mode image or sidecar on the clone. Options include sshfs/SFTP to the cloned volume, an editor attached to the container, kubectl debug --target (the target's filesystem is visible at /proc/<pid>/root; edits are lost on restart; mind PHP opcache validate_timestamps=0), or mirrord/Telepresence.
  • Access: just-in-time and approved. The primary path is time-boxed Kanidm group membership bound to namespace RoleBindings. The API server then audit-logs the real username and groups. OpenBao's Kubernetes secrets engine plus control groups is the fallback. It has built-in approval and expiry, but the API server only sees a generated service account (attributable only by joining OpenBao's audit log).
  • Network: each developer gets their own WireGuard peer. Cilium policy limits that peer to the API endpoint and their clone's services.
  • Ruled out: mounting live production RWO volumes on laptops over iSCSI or NFS. A second writer on a non-cluster filesystem corrupts it.

Goal

A pattern that carries over to the work stack, where developers currently use kubectl exec to inspect a PHP application.

**Priority: someday.** This is a long way out, behind the other four epics. It records the direction and doesn't commit to anything. Child issues get filed when it becomes real. Depends on: lab/machine-configs#7 (Security module) and lab/clusters#1668 (Internal network). ## Direction (2026-11-05 discussion) Developers never touch production directly. The platform hands them **managed clones** of a production site instead: - **Clone:** CSI snapshots of the site's volumes (LINSTOR/ZFS clones are fast, which was part of the reason for leaving CephFS) plus its database, restored into a throwaway namespace and torn down after a TTL. - **Edit:** a dev-mode image or sidecar on the clone. Options include sshfs/SFTP to the cloned volume, an editor attached to the container, `kubectl debug --target` (the target's filesystem is visible at `/proc/<pid>/root`; edits are lost on restart; mind PHP opcache `validate_timestamps=0`), or mirrord/Telepresence. - **Access:** just-in-time and approved. The primary path is **time-boxed Kanidm group membership** bound to namespace RoleBindings. The API server then audit-logs the real username and groups. OpenBao's Kubernetes secrets engine plus control groups is the fallback. It has built-in approval and expiry, but the API server only sees a generated service account (attributable only by joining OpenBao's audit log). - **Network:** each developer gets their own WireGuard peer. Cilium policy limits that peer to the API endpoint and their clone's services. - **Ruled out:** mounting live production RWO volumes on laptops over iSCSI or NFS. A second writer on a non-cluster filesystem corrupts it. ## Goal A pattern that carries over to the work stack, where developers currently use `kubectl exec` to inspect a PHP application.
Author
Owner

Detail from the 2026-11-05 discussion, for whoever picks this up:

  • OpenBao can use Kanidm's groups. Its OIDC auth method reads the groups claim through groups_claim and maps each group to an OpenBao external identity group that carries policies. So "OpenBao doesn't know my IdP groups" is not a reason to avoid it.
  • The deciding factor is the Kubernetes audit trail:
    • Kanidm path: the API server sees the human's OIDC username and groups natively.
    • OpenBao Kubernetes secrets engine: credentials are generated service accounts, so the API server logs system:serviceaccount:<ns>:<generated>. The generated name can include the requester's display name through the role's name template, but full attribution needs a join with OpenBao's audit log.
  • Decision: Kanidm time-boxed group membership is primary. OpenBao (secrets engine plus control groups) is the fallback.
Detail from the 2026-11-05 discussion, for whoever picks this up: - OpenBao **can** use Kanidm's groups. Its OIDC auth method reads the `groups` claim through `groups_claim` and maps each group to an OpenBao **external identity group** that carries policies. So "OpenBao doesn't know my IdP groups" is not a reason to avoid it. - The deciding factor is the **Kubernetes audit trail**: - **Kanidm path:** the API server sees the human's OIDC username and groups natively. - **OpenBao Kubernetes secrets engine:** credentials are generated service accounts, so the API server logs `system:serviceaccount:<ns>:<generated>`. The generated name can include the requester's display name through the role's name template, but full attribution needs a join with OpenBao's audit log. - Decision: Kanidm time-boxed group membership is primary. OpenBao (secrets engine plus control groups) is the fallback.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/clusters#1679
No description provided.