Commit Graph
153 Commits
Author SHA1 Message Date
hai007 bba1ca540f Remove provisioned identity type from proto
PiperOrigin-RevId: 629178167
2024-04-29 13:59:55 -07:00
hai007 0b04994f71 Update identity type name
PiperOrigin-RevId: 629163344
2024-04-29 13:12:45 -07:00
hai007 a1b80ff649 Update identity type name
PiperOrigin-RevId: 628545355
2024-04-26 16:57:25 -07:00
hai007 54eff829b5 Update identity type name
PiperOrigin-RevId: 628513553
2024-04-26 14:40:17 -07:00
hai007 f4bad55cac Internal change
PiperOrigin-RevId: 628207314
2024-04-25 15:23:36 -07:00
hai007 e9b57452b1 Remove LDT build flag, build against rust ldt by default
PiperOrigin-RevId: 628196553
2024-04-25 14:47:07 -07:00
hai007 eba96c9673 Remove unused include to fix OSS build
PiperOrigin-RevId: 627473304
2024-04-23 12:42:17 -07:00
hai007 47caa7979a Fix copybara export of build rules for beto-core
PiperOrigin-RevId: 627464568
2024-04-23 12:09:50 -07:00
hai007 e9c39b46b3 Fix copybara export of beto-core headers
PiperOrigin-RevId: 627449838
2024-04-23 11:23:24 -07:00
hai007 1c4bd01fe6 Update presence build rules and copybara export to OSS
- updates the build to be compatible with ldt in the open source repo

PiperOrigin-RevId: 627415836
2024-04-23 09:40:55 -07:00
hai007 d1f3a91e24 Initial implementation of rust decoder
PiperOrigin-RevId: 624312324
2024-04-12 15:40:44 -07:00
Ryan Hansberry f788b89190 [NearbyPresence] Fix typo: remove extraneous semicolon.
PiperOrigin-RevId: 623198081
2024-04-09 09:54:23 -07:00
hai007 734014a841 Add build flag to switch between C++ and rust implemented parser
- Both implementations implement `AdvertisementDecoder` interface and provide the
   concrete implementation for AdvertisementDecoderImpl
 - cleanup missing includes as complained about by clang-tidy

PiperOrigin-RevId: 621187625
2024-04-02 08:43:31 -07:00
hai007 112da5e64a Refactor, remove scan_request dependency from AdvertisementDecoder
- Removes banned_data_types_, PUBLIC identity advertisements will never have
   any corresponding credentials anyways, so decryption will always be skipped
   and this is now guarenteed by asserts in UpdatePublicCredentials
 - Filtering adv based on identity is moved into advertisement Filter which
   already contains the requested identity info from scan_request
 - LegacyPresenceScanFilter is no longer used by AdvertisementDecoder since
   this is not being used anywhere at the moment
 - Cleanup miscellaneous clang-tidy lints about missing or unused includes

PiperOrigin-RevId: 620086399
2024-03-28 16:15:37 -07:00
hai007 b224eb7bf8 Internal change
PiperOrigin-RevId: 619658526
2024-03-27 17:31:38 -07:00
hai007 5bc1c83472 Pure Refactor: move filtering logic into AdvertisementFilter class
- this decouples filtering logic from advertisement decoding logic
   in preparation for introducing a Rust backed impl of
   AdvertisementDecoder
 - this change is only a refactor and does not change functionality
   in any way

PiperOrigin-RevId: 618978564
2024-03-25 15:33:20 -07:00
Suet-Fei Li 989efcf2c5 Metadata to DeviceIdentityMetaData Migration
PiperOrigin-RevId: 616182462
2024-03-15 10:57:58 -07:00
Ryan Hansberry 8561d03a21 [Nearby] CredentialManager: Do not block on main thread.
PiperOrigin-RevId: 608743138
2024-02-20 14:37:12 -08:00
Juliet Levesque caf34a717f [Nearby Presence] Read response data from remote device
see go/cros-nearby-presence-np-nc-authentication for details.

PiperOrigin-RevId: 606772097
2024-02-13 15:50:07 -08:00
Juliet Levesque 6b2f7fa94e [Nearby Presence] Fetch and select correct local credentials
Fetch the local credentials and select the correct local credential by verifying the validity of the time. This CL will be followed by
using the selected local credential for authentication. See go/cros-nearby-presence-np-nc-authentication  for details.

PiperOrigin-RevId: 603772266
2024-02-02 17:23:41 -08:00
hai007 e1dd4fd535 Import of rpc://team/beto-rust-devs/beto-rust
PiperOrigin-RevId: 603429939
2024-02-03 01:13:27 +00:00
Juliet Levesque aaa1bea130 [Nearby Presence] Expose API's to fetch local credentials
Expose APIs to fetch local credentials from the CredentialManager, which will be used to fetch a local credential to be used for authentication in follow up CL's. See go/cros-nearby-presence-np-nc-authentication  for details.

