Add KeyChain implementation credential management app
Background
* This is part of the work to support
a credential management app on
unmanaged devices.
Changes
* Add implementation for KeyChain API
methods to manage the credential
management app
* Intercept KeyChainActivity to choose
alias provided by credential management
app if provided.
Manual Testing
* Install TestDPC
* Request to manage credentials (fire intent).
Add policy mapping: 'com.android.chrome' ->
'client.badssl.com:443' -> 'testAlias'
* Install badssl user certificate as credential
management app (TestDPC). Set alias to 'testAlias'
* Check certificate is installed in Settings
* Go to chrome > client.badssl.com
* Verify no certificate selection prompt is
displayed. User is automatically authenticated.
* Remove credential management app from Settings
Security > Encryption and credentials >
Certificate management app
* Verify credential management app is removed and
'testAlias' is uninstalled.
Bug: 165641221
Test: Manual Testing
atest com.android.keychain.KeyChainServiceRoboTest
Change-Id: Ib3479c3b7bbd54cbc8e0782c8c58898399eda349
4 files changed