John Karanja

The field guide · rule 07 of 16

Give each part only the power it needs

Keep keys out of the code, and design so that one broken part cannot do much damage.

What it means

Give every part of a system the smallest set of powers it needs to do its job. Keep passwords and keys out of the code. Then, if one part is broken into, the damage stays small. The parts that face the internet should have no power to move money.

What goes wrong without it

A website is hacked. Because the website holds the keys to the wallet, the money goes too.

How I build it

From systems I build and run.

Ask your team

  1. Could anyone outside your team still get in with an old key or account?
  2. If your web server were hacked, could it move money?
  3. Are passwords and keys kept out of the code?

A "no" or "not sure" is worth a closer look.

How a review checks this

A review lists who and what holds each key and account, and what each one could do if it were misused.

Request a reviewThe offer: Architecture review or handover checkCheck your system in one minute

Related rules