What does Password Entropy and Least Privilege conclude, in numbers, about “The Permission-Matrix Audit Sheet: an Empirical Loop and a Falsification Plan”?

Answer: Chapter 8 gives the permission-matrix audit sheet and the tool of the same name: the illustrative firm's weighted residual risk index falls from 11.640 to 1.017; it also gives a pre-registered testing plan and the results that would overturn the claims. Marked boxes separate published evidence, runnable Python calculations (19 programs), classical sources and the author's hypotheses.

Scope of the numbers: Its firms, accounts and probabilities are illustrative, and all calculations are generated by its programs; it is not personalised business, legal, financial or compliance advice, and its audit routine and tool never touch a real password. Chapter 6 uses minimum role covers and the recovery graph to show that the illustrative firm expects to lose 0.4972 accounts a year, and 0.1899 after hardening the main mailbox alone.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 1.017, 11.640

member system role factor weight flags
owner mail admin device14 ok
owner bank admin device2 ok
owner cloud admin knowledge4 R1 A-rev
assistant mail admin knowledge14 R1 R3 A-rev A-ex2
assistant store admin none2 R1 R2 A-ex2
bookkeeper bank payer device1 A-ex1
designer store editor none1 A-rev
developer cloud admin device4 A-rev A-ex2
second-factor coverage by grant0.750
weighted residual risk index11.640
grants with a red line3 of 8
after least roles, device factors, no sharing:
coverage 1.000, risk index 1.017, 11.4 times lower
Show the full program
# Chapter 8. p81: the permission-matrix audit sheet on a sample firm.
# Each grant: member, system, role, second factor (device, knowledge,
# none), whether the login is shared, days since last review. Roles and
# needs come from p61, blast radii from p62 (mail and domain 7, cloud 2,
# others 1), residual risk per factor from p43 at automated share 0.7:
# device 0.018, knowledge 0.459, none 1.0. Weight = blast radius, doubled
# for an admin role. Red lines: admin without a device factor; a shared
# login that can move money or keys; a non-owner admin on mail or
# domain. Amber: review older than 90 days; excess permissions. All data
# illustrative; the sheet never sees a password.
import math
from itertools import combinations

ROLES = {
    "bank": {"viewer": {"read"}, "payer": {"read", "pay"},
             "admin": {"read", "pay", "users", "limits"}},
    "store": {"viewer": {"read"}, "editor": {"read", "edit"},
              "refunds": {"read", "refund"},
              "admin": {"read", "edit", "refund", "users", "keys"}},
    "mail": {"user": {"own"}, "delegate": {"own", "shared"},
             "admin": {"own", "shared", "users", "routing"}},
    "cloud": {"viewer": {"read"}, "deployer": {"read", "deploy"},
              "admin": {"read", "deploy", "iam", "billing"}},
}
RADIUS = {"mail": 7, "domain": 7, "cloud": 2, "bank": 1, "store": 1}
RESID = {"device": 0.018, "knowledge": 0.459, "none": 1.0}
MONEY = {"pay", "refund", "keys", "iam", "limits"}
GRANTS = [  # member, system, role, factor, shared, days, needed perms
    ("owner", "mail", "admin", "device", False, 30,
     {"own", "shared", "users", "routing"}),
    ("owner", "bank", "admin", "device", False, 30,
     {"read", "pay", "users", "limits"}),
    ("owner", "cloud", "admin", "knowledge", False, 200,
     {"read", "deploy", "iam", "billing"}),
    ("assistant", "mail", "admin", "knowledge", False, 120,
     {"own", "shared"}),
    ("assistant", "store", "admin", "none", True, 45,
     {"read", "edit", "refund"}),
    ("bookkeeper", "bank", "payer", "device", False, 60, {"read"}),
    ("designer", "store", "editor", "none", False, 300, {"read", "edit"}),
    ("developer", "cloud", "admin", "device", False, 400,
     {"read", "deploy"}),
]


def perms_of(system, role):
    return set().union(*(ROLES[system][x] for x in role.split("+")))


def audit(grants, review_days=90):
    rows, risk, covered = [], [], 0
    for m, s, r, f, shared, days, need in grants:
        perms = perms_of(s, r)
        w = RADIUS[s] * (2 if r == "admin" else 1)
        flags = []
        if r == "admin" and f != "device":
            flags.append("R1")
        if shared and perms & MONEY:
            flags.append("R2")
        if r == "admin" and m != "owner" and s in ("mail", "domain"):
            flags.append("R3")
        if days > review_days:
            flags.append("A-rev")
        if len(perms - need) > 0:
            flags.append("A-ex{}".format(len(perms - need)))
        covered += f != "none"
        risk.append(w * RESID[f])
        rows.append((m, s, r, f, w, flags))
    return rows, math.fsum(risk), covered / len(grants)


def least_role(system, need):
    best = None
    for k in range(1, len(ROLES[system]) + 1):
        for combo in combinations(sorted(ROLES[system]), k):
            got = set().union(*(ROLES[system][r] for r in combo))
            if need <= got:
                key = (len(got), k, combo)
                best = key if best is None or key < best else best
    return "+".join(best[2])


def fix(grants):
    out = []
    for m, s, r, f, shared, days, need in grants:
        r2 = least_role(s, need)
        hot = r2 == "admin" or perms_of(s, r2) & MONEY or RADIUS[s] >= 2
        f2 = "device" if hot else ("knowledge" if f == "none" else f)
        out.append((m, s, r2, f2, False, 0, need))
    return out


rows, risk, cov = audit(GRANTS)
print("member      system role     factor     weight  flags")
for m, s, r, f, w, flags in rows:
    print("{:<11s} {:<6s} {:<8s} {:<9s} {:>6d}  {}".format(
        m, s, r, f, w, " ".join(flags) or "ok"))
red = len([x for x in rows if any(g.startswith("R") for g in x[5])])
print("second-factor coverage by grant: {:.3f}".format(cov))
print("weighted residual risk index: {:.3f}".format(risk))
print("grants with a red line: {} of {}".format(red, len(rows)))
rows2, risk2, cov2 = audit(fix(GRANTS))
print("after least roles, device factors, no sharing:")
print("  coverage {:.3f}, risk index {:.3f}, {:.1f} times lower".format(
    cov2, risk2, risk / risk2))

Single source and citation

Fan, Y. (2026). Password Entropy and Credential Stuffing, the Forced-Rotation Paradox and Least-Privilege Accounts for One-Person Firms (Version 1.0.0), Chapter 8: The Permission-Matrix Audit Sheet: an Empirical Loop and a Falsification Plan. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-218 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026218,
  author    = {Fan, Yafu},
  title     = {Password Entropy and Credential Stuffing, the Forced-Rotation Paradox and Least-Privilege Accounts for One-Person Firms},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book