keystore: log receipt of auth tokens
Various recent bugs would have been easier to investigate if the auth
tokens received by keystore were logged.
Test: adb logcat while lock/unlock
Bug: 285328437
Bug: 284802403
Change-Id: Ia955d344a2bb47820c0616cc1b9784f5fcbecb0a
diff --git a/keystore2/src/authorization.rs b/keystore2/src/authorization.rs
index 4f2c7bd..de7f19a 100644
--- a/keystore2/src/authorization.rs
+++ b/keystore2/src/authorization.rs
@@ -128,6 +128,15 @@
// Check keystore permission.
check_keystore_permission(KeystorePerm::AddAuth).context(ks_err!())?;
+ log::info!(
+ "add_auth_token(challenge={}, userId={}, authId={}, authType={:#x}, timestamp={}ms)",
+ auth_token.challenge,
+ auth_token.userId,
+ auth_token.authenticatorId,
+ auth_token.authenticatorType.0,
+ auth_token.timestamp.milliSeconds,
+ );
+
ENFORCEMENTS.add_auth_token(auth_token.clone());
Ok(())
}