Commit graph

2728 commits

Author SHA1 Message Date
Treehugger Robot
552c0ca443 Merge "Add maxTargetSdk restriction to unused APIs." 2020-10-27 13:25:59 +00:00
Mathew Inwood
271f57b52c Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to remove
from the unsupported list.

Bug: 170729553
Test: Treehugger
Change-Id: I54fce50d3fb9d3ba02eae312c478bac419a46ede
2020-10-26 11:21:01 +00:00
Treehugger Robot
4e3244236f Merge "Keystore 2.0: Start keystore2 daemon conditionally." am: e0b6606138
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1472235

Change-Id: Ic5089402799d4479c8fdbb35a68b8fc8196a931e
2020-10-25 21:03:31 +00:00
Treehugger Robot
e0b6606138 Merge "Keystore 2.0: Start keystore2 daemon conditionally." 2020-10-25 20:49:53 +00:00
Janis Danisevskis
9402f2775b Keystore 2.0: Start keystore2 daemon conditionally.
This patch makes the keystore2 daemon start conditionally based on the
platform property ro.android.system.keystore2.enable.
This is patch can be reverted when the Keystore 2.0 migration is
complete. b/171563717

Bug: 171563717
Bug: 171305684
Test: The keystore2 daemon is running if the property
      ro.android.system.keystore2.enable is set and true
      and not running otherwise.
Change-Id: I2b3d6c70f45f3dafb9edb6f2f6960be94e13ed20
2020-10-23 11:14:52 -07:00
Treehugger Robot
68ec103cb2 Merge "Add Keystore 2.0 service." am: 0078542aa1
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1395708

Change-Id: I8b30f67ee5943ce28ac55928906bb9e93c657e04
2020-10-16 02:55:23 +00:00
Treehugger Robot
0078542aa1 Merge "Add Keystore 2.0 service." 2020-10-16 02:36:44 +00:00
Janis Danisevskis
1af9126a1f Add Keystore 2.0 service.
This patch adds a boilerplate Keystore 2.0 service. It is configured to
run on the device but does not provide any useful service yet.
It provides basic functionality for generating, importing and using
keys, but it still lacks full Keystore functionality.

Test: VtsKeystore2V1_0TargetTest (in followup CL)
Bug: 160623310
Bug: 160930114
Bug: 160930117
Bug: 160930331
Bug: 159465122
Change-Id: I7dfa2f2f63f4da3af620aff2ec99c0cba3bda6fd
2020-10-15 16:11:09 -07:00
Xin Li
d5a79419b8 Skip ab/6749736 in stage.
Merged-In: I3c023063eff938812d7001d621d027b81572f4c8
Change-Id: Ied5cd2adff15c89a895bf751cecb047267931ce4
2020-10-08 17:24:04 -07:00
Treehugger Robot
c0f98114f7 Merge changes from topic "ks2_aidl_autogen" am: c79a95510f
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1454000

Change-Id: I5b8f42ad16476257feacaa105023e8192ac313f6
2020-10-08 17:59:18 +00:00
Treehugger Robot
c79a95510f Merge changes from topic "ks2_aidl_autogen"
* changes:
  Keystore 2.0: Add globals.rs and utils.rs
  Update prebuilt keymint interface.
  Keystore 2.0: Adopt associated const enum variants.
  Keystore 2.0: Switch to autogenerated AIDL bindings.
2020-10-08 17:41:00 +00:00
Janis Danisevskis
a75e208d30 Keystore 2.0: Add globals.rs and utils.rs
These two files add some utility functions and a thread local reference
to a database connection.

Test: None
Change-Id: I34fdf977deb233571b9a0c6d50da20e47593d6a5
2020-10-08 08:22:34 -07:00
Janis Danisevskis
c5b5cb6f08 Update prebuilt keymint interface.
Change-Id: I2af01ffdcd22bd2389b193bab90a5c9ceb79da64
2020-10-07 17:52:43 -07:00
Janis Danisevskis
c5b210b62b Keystore 2.0: Adopt associated const enum variants.
The aidl to rust generator now generates tuple structs with associated
constants as variants. This patch adjusts the existing Keystore 2.0
codebase to this change.

