Access Control¶
Who can do what across the platform.
Argo CD: SSO via Dex¶
Argo CD's web UI (https://argo-app.tomoda.life) authenticates through Dex with Google OAuth as the upstream identity provider. Logins are restricted to the tomoda.life Google Workspace domain; anyone outside it is rejected at the OAuth callback.
User --> argo-app.tomoda.life
|
v
oauth2-proxy (domain allow-list)
|
v
Argo CD <-- Dex <-- Google OAuth
Access to the host is gated by oauth2-proxy at the ingress layer (same domain restriction), so even unauthenticated traffic never reaches Argo CD's own login page.
Argo CD RBAC¶
RBAC is set in k8s/envs/platform/argocd/values.yaml (configs.rbac), matched on the login email (scopes: "[email]"):
| Role | Permissions | Members |
|---|---|---|
role:admin |
Full control of all apps and projects | The emails listed in policy.csv |
role:readonly |
View only (policy.default) |
Everyone else in the Workspace |
Release permissions¶
Dev deploys on every merge to main in the tomoda repo. Prod deploys when a deploy(prod): tomoda vX.Y.Z PR is merged into this repo's main, so whoever can merge to devops main ships prod; keep that to release managers. The tomoda Release workflow that opens the PR runs only from tomoda main and changes nothing in prod by itself. Merging the PR also publishes that release's prod OTA bundle.
Cluster access¶
| Path | Who | How |
|---|---|---|
| SSH to the server | ADMIN_USERS in scripts/ovh/admin-users.sh |
Over Tailscale only; personal sudo logins with keys from GitHub, no root login. See Server Access |
Kubernetes API (:6443) |
Same people | The k3s admin kubeconfig (task kube:auth), over Tailscale |
| Argo CD UI | tomoda.life Google accounts (RBAC above) |
argo-app.tomoda.life behind oauth2-proxy |
| OVH console / API | Account owner + platform lead | OVH account with 2FA; API token scoped to the server |
| Tailnet | tomoda.life members per the policy |
infrastructure/tailscale/policy.hujson (Server Access) |
The k3s kubeconfig is cluster-admin. Each person fetches their own over SSH; rotate the certificates when someone leaves (Removing access).
GCP IAM¶
GCP holds secrets and identity only.
| Service account | Used by | Access |
|---|---|---|
eso-reader |
External Secrets (key in external-secrets/gcpsm-credentials) |
roles/secretmanager.secretAccessor |
terraform-ci |
Terraform plans, any branch, via Workload Identity Federation | Read-only: Terraform state + the provider secrets plans read |
terraform-apply |
Terraform applies from terraform-apply.yml on main, via Workload Identity Federation |
Project IAM, secrets, SAs, WIF, APIs, Terraform state |
Roles and the remaining service accounts: IAM.
Human IAM¶
Human grants are managed in infrastructure/gcp/people.tf (GCP → People and access); change them by PR. The bindings are additive, so Terraform never removes a grant made by hand; check for strays:
gcloud projects get-iam-policy development-485000 \
--flatten="bindings[].members" \
--filter="bindings.role:roles/owner OR bindings.role:roles/editor" \
--format="table(bindings.members,bindings.role)"
GitHub¶
Org membership, teams, team repo permissions and outside collaborators are managed in infrastructure/github/access.tf (GitHub).
Cloudflare¶
Account members get the least role that fits (DNS, Workers, R2). R2 API tokens are per purpose: one for the cluster (backups, observability, OTA, seed, Photon index) and one per env for app media. Each is stored in GCP Secret Manager; rotate by creating a new token, updating the secret, and revoking the old one.
Recommendations¶
- MFA at Google Workspace, GitHub, Cloudflare and OVH.
- Review
people.tf,access.tfand the Argo CD admin list when someone joins or leaves.