Production access: RBAC, short-lived credentials, four eyes and break-glass

Keep the speed of direct access and add the record: short-lived credentials tied to a person, least privilege by role, two people for anything touching keys, and a break-glass that's logged and rehearsed.

Read the briefing
About 3 min to read 5 drills

What to remember

  1. Standing access is the risk. Access that's always on is available to a stolen laptop at any hour. Access that expires isn't.
  2. Tie each session to a person and a reason. Shared accounts make audit meaningless, and short-lived SSH certificates are easy now.
  3. Two people for what touches keys. On a small team the second person can review afterwards for some things, but it must leave a record.
  4. Break-glass must work at 3 a.m. If the emergency path is untested or too slow, people build a secret one. Log it, alert on it, review it.
  5. Paved roads beat gates. When the secure way is the easy way, people use it. Controls that slow everyone down get routed around.

The big picture

On a small, fast team with "direct access to production", the question isn't how to remove access. It's how to keep it while knowing who did what, limiting what one session can do, and bounding the damage from a stolen credential. That's what the RBAC and self-service parts of the job are about.

The mental model

A hotel key card, not a master key. It opens the rooms you need, expires on its own, and the lock remembers every time it was used.

In depth

RBAC, and what it isn't

Roles collect permissions, and people get roles. Conditions narrow them by environment, time or resource. The failure is sprawl: a role for every exception, until nobody knows what "ops-2" can do. Review who holds what, using what was really used, and remove the rest. In Kubernetes, RBAC is the same idea, and the same traps apply: wildcards, and cluster-admin given to make something work.

Short-lived credentials

SSH certificates that last hours, issued after single sign-on with a hardware key, replace authorized_keys files that nobody cleans up. Each session is tied to a person. Elevation for production is just-in-time, with a reason recorded. Session logs go off the box. None of this needs to slow anyone down much.

Separation of duties on a small team

The author of a change shouldn't be the only one who can release it, and build credentials shouldn't be a developer's. Anything touching keys or signing policy takes two people. When the team is five people, a second reviewer may be asynchronous, or after the fact for routine changes. Say which and why. What can't be skipped is the record.

Break-glass

The emergency path exists because in an outage your normal path may be down: SSO, say. It's a credential kept sealed, and using it pages everyone and creates a review. It expires. Rehearse it twice a year, or it won't work when you need it.

Self-service

A platform team of a few people can't review everything. Make templates and paved roads that are safe by default, with policy checks in CI and at admission, so most changes need no human gate at all. Humans then look at what's actually unusual.

Myths and facts

Myth: Least privilege means nobody has production access.

Fact: It means the access you have fits the work and expires. Removing access entirely creates a secret path during the next outage.

Myth: A bastion host gives us an audit trail.

Fact: Only if sessions are tied to a person and logged off the box. A shared login through a bastion just moves the problem.

Myth: Small teams don't need this.

Fact: Small teams need it more cheaply. Short-lived certificates and logged sessions are hardly any overhead, and one stolen laptop has reach over everything.

How pros do it

  • Tie every session to a person, with short-lived credentials and hardware-backed sign-on.
  • Review access using what was actually used, and remove the rest.
  • Require two people for keys and signing policy, and say which changes can be reviewed afterwards.
  • Ship session and privilege logs off the box, and alert on privilege changes.
  • Rehearse break-glass, and review every use.

Questions people ask

How would you roll this out without annoying a senior team?

Start with what makes their lives easier: SSO into short-lived SSH, no more key files. Measure what access was actually used before removing anything. Add the two-person rule only for keys. Ask them what would be annoying, then fix it.

What's your position on root in production?

Sometimes needed, always attributable. Root through a named elevation that expires and is logged off the box. No shared root password, and no standing root on signing hosts.

RBAC or ABAC?

RBAC for the model people can hold in their heads, with conditions added where they earn it, like environment. Pure attribute systems become hard to reason about. Say what you'd audit, and pick what you can explain.

Further reading

Drills · 5

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Answer out loud

Every engineer here has direct access to production, and we like it that way. What would you change, and what would you leave alone?

In short

Leave the speed; add short-lived access tied to a person, logged sessions off the box, and two people only for keys and signing policy.

What a strong answer does
  • Keeps what works: Says what they'd leave alone, and targets only the riskiest actions.
  • Bounds the risk: Short-lived, person-tied credentials, logs off the box, caps on what a session can reach, two people for keys.
  • communication: Starts from a measurement, then a short ordered plan.
Why

The interviewer is testing whether you'd impose a bank's process on a fast team, or whether you can keep what works and bound the risk. Start by measuring what one session can do. Change credentials before you change who has access.

The common mistake

Opening with tickets and approval gates. You've lost the room.

2 Scenario: what do you do next?

03:00. Your SSO provider is down, so nobody can get a short-lived certificate. A validator host needs attention now.

Step 1. How do you get in?

  1. Ask whoever still has an old SSH key on that box. That key shouldn't exist, and you've just found out it does. Note it, but don't rely on it.
  2. Wait for SSO to come back. The host needs attention, and the provider's outage isn't yours to wait on.
  3. Use the break-glass credential, which alerts everyone and is logged off the box. That's what it's for. The record exists because the use is loud.

Step 2. It's fixed, and SSO is back. What's next?

  1. Keep the session open in case it happens again. An open privileged session is the very thing you're avoiding.
  2. Rotate the break-glass credential, review what was done during the session, and write down what was slow. It was used, so it's no longer sealed. The review keeps the path honest.
In short

Use the rehearsed break-glass, which pages everyone and leaves a record, then review it afterwards and fix what was slow.

Why

A break-glass path that works, is loud and gets reviewed is what lets you have strict normal paths.

3 Pick the strongest answer

Your RBAC has grown to 60 roles and nobody knows what they do. What's the most useful first step?

  1. Ask each person what they need. People ask for everything, in case. Usage data is more honest.
  2. Delete all roles and start again on a Saturday. You'd find out what mattered through outages.
  3. Compare what each role allows with what was actually used over recent months, then cut to that. Evidence makes the review quick, and makes removals safe to argue for.
  4. Move everything to attribute-based access. A new model doesn't tell you what people need. You'd carry the confusion over.
In short

Look at what permissions were really used over a recent period, and shrink roles to that.

Why

Access reviews fail when they're based on memory. Logs make them cheap. Do the most sensitive roles first.

4 Quick recall

What's the common name for a logged, emergency-only way to get access when the normal path is down?

In short

Break-glass: an emergency path that's loud, logged, reviewed and rehearsed.

Accepted

break glass · break-glass · breakglass

Why

Like the fire alarm's glass: easy to use when needed, and everyone knows you used it.

5 Pick the strongest answer

You own shared services on GKE and engineers self-serve. What most reduces risk without adding reviewers?

  1. Give only the platform team deploy rights. You become the bottleneck, and people route around you.
  2. Safe-by-default templates, with policy checks in CI and at admission that refuse what's unsafe. It scales without people, and engineers get an immediate, specific reason.
  3. A weekly security review of every change. A review that large gets skimmed. It's slower and catches less.
  4. Send everyone a security training. Worth doing, but it isn't a control.
In short

Safe templates and policy checks at CI and admission, so unsafe changes are refused automatically and humans see only what's unusual.

Why

It's the same idea as blocking CI gates: a control that blocks with a clear reason, with a documented exception path, beats a control that warns.

Next lesson When a key leaks: the order of moves, the evidence, and what past incidents teach
Drill · Production access
0:00

Loading…