In the process one more variant was added to the
implement_key_parameter_conversion_to_from_wire! macro and the
indentation was fixed.

Test: keystore2_test
Change-Id: I2639c76d4da7401f6799180e1bfcb3e420341628
2020-10-07 17:52:32 -07:00
Janis Danisevskis
71dc30de9c Keystore 2.0: Switch to autogenerated AIDL bindings.
Remove pregenerated file android_security_keystore2.rs and
reconfigure the build to use the generated target
android.security.keystore2-rust instead.

Test: keystore2_test
Change-Id: Iad24cab05ef35ccc766f7342225d4b79e8051ada
2020-10-06 19:31:05 -07:00
Hasini Gunasinghe
eb4a5a5d70 Merge "Pass default values for the optional fields in attestation logs" am: 6214d7d3ad
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1448835

Change-Id: I6289f63a9188f87c48f33127c9bcd931919e491e
2020-10-06 21:54:08 +00:00
Hasini Gunasinghe
6214d7d3ad Merge "Pass default values for the optional fields in attestation logs" 2020-10-06 21:34:36 +00:00
Hasini Gunasinghe
2481b9deb7 Pass default values for the optional fields in attestation logs
This CL provides the fix for the issue reported in b/169959923.

Bug: 169959923
Test: tested using statsd_testdrive script.
Change-Id: I3fe42e85abd0976782795ad4fa13a804702624d6
2020-10-05 12:46:42 +00:00
Janis Danisevskis
a6f93de007 [automerger skipped] Merge "Keystore 2.0: Remove list permission from keystore2_key security class." am: d55f6ceacc -s ours am: a5562fae1d -s ours am: 40c87e834c -s ours am: 49a77a51b6 -s ours
am skip reason: Change-Id Ie0a29d8b08c53977ae2ed04d042868044d2c34c5 with SHA-1 3d72aad0bc is in history

Original change: https://android-review.googlesource.com/c/platform/system/security/+/1434719

Change-Id: I8c8d68b18342446053262257a897b55cc1af3780
2020-10-01 18:43:00 +00:00
Janis Danisevskis
49a77a51b6 [automerger skipped] Merge "Keystore 2.0: Remove list permission from keystore2_key security class." am: d55f6ceacc -s ours am: a5562fae1d -s ours am: 40c87e834c -s ours
am skip reason: Change-Id Ie0a29d8b08c53977ae2ed04d042868044d2c34c5 with SHA-1 3d72aad0bc is in history

Original change: https://android-review.googlesource.com/c/platform/system/security/+/1434719

Change-Id: Iff7cb2fb3e75c826cf4d908c7cf69c60122c8c91
2020-10-01 18:26:38 +00:00
Janis Danisevskis
c2f645ae18 Keystore 2.0: Remove list permission from keystore2_key security class. am: 3d72aad0bc am: bc81e670db am: 2fa892c9fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/security/+/12737985

Change-Id: Ia9d4d4ca263d2b6c5d4bf80ca570198bc3ddbefe
2020-10-01 17:41:27 +00:00
Janis Danisevskis
40c87e834c [automerger skipped] Merge "Keystore 2.0: Remove list permission from keystore2_key security class." am: d55f6ceacc -s ours am: a5562fae1d -s ours
am skip reason: Change-Id Ie0a29d8b08c53977ae2ed04d042868044d2c34c5 with SHA-1 3d72aad0bc is in history

Original change: https://android-review.googlesource.com/c/platform/system/security/+/1434719

Change-Id: Ic1d8bdfa81dd4c92f8e77253c1fb97805d7f3e5e
2020-10-01 17:41:27 +00:00
Janis Danisevskis
a5562fae1d [automerger skipped] Merge "Keystore 2.0: Remove list permission from keystore2_key security class." am: d55f6ceacc -s ours
am skip reason: Change-Id Ie0a29d8b08c53977ae2ed04d042868044d2c34c5 with SHA-1 3d72aad0bc is in history

Original change: https://android-review.googlesource.com/c/platform/system/security/+/1434719

