Commit Graph

4 Commits

Author SHA1 Message Date
Alex Johnston
c271813dcf Cred mng app URI documentation
* Add URI matching documentation

Bug: 177979648
Test: build docs
Change-Id: I44d40e919cce1b4f955f562b1cf6cbad450b4b58
2021-04-21 13:50:35 +01:00
Alex Johnston
0c3f0c51bc AppUriAuthenticationPolicy and UrisToAliases equals and hashcode
Bug: 177979648
Test: atest android.devicepolicy.cts.CredentialManagementAppTest
      atest android.devicepolicy.cts.AppUriAuthenticationPolicyTest
      atest android.security.CredentialManagementAppTest
Change-Id: I66d715ba6b47749e2e89c037caecc29f02d3a017
2021-03-03 18:13:21 +00:00
Alex Johnston
e17727ebe4 Add KeyChainService credential management app APIs
Background
* This is part of the work to support
  a credential management app on
  unmanaged devices.
Changes
* Add KeyChainService API methods to
  modify the stored credential management app.

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: I00b7df27a92f6ee4f74546f892c83290fead1112
2020-12-01 20:04:04 +00:00
Alex Johnston
eff614db00 Add credential management app to platform
- This is part of the work to support
  a credential management app on
  unmanaged devices.
- Add intent and method in KeyChain to allow
  an app to request to become the credential
  management app.
- Add the class CredentialManagementApp to store the
  current credential management app.
- Add the class AppUriAuthenticationPolicy and an
  extra in KeyChain to allow an app to set an
  authentication policy.
- Add API methods to KeyChainService to set, get
  and retrieve the credential management app.

Bug: 165641221
Test: atest CredentialManagementAppTest
      atest AppUriAuthenticationPolicyTest
      adb shell am start -n com.android.keychain.tests/.KeyChainTestActivity
Change-Id: I1e57ed9c18a1ada463c55dbf17ce30e31aa7bad2
2020-11-27 08:25:56 +00:00