How it works
The explanation, with examples you can run.
Least privilege in practice
- Humans: role-based access matched to real job needs; no shared accounts; admin rights through separate, MFA-protected accounts or elevation; just-in-time access for production, approved and time-limited, with the session logged.
- Services: one identity per service (not a shared "app" user), scoped to the tables, queues and buckets it uses. Read-only where it only reads.
- CI and automation: job tokens with minimal scopes, cloud roles limited to the resources a pipeline deploys, and OIDC instead of stored keys.
- Containers and processes: run as non-root, drop capabilities, read-only filesystems where possible.
Permissions grow over time as people add "just one more" grant. Review them: most cloud providers can report which granted permissions were actually used in the last 90 days, which makes trimming practical.
Zero trust
The traditional model was a castle: a strong perimeter (firewall, VPN) and broad trust inside it. Once an attacker got in through phishing, a VPN flaw or a compromised laptop, they could move freely. NIST SP 800-207 and Google's BeyondCorp describe the alternative:
- No implicit trust from location. An internal IP address is not a credential.
- Strong identity for users and services: SSO with phishing-resistant MFA for people, workload identities and mutual TLS for services.
- Device posture as an input: is the laptop managed, patched and encrypted?
- Per-request, per-resource decisions made by a policy engine and enforced close to the resource, at an identity-aware proxy, an API gateway or a sidecar.
- Continuous evaluation: sessions are re-checked, and access can be withdrawn when risk changes.
Zero trust is a direction, not a product. Most organisations move there step by step: SSO and MFA everywhere, then an identity-aware proxy in front of internal tools in place of the VPN, then service-to-service authentication with mTLS and network policies that deny by default.
Assume breach
Both ideas follow from one assumption: something will be compromised. Design for it:
- Segment: separate environments, accounts and networks, so a foothold in one doesn't reach the others.
- Limit blast radius: per-tenant keys and data partitions, scoped tokens, short credential lifetimes.
- Make misuse visible: log access decisions and alert on unusual use of privileges.
- Separate duties for the most dangerous actions: the person who requests a production change isn't the only one who approves it.
The question to ask of any design is: if this one credential leaked today, what could someone do with it, and how fast would we know?
Check yourself
3 questions. Get them all right to finish this topic.
0 of 3 right so far. Get all three to finish this topic.