Commit Graph

401 Commits

Author SHA1 Message Date
Treehugger Robot
cb45db0650 Merge "Update comment to use inclusive language" am: 3b7913607b am: 03e5841ec1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1373954

Change-Id: Ia7b2e14787dd716af3150fa24a8accff05a8ebc8
2020-07-29 00:27:06 +00:00
Joel Galenson
4143080a6d Update comment to use inclusive language
See https://source.android.com/setup/contribute/respectful-code for reference.

#inclusivefixit

Bug: 161896447
Test: None
Change-Id: I1b24350f4e4528ff40ef8d9065a2c5c4251c5059
2020-07-28 17:02:22 +00:00
Victor Hsieh
b07f4854b5 Respect app-ops permission in FileIntegrityService
Previous permission doesn't consider REQUEST_INSTALL_PACKAGES permission
as an app-ops permission.

Bug: 152009905
Test: atest GtsPlayFsiTestCases
Test: remove appops setup from AndroidTest.xml, the same test failed
Change-Id: Icdbf6bb35fe146c5be8a97e29c4c554b3ce91b5d
2020-03-27 09:23:41 -07:00
Ashwini Oruganti
9330d5e32b Resolve conflicting values of usesCleartextTraffic for shared processes
Bug: 148240416
Test: Manually tested by installing two apps running in a shared process
and starting their shared process activities in various orders. The
value of usesCleartextTraffic gets set as expected.
Change-Id: Ib350c09c42d5524734fb259a2ab787790f2d8e30
2020-02-21 09:52:58 -08:00
David Su
1ac48fd8d6 Merge "Move cacerts_wfa from system to Wifi APEX" 2020-01-28 18:54:29 +00:00
Janis Danisevskis
f2dd2fbd4c Merge "ConfirmationPrompt: Use default values for UIOptions" 2020-01-23 19:10:49 +00:00
Janis Danisevskis
227dddf910 ConfirmationPrompt: Use default values for UIOptions
ConfirmationPrompt passes magnified and inverted options to the keystore
service. While gathering the accessibility_display_inversion_enabled
setting, the implementation would throw an exception if this setting was
never set by the user. This causes the font scaling property to be
ignored. This patch uses default values in case the system setting is
not set.

Test: Run CTSVerifier Protected Confirmation test with increased font
      size.

Merged-In: I03a3ef56209c73ca7d2b2527a5f145f744148e38
Change-Id: I03a3ef56209c73ca7d2b2527a5f145f744148e38
2020-01-23 08:17:39 -08:00
Janis Danisevskis
4ff0964128 ConfirmationPrompt: Use default values for UIOptions
ConfirmationPrompt passes magnified and inverted options to the keystore
service. While gathering the accessibility_display_inversion_enabled
setting, the implementation would throw an exception if this setting was
never set by the user. This causes the font scaling property to be
ignored. This patch uses default values in case the system setting is
not set.

Test: Run CTSVerifier Protected Confirmation test with increased font
      size.

Change-Id: I03a3ef56209c73ca7d2b2527a5f145f744148e38
2020-01-22 16:03:09 -08:00
David Su
4a08a1d37e Move cacerts_wfa from system to Wifi APEX
Bug: 145199837
Test: atest android.security.cts.CertificateTest
Change-Id: I16a6376a01491455f3a2ce69ab57763c99353952
2020-01-22 14:04:04 -08:00
Artur Satayev
2d330f6fa8 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
Merged-In: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-09 15:08:18 +00:00
Artur Satayev
df4395991f Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-07 13:29:50 +00:00
TreeHugger Robot
3f7ef32b9f Merge "New API for query trust of a fs-verity certificate" 2019-12-23 20:18:40 +00:00
Victor Hsieh
20fe1f6f22 New API for query trust of a fs-verity certificate
The corresponding service is also added.

The API can be used by a store to know whether their certificate is
trusted on the device. As optimization, they only need to download
.fsv_sig signature file if it will be used.

The API can also be used to gradually switch to stronger key. The store
can query with their certificates in priority order and download the best
signature.