Change-Id: I3475e3e4a7ede8e810ef8a2b6e4b2a5b307dc825
2020-10-01 17:10:10 +00:00
Janis Danisevskis
2fa892c9fc Keystore 2.0: Remove list permission from keystore2_key security class. am: 3d72aad0bc am: bc81e670db
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/security/+/12737985

Change-Id: Ic3cb20a801bafd61dfe40515f69cc4a6c16c1e0f
2020-10-01 17:09:46 +00:00
Janis Danisevskis
bc81e670db Keystore 2.0: Remove list permission from keystore2_key security class. am: 3d72aad0bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/security/+/12737985

Change-Id: I53c8cf3508d7b58768e14626a32b96454446b555
2020-10-01 16:55:05 +00:00
Janis Danisevskis
d55f6ceacc Merge "Keystore 2.0: Remove list permission from keystore2_key security class." 2020-10-01 16:49:33 +00:00
Janis Danisevskis
3d72aad0bc Keystore 2.0: Remove list permission from keystore2_key security class.
The list permission is special keystore2 permission that allows
callers to list arbitrary namespaces. It is not a key or namespace
specific permission.

Ignore-AOSP-First: This needs to land in googleplex first to updated
                   prebuilt vendor images. Otherwise it breaks
		   aosp-with-phone builds.
Test: N/A
Change-Id: Ie0a29d8b08c53977ae2ed04d042868044d2c34c5
2020-10-01 05:33:29 +00:00
Janis Danisevskis
ee10b5fab0 Keystore 2.0: Remove list permission from keystore2_key security class.
The list permission is special keystore2 permission that allows
callers to list arbitrary namespaces. It is not a key or namespace
specific permission.

Test: N/A
Merged-In: Ie0a29d8b08c53977ae2ed04d042868044d2c34c5
Change-Id: Ie0a29d8b08c53977ae2ed04d042868044d2c34c5
2020-09-30 12:20:56 -07:00
Hasini Gunasinghe
e4a234c7c1 Merge "Convert KeyParameter to wire type." am: 29c9edd2d5 am: f6121aedfe am: db2e2f4532 am: b751ee5105
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1414588

Change-Id: If6f2a454e519b157245099751ec82d85b818f53a
2020-09-16 02:26:36 +00:00
Hasini Gunasinghe
b751ee5105 Merge "Convert KeyParameter to wire type." am: 29c9edd2d5 am: f6121aedfe am: db2e2f4532
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1414588

Change-Id: Id8d95b8449ba730b2c62c35298d3420182ad672f
2020-09-16 01:41:46 +00:00
Hasini Gunasinghe
db2e2f4532 Merge "Convert KeyParameter to wire type." am: 29c9edd2d5 am: f6121aedfe
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1414588

Change-Id: I5c4482d16c6080113f108e0bb99ec2076af4af8e
2020-09-16 01:05:36 +00:00
Hasini Gunasinghe
f6121aedfe Merge "Convert KeyParameter to wire type." am: 29c9edd2d5
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1414588

Change-Id: Ic80ba5f9d6a51c2c0af48dd6d8543f404d6ad767
2020-09-16 00:37:51 +00:00
Hasini Gunasinghe
29c9edd2d5 Merge "Convert KeyParameter to wire type." 2020-09-16 00:00:15 +00:00
Hasini Gunasinghe
3eb77c275c Convert KeyParameter to wire type.
For communicating with keymint and SPI.
This CL also moves all test modules to the bottom of the file.

Bug: 167744352
Test: Unit tests
Change-Id: I085dbe68076ba361c4d89f63de87c3b2f05627bc
2020-09-15 14:47:56 +00:00
Treehugger Robot
f28334dd41 Merge "Add helper function to insert with retry." am: b6375273ac am: 5b71c59b69 am: 49f75d6225 am: 779ea90f12
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1423614

Change-Id: Ie29a99f339fbebb94b63e4fe5eb8283f001c9978
2020-09-14 21:26:52 +00:00
Treehugger Robot
779ea90f12 Merge "Add helper function to insert with retry." am: b6375273ac am: 5b71c59b69 am: 49f75d6225
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1423614

