PIN Auto Submit - Extend PinBackend
Extend PinBackend to support the PIN auto submit functionality. PIN auto submit just exposes the user's PIN length in local state when its enabled. Normal users are prompted with a dialog in Settings for their PIN. After checking that the PIN is correct, the length is exposed. Managed users who cannot control the feature have their PIN lengths collected upon a successful authentication attempt. A new method - SetPinAutoSubmitEnabled - was added to allow Chrome OS Settings to control the functionality directly. The basic operations in PinBackend (Set, Remove, TryAuthenticate) were extended so that they now call PIN auto submit subroutines to do additional steps that are necessary for the new functionality. These methods were named PinAutosubmitOnSet, PinAutosubmitOnRemove and PinAutosubmitOnTryAuth. In order to extract the PIN length upon a successful authentication attempt, the call to Cryptohome is now calling the new method 'OnCryptohomeAuthenticationResponse' first, instead of the original caller. All of the PIN auto submit subroutines are guarded by the feature flag, which is disabled by default. Unit tests were added to cover all the possible user flows. Design Document - https://goto.google.com/chromeos-oac-pin-authentication-refinements Bug: 1107367, 1107367 Change-Id: Ie770727c73c9abece174a10fd8c618575f849b88 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2306258 Commit-Queue: Renato Silva <rrsilva@google.com> Reviewed-by:Toni Baržić <tbarzic@chromium.org> Cr-Commit-Position: refs/heads/master@{#791405}
Showing
This diff is collapsed.
Please register or sign in to comment