Test: Passed new GTS working in progress
Bug: 142573505
Change-Id: Ic788cd04aeaed35ad62113fe9e7535b8fa63b5ee
2019-12-23 09:21:19 -08:00
Daulet Zhanguzin
75519c08f1 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: Id9752a8c65792e3524a712b7218325528efbf80e
2019-12-18 15:03:01 +00:00
Eran Messeri
c54507664b Wire individual attestation
Properly define the constant for requesting the use of device individual
attestation certificate and use it in AttestationUtils.

This lets callers to DevicePolicyManager.generateKeyPair request the use
of device-unique attestation certificate, on Keymaster implementations
that support this.

Bug: 140193672
Bug: 136494773
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testKeyManagement
Change-Id: I74de89e4c121a27b0495dcb99b0775445c3d4eaf
2019-12-13 10:58:57 +00:00
Neil Fuller
a76674f153 resolve merge conflicts of fe9b32e4be to qt-dev-plus-aosp
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: Merge conflict resolution for approved change
Change-Id: I39bda8417f709f86b5b389a75ff34df8a28a3d8d
2019-04-11 18:09:18 +00:00
Neil Fuller
b5d1c15ec2 Switch from Byte.toHexString() to HexEncoding
Switch from Byte.toHexString() to HexEncoding equivalents.

Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Cherry-picking OWNERS approved internal version
Merged-In: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
Change-Id: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
2019-04-11 09:27:45 +00:00
Neil Fuller
5c3f8c6562 Switch from Byte.toHexString() to HexEncoding
Switch from Byte.toHexString() to HexEncoding equivalents.

Bug: 124232146
Test: build only
Change-Id: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
2019-04-08 14:55:29 +01:00
Andrei Onea
fbc8cfdc94 Add @UnsupportedAppUsage annotations
For packages:
  android.companion
  android.filterfw
  android.hardware.camera2.utils
  android.inputmethodservice
  android.net.nsd
  android.os
  android.preference
  android.security.keymaster
  android.service.dreams
  android.telecom
  android.telephony.ims.compat.feature
  android.telephony
  android.util
  android.view.accessibility
  android.media.effect

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I9c2f8347952f3cc65759472b0e1a2717b285e44e
Change-Id: I14793863cf815fa3383fec6c6bf5a9365c2e17eb
2019-03-22 11:43:11 +00:00
Andrei Onea
e30e3928f9 Add @UnsupportedAppUsage annotations
For packages:
  android.companion
  android.filterfw
  android.hardware.camera2.utils
  android.inputmethodservice
  android.net.nsd
  android.os
  android.preference
  android.security.keymaster
  android.service.dreams
  android.telecom
  android.telephony.ims.compat.feature
  android.telephony
  android.util
  android.view.accessibility
  android.media.effect

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I9c2f8347952f3cc65759472b0e1a2717b285e44e
2019-03-21 14:04:57 +00:00
Dmitry Dementyev
ebe5327a15 Add @NonNull annotation to RecoveryController Builders
Bug: 126702367
Test: builder.
Change-Id: Id7bf7799602fff6d5dd1f364fe26ef18db4f5686
2019-03-05 14:50:16 -08:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Max Bires
b2cc3dc227 Adding KEY_PERMANENTLY_INVALIDATED int
This is to keep it in sync with response codes in keystore.h.

This commit also adds the KeyPermanentlyInvalidatedException to all the
methods that could receive this error code out of KeyStore.

Bug: 118883532
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/AuthBoundKeyTest.java
Change-Id: I878a628824e2eeb639ec5678b1a5d3d10428a918
Merged-In: I878a628824e2eeb639ec5678b1a5d3d10428a918
2019-02-18 21:11:48 +00:00
Max Bires
13f98ce5aa Adding KEY_PERMANENTLY_INVALIDATED int
This is to keep it in sync with response codes in keystore.h.

This commit also adds the KeyPermanentlyInvalidatedException to all the
methods that could receive this error code out of KeyStore.

Bug: 118883532
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/AuthBoundKeyTest.java
Change-Id: I878a628824e2eeb639ec5678b1a5d3d10428a918
2019-02-18 20:45:46 +00:00
Bo Zhu
c704834cb6 Add an optional metadata blob for recoverable application keys
This metadata, if present, will be authenticated (but unencrypted)
together with the application key material.