Change-Id: Id8ab576bb408f8a438b9a0ebc8a0b610d2377b47
2020-09-14 21:01:37 +00:00
Treehugger Robot
49f75d6225 Merge "Add helper function to insert with retry." am: b6375273ac am: 5b71c59b69
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1423614

Change-Id: Id6e0d4f50ac0a544cdc9ea5ef92634ed4a9f1ddd
2020-09-14 20:39:21 +00:00
Treehugger Robot
5b71c59b69 Merge "Add helper function to insert with retry." am: b6375273ac
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1423614

Change-Id: I000c46d140e9c74b9481bc9afb4f3a76ce2a8112
2020-09-14 17:18:28 +00:00
Treehugger Robot
b6375273ac Merge "Add helper function to insert with retry." 2020-09-14 16:46:05 +00:00
Joel Galenson
845f74bebe Add helper function to insert with retry.
This breaks the code that tries to insert into a database with a
random id into a helper function, since it's now shared between two
functions.

Test: keystore2_test
Change-Id: Ib03b6082246120e6b3ff2a45b5bf8d324c40f7a7
2020-09-14 08:25:07 -07:00
Treehugger Robot
2118fcd078 Merge "Keystore 2.0: Minor update to pregenerated keymint rust bindings." am: ff275a3f59 am: e7cc9f51bc am: 2b397fdc2b am: ef88a5a232
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424935

Change-Id: I4e09a73961834940d9e5efe0dca968fe43507118
2020-09-11 18:57:46 +00:00
Treehugger Robot
2b10acc604 Merge "Keystore2.0 database.rs: Add storing and loading key parameters." am: 73c3d220a4 am: e702b79235 am: fc9415591a am: 37793c0985
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424928

Change-Id: Ie03c12c963b24fc008604d907cea665cc29180fc
2020-09-11 18:56:54 +00:00
Treehugger Robot
ef88a5a232 Merge "Keystore 2.0: Minor update to pregenerated keymint rust bindings." am: ff275a3f59 am: e7cc9f51bc am: 2b397fdc2b
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424935

Change-Id: I39cc0a38c2b784a3b98bcef75d9c6bad6517bb9b
2020-09-11 18:21:04 +00:00
Treehugger Robot
37793c0985 Merge "Keystore2.0 database.rs: Add storing and loading key parameters." am: 73c3d220a4 am: e702b79235 am: fc9415591a
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424928

Change-Id: Ia9931e29f4e0cfdd58b70119acc7f652a8c3bb16
2020-09-11 18:18:58 +00:00
Treehugger Robot
2b397fdc2b Merge "Keystore 2.0: Minor update to pregenerated keymint rust bindings." am: ff275a3f59 am: e7cc9f51bc
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424935

Change-Id: I32212bdae7e9630fa9ea021c778af04776a3de55
2020-09-11 17:26:47 +00:00
Treehugger Robot
fc9415591a Merge "Keystore2.0 database.rs: Add storing and loading key parameters." am: 73c3d220a4 am: e702b79235
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424928

Change-Id: Ie1da55d2874fd2c2d127d0d98c8fd3af04612615
2020-09-11 17:26:16 +00:00
Treehugger Robot
e7cc9f51bc Merge "Keystore 2.0: Minor update to pregenerated keymint rust bindings." am: ff275a3f59
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424935

Change-Id: Ifd115571f0dd75399f145d6ab5c877b1fdbd3247
2020-09-11 16:50:08 +00:00
Treehugger Robot
e702b79235 Merge "Keystore2.0 database.rs: Add storing and loading key parameters." am: 73c3d220a4
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1424928

Change-Id: I1eedfda3fc53e715ce6f11fa3df4308cb89516b0
2020-09-11 16:49:12 +00:00
Treehugger Robot
ff275a3f59 Merge "Keystore 2.0: Minor update to pregenerated keymint rust bindings." 2020-09-11 16:36:09 +00:00
Treehugger Robot
73c3d220a4 Merge "Keystore2.0 database.rs: Add storing and loading key parameters." 2020-09-11 16:25:00 +00:00