PiperOrigin-RevId: 601781066
2024-01-26 09:04:16 -08:00
Anthony Rueda 96750db706 [Presence] Renamemetadata_encryption_key_tag fields in shared credential proto to differentiate between V0/V1 unsigned adv key tags
PiperOrigin-RevId: 558919544
2023-08-21 15:39:35 -07:00
Joy Babafemi 85bf78ef70 Add sensor fusion implementation to presence C++
PiperOrigin-RevId: 555676715
2023-08-10 15:24:29 -07:00
Janusz Sobczak 5393daf9f1 Merge logging and types build targets
Both "types" and "logging" build targets included "logging.h"
Merging them together avoids circular dependencies.

PiperOrigin-RevId: 555262816
2023-08-09 19:13:12 -07:00
Hai Shang 0e7a8181b0 internal clean up
PiperOrigin-RevId: 551292810
2023-07-26 13:06:09 -07:00
Hai Shang 562483cb44 update sensor fusion api to favor std::optional over absl::optional
PiperOrigin-RevId: 551257674
2023-07-26 11:02:06 -07:00
Joy Babafemi 5b605b2426 Refactor std::function usage to absl::AnyInvocable for ZoneTransitionCallback
PiperOrigin-RevId: 550959839
2023-07-25 12:16:20 -07:00
Anay Wadhera 33faa84aca add shared credential to PresenceDevice.
This field stores the shared credential that this PresenceDevice was decrypted with (if applicable).

PiperOrigin-RevId: 549720833
2023-07-20 13:20:21 -07:00
Crisrael Lucero 0e44ed626d Refactor crypto/ directory into crypto_cros/ and crypto/
PiperOrigin-RevId: 549467911
2023-07-19 17:12:52 -07:00
Crisrael Lucero 8007e15d86 Use absl::variant in ConnectionAuthenticator
PiperOrigin-RevId: 548173211
2023-07-14 11:13:56 -07:00
Anay Wadhera 770f59b748 Update connection authenticator to account for multi-identity support.
PiperOrigin-RevId: 547880233
2023-07-13 12:18:05 -07:00
Hai Shang 2420c083b8 Add more test coverage for credential manager
PiperOrigin-RevId: 547245712
2023-07-11 11:22:29 -07:00
Anay Wadhera f830eaddf0 disable rust ldt by default
PiperOrigin-RevId: 546127141
2023-07-06 16:52:17 -07:00
Hai Shang e949d922de Refill creds if needed in getting shared & local creds.
PiperOrigin-RevId: 546093134
2023-07-06 14:28:58 -07:00
Anay Wadhera 0bf74cb376 fix asan error in connection authenticator
PiperOrigin-RevId: 545783166
2023-07-05 14:15:37 -07:00
Joy Babafemi f0f0643754 FPPRust - Implement FPP Manager class in C++
PiperOrigin-RevId: 544182126
2023-06-28 15:48:35 -07:00
Anay Wadhera 95f070796f Add identity type field to PresenceDevice
PiperOrigin-RevId: 543824854
2023-06-27 12:49:28 -07:00
Anay Wadhera e0674d435e Implement signing/verification of PresenceAuthenticationFrames
PiperOrigin-RevId: 540029386
2023-06-13 11:53:15 -07:00
hai007 5aeceb2034 Update path to LDT dependency
PiperOrigin-RevId: 539811031
2023-06-12 17:58:12 -07:00
Anthony Rueda 72b249474d Extend local and shared credential protos to included duplicated metadata_encryption_key and metadata_encryption_key_tag for all protocol version
PiperOrigin-RevId: 538612138
2023-06-07 15:43:30 -07:00
Hai Shang fe1e14a02e internal clean up.
PiperOrigin-RevId: 538009138
2023-06-05 16:17:36 -07:00
Anay Wadhera 1b7142da77 Plumb CredentialManager::UpdateRemotePublicCredentials and CredentialManager::GetPublicCredentials through to PresenceService
PiperOrigin-RevId: 534136547
2023-05-22 11:52:06 -07:00
Anay Wadhera 0e1170c52e remove obsolete todo
PiperOrigin-RevId: 532176213
2023-05-15 11:39:30 -07:00
Anay Wadhera 9dff873424 Convert LDT Rust to a normal define
PiperOrigin-RevId: 531318262
2023-05-11 15:09:04 -07:00
Anay Wadhera 813a07116e Update action bits to match spec
PiperOrigin-RevId: 531266917
2023-05-11 11:56:26 -07:00
Anay Wadhera 7825f2c67a update LDT rust header include path
PiperOrigin-RevId: 531261461
2023-05-11 11:36:34 -07:00
Janusz Sobczak 0200a92978 Separate TX and Action fields.
PiperOrigin-RevId: 529767591
2023-05-05 11:21:59 -07:00
Anay Wadhera f21b1e7089 internal change
PiperOrigin-RevId: 529179617
2023-05-03 13:32:34 -07:00
Anay Wadhera 21d2efbccd Create PresenceDeviceProvider
PiperOrigin-RevId: 528913199
2023-05-02 16:02:36 -07:00