• Renato Silva's avatar
    PIN Auto Submit - Extend PinBackend · 5a899167
    Renato Silva authored
    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: default avatarToni Baržić <tbarzic@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#791405}
    5a899167
pin_backend.h 6.25 KB