The audit chain

  1. seq 410

    bodypolicy.overlay.edit

    hashH(hash 409 + body)

    MACHMAC(key, hash)

  2. seq 411

    bodyapproval.submit

    hashH(hash 410 + body)

    MACHMAC(key, hash)

  3. seq 412, the head

    bodyauth.login

    hashH(hash 411 + body)

    MACHMAC(key, hash)

  4. A copy off the server

    The head's seq and hash, printed at boot and every hour, kept by a log service or ticket you control

The MAC key is derived at boot from LW_SESSION_SECRET. The database never holds the key.