Bug: 112191661
Test: atest FrameworksCoreTests:android.security.keystore.recovery
      atest FrameworksServicesTests:com.android.server.locksettings.recoverablekeystore
      atest -m RecoveryControllerHostTest RecoverableKeyStoreEndtoEndHostTest RecoverySessionHostTest

Change-Id: I2846952758a2c1a7b1f0849e1adda1f05a3e305e
2019-01-17 17:38:19 -08:00
TreeHugger Robot
278913ae62 Merge "Update KeyStore for new biometric modalities" 2018-11-16 22:52:30 +00:00
Janis Danisevskis
463e2b0d3c Merge "Multi-threaded keystore" am: 9f248989bf am: cbd890315e
am: 444162a57c

Change-Id: I2c09961a74c7de92d85f3d2045dd065c94bc6fac
2018-11-15 06:39:39 -08:00
Janis Danisevskis
b0358e72be Multi-threaded keystore
This patch makes the framework use the asynchronous keystore api model.

Bug: 111443219
Test: Ran full keystore cts test suite
Change-Id: I8d1fdc70cb9eb501d3f22a97d1221904c2ef8f9a
2018-11-14 09:59:16 -08:00
Kevin Chyn
057b743fe9 Update KeyStore for new biometric modalities
Biometrics are now generic from KeyStore point of view

Bug: 113624536

Test: Unable to create keys when no templates enrolled
Test: Able to create keys when templates are enrolled
Test: No regression in Fingerprint
      Keys are invalidated after enrolling another FP

Change-Id: I6bdc20eb58c8a0c10a986519d4ba9e1843ebc89d
2018-11-02 18:09:25 -07:00
Dmitry Dementyev
2dfc3ae608 Clean-up removed RecoveryController API
Bug: 79604447
Test: N/A
Change-Id: If12654aa46ba3a9d018eb68c4d0bec591a22bbb9
2018-10-09 16:19:26 -07:00
Adam Vartanian
86b381be69 Merge "Inline two short methods from Conscrypt" am: 9da9b33cc2 am: 91d61ea0ed
am: 8879ee4a78

Change-Id: Iffbb91414c16b055fc3358e83fb5c23ef4998816
2018-09-25 02:33:46 -07:00
Adam Vartanian
54148c0e57 Inline two short methods from Conscrypt
We're trying to reduce unnecessary direct dependencies on Conscrypt.
These two methods are simple and the implementations can't change, so
they're good candidates for inlining directly instead of depending on
the Conscrypt implementation.

Bug: 110404540
Test: atest NetworkSecurityConfigTests (same failures pre/post)
Change-Id: I303d955e3f49885326fe75f451c06a52af745053
2018-09-24 15:34:13 +01:00
Mathew Inwood
4dbdcf43ad Add @UnsupportedAppUsage annotations
For packages:
  android.security.net.config
  android.security.keystore
  android.security.keymaster
  android.security

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ifed4da56531195f64fd53d84f14b4e8298843b2c
Merged-In: I7762dd647bede8abc9be2c538af3a3a99a25a73e
2018-08-16 18:49:37 +01:00
Mathew Inwood
e420f8b5fb Add @UnsupportedAppUsage annotations
For packages:
  android.security.net.config
  android.security.keystore
  android.security.keymaster
  android.security

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I7762dd647bede8abc9be2c538af3a3a99a25a73e
2018-08-16 18:40:47 +01:00
Chad Brubaker
11ecd58309 Deprecate targetSandboxVersion=2
Most of the targetSandboxVersion=2 protections have moved to target O
MR1 or P, or were reverted, so move the remaining checks to isInstantApp
and remove the requirement for Instant Apps to target
targetSandboxVersion=2

Change-Id: I448a7565e26d4eafece1bdc657192117d790ff3a
Fixes: 111314398
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
2018-08-02 15:55:34 -07:00
Bo Zhu
f7e7b1d375 Merge "Revert "Revert "Change the root of trust for CryptAuth Vault Service""" into pi-dev am: 90dbb0ed72
am: 542dbb9734

