[Presence] Data Structure modification for NP Multiple Account Phase One Implementation: b/285573323

PiperOrigin-RevId: 538508248
This commit is contained in:
Anthony Rueda
2023-06-07 19:16:08 +00:00
committed by Suet-fei Li
parent 8fc16247d3
commit f1a22c4366
2 changed files with 27 additions and 0 deletions
+12
View File
@@ -31,9 +31,16 @@ enum IdentityType {
IDENTITY_TYPE_PROVISIONED = 4;
}
enum CredentialType {
CREDENTIAL_TYPE_UNKNOWN = 0;
CREDENTIAL_TYPE_DEVICE = 1;
CREDENTIAL_TYPE_GAIA = 2;
}
// The shared credential is derived from local credential, and distributed to
// remote devices based on the trust token for identity decryption and
// authentication.
// NEXT_ID=12
message SharedCredential {
// The randomly generated unique id of the public credential.
bytes secret_id = 1;
@@ -71,4 +78,9 @@ message SharedCredential {
// The version number of this SharedCredential, matches the corresponding
// protocol version.
bytes version = 10;
// The type assigned to the credential. The CredentialType is used to
// determine whether a device identity credential or account based identity
// credential is used for decryption.
CredentialType type = 11;
}
+15
View File
@@ -22,6 +22,21 @@ option java_package = "com.google.nearby.presence";
option java_outer_classname = "MetadataProto";
option optimize_for = LITE_RUNTIME;
// The metadata of a device. Contains confidential data not to be broadcasted
// directly in OTA.
// NEXT_ID=4
message DeviceIdentityMetaData {
// The type of the device.
DeviceType device_type = 1;
// The name of the local device to be returned through credentials.
string device_name = 2;
// The ChromeOS team requires the BT mac address for debugging purposes
// temporarily. This should be removed by the end of this year.
bytes bluetooth_mac_address = 3;
}
// The metadata of a device.
// Contains confidential data not to be broadcasted directly in OTA.
message Metadata {