Fix insider attack resistance on headless devices

On HSUM devices where the main user is a permanent admin, we want to
entrust the vendor auth secret only to full users. We generate the
secret when the main user is created, and store it on disk encrypted
using their SP. We also store it in memory so that when each user is
created they can get their own encrypted copy on disk.

Bug: 258560859
Test: atest com.android.server.locksettings
Test: boot without hsum, check that only user 0 writes auth secret
Test: boot with hsum, check that user 0 does not write auth secret
Test: boot with hsum, check user 10 writes auth secret
Test: boot with hsum, create user 11, check that user writes auth secret
Change-Id: I2b3141a573a4457ade0edd0eb989ec7929be006d
6 files changed