Change-Id: I953c5cf4f2475dc0d371e4b3fb3f9ad7520c60ad
2018-05-11 10:08:47 -07:00
Bo Zhu
bd7879ce3e Revert "Revert "Change the root of trust for CryptAuth Vault Service""
This reverts commit be4f735cb1.

Reason for revert: Resubmit the CL http://ag/3983388 that was reverted. The server side change has been deployed now.

Bug: 78920513
Change-Id: If676799176ecf90fd51a97027a9ff83bec5d4bed
2018-05-11 05:11:11 +00:00
Bo Zhu
ad3c9066ef Merge "Revert "Change the root of trust for CryptAuth Vault Service"" into pi-dev am: 3b0f011709
am: 4fabef2d66

Change-Id: Ibbdf78fa96c748145775c9a4f556eaf739924426
2018-05-10 09:21:18 -07:00
Bo Zhu
be4f735cb1 Revert "Change the root of trust for CryptAuth Vault Service"
This reverts commit 1f40978609.

Reason for revert: Will resubmit once the server side change is ready

Bug: 79513473
Bug: 78920513
Change-Id: I4c94d307a9181390a59cdc1602cc9d04c1661ad0
2018-05-10 15:53:08 +00:00
android-build-team Robot
276d60a873 Merge "Change the root of trust for CryptAuth Vault Service" into pi-dev am: 738b0a8b42
am: 665c7c7b73

Change-Id: Ie41bfd20283226e769b592cab48955544b8a6426
2018-05-09 11:57:25 -07:00
Bo Zhu
1f40978609 Change the root of trust for CryptAuth Vault Service
Change-Id: I99899e7e6c090cf22cf31b0b4d5fd3e33dcb2f8f
Bug: 78920513
Test: adb shell am instrument -w -e package
com.android.server.locksettings.recoverablekeystore
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
2018-05-08 16:33:49 -07:00
Chad Brubaker
8bfbc6e710 Add nsconfig support for WFA CAs
Bug: 78643773
Test: manually verified
Change-Id: Ib7d2b24669074b74bbda7ab7163ef25584e95a11
2018-04-26 19:33:06 +00:00
Dmitry Dementyev
745d2c98f9 Remove implementation of deprecated RecoveryController methods.
Bug: 78021839
Test: manual
Change-Id: I8a8a23f1cc14e7b9ffe1e758b6f35906d1a5cf2f
2018-04-14 13:37:07 -07:00
Jeff Sharkey
3990ee1c9f Clean up APIs before declaring API 28.
As part of finalizing an SDK, we need to ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.

Someone forgot to replace Slice.getTimestamp() with Slice.getLong().

Bug: 77588754
Test: builds, boots
Exempt-From-Owner-Approval: SDK finalization
Change-Id: Ic0ec91a43d161a69c1e840c42046ad500b7aeca0
2018-04-11 13:49:21 -06:00
Bo Zhu
b95c90ce2d Add an API to check whether the recoverable keystore is enabled
Bug: 77690455
Test: It builds
Change-Id: I94be0e341d8a3e0fa9a5f9af8beda60e08a449e8
2018-04-10 14:50:21 -07:00
TreeHugger Robot
4147a83ae5 Merge "Revert "Remove deprecated RecoveryController API."" into pi-dev 2018-04-06 12:28:09 +00:00
Robert Berry
c157e21249 Revert "Remove deprecated RecoveryController API."
This reverts commit 0d55aa387a.

Reason for revert: aps_sidecar binary is still using some of these @removed APIs. Although HEAD of auth_folsom is fixed, aps_sidecar burned in framework is old.

Bug: 77629807
Change-Id: I2f03c7d12de30cc2eebd91bb65646caaa00fcd1d
2018-04-06 10:30:44 +00:00
TreeHugger Robot
ae938f5437 Merge "ConfirmationPrompt: Update for API review." into pi-dev 2018-04-05 18:50:35 +00:00
Dmitry Dementyev
654598b542 Merge "Remove deprecated recoverable keystore classes." into pi-dev 2018-04-04 17:42:11 +00:00
Dmitry Dementyev
ce70473a89 Merge "Remove deprecated RecoveryController API." into pi-dev 2018-04-04 17:41:51 +00:00