ADR-INFRA-006 — Management Model for Cloud Roles and Permissions
By Engineering & Security Architecture Team•October 20, 2026•3 min read
Status: Accepted Date: 2026-10-20 Authors: Engineering & Security Architecture Team
Context
Console edits to roles create unaudited privilege growth and differences between environments. BRD-INFRA-006 requires roles to be configuration with a complete history. Specified in SR-INFRA-006.
Decision Drivers (FRs & NFRs)
- BR-1.1 — roles are code.
- BR-1.2 — least privilege.
- BR-1.3, BR-1.4 — history and drift detection.
Options
Option 1 — Manual administration in the console
Pros:
- Immediate: a permission can be changed in seconds, with no pull request.
- No need to learn the code syntax for roles and policies.
Cons:
- No audit trail or review record, so compliance checks are close to impossible (BR-1.1, BR-1.3).
- Temporary “fix-it” permissions granted during incidents are forgotten and become lasting privilege creep.
- Changes made in non-production are easily missed in production, which breaks parity between environments.
- No rollback: undoing a bad change relies on memory, not a revert.
Option 2 — Hybrid: console for quick edits, code for core roles
Pros:
- Engineers can apply an emergency “break-glass” permission in the console during an incident.
- Less up-front code, because small or ad-hoc credentials stay outside the repository.
Cons:
- Drift: the code stops describing what exists, and the next apply can unexpectedly revoke a console edit (BR-1.4).
- Quick console edits tend to grant broad wildcard access instead of narrow, scoped policies (BR-1.2).
- No single source of truth: reviewers cannot tell whether the repository or the console is canonical.
Option 3 — Roles as code in OpenTofu (CHOSEN)
Pros:
- Every change is a reviewed pull request with a recorded plan showing exactly which permissions are added or removed (BR-1.1, BR-1.3).
- A plan shows out-of-band changes and the next apply reverts them, so drift does not survive (BR-1.4).
- Permissions are derived from the resources the code declares, which avoids hard-coded wildcards (BR-1.2).
- Non-production and production roles use the same definitions, differing only in environment parameters.
- Rolling back is a revert of a commit.
Cons:
- Emergency fixes must also go through code, which slows hotfixes.
- Drift is only noticed when a plan is run.
- Requires the bootstrap credential for any change that creates identities (ADR-INFRA-005).
- Credential values land in encrypted state, protected by state encryption.
Final Decision
Manage all roles and permissions as code. Option 1 is rejected for missing audit and error-prone changes, Option 2 because hybrid drift makes the code unreliable and lets privileges creep unnoticed. The cost accepted is that every access change, including urgent ones, takes a pull request, to keep drift at zero and the audit history complete.