Commit graph android_packages_modules_Co.../networksecurity
Message SHA1
Make newly created CT directories executable
Directories treat the executable bit differently than files, and need it
to be set in order for the files within said directories to be
accessible. Without making the CT directories executable, the log list
file is not accessible. See
https://www.redhat.com/en/blog/linux-file-permissions-explained for more
details.

Test: atest NetworkSecurityUnitTests (also manually)
Bug: 319829948
Change-Id: I03c172e93dc3ecb50f69297ea47b2fdeb860048b

Bessie Jiang   commited 2024-11-13 16:17:26 +00:00
dfed8dc100
Log CT log list download failures
This CL adds a DownloadStatus class inside the DownloadHelper. The class
acts as a thin wrapper around the status and reason Ids returned by the
DownloadManager, with some utility methods to help with the
interpretation of the download status.

Bug: 319829948
Test: atest NetworkSecurityUnitTests
Change-Id: I111388ee37c09e30c02bb9bc9b3d65273961b91d

Sandro Montanari   commited 2024-11-12 11:13:02 +00:00
478ba513aa
Revert "Change the visibility of Config to be public, so it can be accessed from"
This reverts commit a618596be5.

Reason for revert: After discussing with tweek@, he pointed out that this may result in a slippery slope where the code may be tested in CTS instead of the device (https://screenshot.googleplex.com/BJZVK4FfXkWB2Rw).

Change-Id: Ic020cb98049c861947ac431c4b3761084e66073e

Bessie Jiang   authored and   Gerrit Code Review   commited 2024-11-05 11:42:26 +00:00
a4983fd628
Change the visibility of Config to be public, so it can be accessed from
the manual tests in the cts/ directory.

Flag: visibility change only
Test: visibility change only
Bug: 319829948
Change-Id: Ice7563e6f8742724a539e57f644b138f85eed349

Bessie Jiang   commited 2024-11-04 18:07:10 +00:00
a618596be5
Add compatibility version to log lists installed by CT
Introduce a CompatibilityVersion class to group installing operations on
log list related to the same compatibility version (e.g, v3).

Add support for multiple compatibility versions to the
CertificateTransparencyInstaller, although at the moment of writing
there exists only one compatibility version.

Test: atest NetworkSecurityUnitTests
Bug: 319829948
Change-Id: I503dd30cea93d2b1ba57e5ac91b8427394c453f8

Sandro Montanari   commited 2024-10-22 12:34:57 +00:00
a9aafb7c8c
Move public key to a DeviceConfig flag
Instead of hard-coding the public key value in code.

Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 319829948
Test: atest NetworkSecurityUnitTests
Change-Id: Ided9a9402241d91cae3cee25f5511c3a881e087d

Sandro Montanari   commited 2024-10-10 12:46:44 +00:00
802c8f1a4d
Add Bessie to networksecurity OWNERS
Bug: n/a
Test: n/a
Flag: EXEMPT only changing OWNERS
Change-Id: Icc2639c7afadbbb6fa77c9354b20e974816ff5e7

Sandro Montanari   commited 2024-10-08 15:56:23 +00:00
6f73361204
Migrate CT namespace to "network_security"
Instead of the current "tehtering" namespace.

Also, flags pushed via DeviceConfig come with a
"CertificateTransparencyLogList" feature prefix.

Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 319829948
Test: atest NetworkSecurityUnitTests
Change-Id: I565f888409f21e78cc28684cbf7daaae44b95d57

Sandro Montanari   commited 2024-09-16 12:12:14 +00:00
5319f5c363
Merge "Make java_sdk_library dependencies explicit" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-09-10 19:12:45 +00:00
430a8ad33c
Make java_sdk_library dependencies explicit
modules should specify the submodule of java_sdk_library that the module
actually depends on

Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a

Jihoon Kang   commited 2024-09-10 00:01:31 +00:00
8401b6a9f0
Add CT log list data verification after download
The verification step assumes the metadata file, downloaded together with
the log list data, contains a signature generated using the public key
available at the certificate-transparency-community-site from Google
https://github.com/google/certificate-transparency-community-site/blob/master/docs/google/known-logs.md

Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 319829948
Test: atest NetworkSecurityUnitTests
Change-Id: If5fefb33b00c49a8f043d9b030f344f7917affbc

Sandro Montanari   commited 2024-09-04 15:51:02 +00:00
2025a54069
Install CT log list on successful download
Add the CertificateTransparencyInstaller, that is in charge of
atomically update the log list file that is read by SCT verification in
Conscrypt.

Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 319829948
Test: atest NetworkSecurityUnitTests
Change-Id: I7c82e36820256bc0df11e44fd973b25a64d69f54

Sandro Montanari   commited 2024-08-22 09:27:55 +00:00
32d814b205
Schedule log list download on flag update
Add the CertificateTransparencyDownloader to download the data and
metadata needed by Certificate Transparency.

The download is triggered when either the content URL, the metadata URL,
or the log list flags change.

The version numbers and URLs are stored in an on-disk DataStore to make
sure the same files are not downloaded on repeated flag updates.

Flag: com.android.ct.flags.certificate_transparency_service
Bug: 319829948
Test: atest NetworkSecurityUnitTests
Change-Id: Ic30e2973fdce99ea861d13f7777128161dd4003e

Sandro Montanari   commited 2024-08-21 10:18:00 +00:00
799860a21d
Add listeners for CertificateTranspaency DeviceConfig flags
Flag: com.android.ct.flags.certificate_transparency_service
Bug: 319829948
Test: adb shell device_config put certificate_transparency log_list_data_url <url>
Change-Id: Ief074fbef21ca18e6882852d53e90e7ddbbd78fa

Sandro Montanari   commited 2024-08-13 15:53:57 +00:00
1f4ddd0cf7
Add boilerplate code for CertificateTransparencyService
Flag: com.android.ct.flags.certificate_transparency_service
Bug: 319829948
Test: m
Change-Id: I69dd1b7346a013e9a990c9ae8cec1beb51be074d

Sandro Montanari   commited 2024-08-12 08:50:29 +00:00
9ffc0685d7