[Presence] Deprecate version bytes field of shared credential protos and add credential_version to be used as an integer generic credential version field

PiperOrigin-RevId: 665517202
This commit is contained in:
Anthony Rueda
2024-08-20 14:04:49 -07:00
committed by Copybara-Service
parent 050e009bc3
commit 1c41d0c77c
2 changed files with 9 additions and 3 deletions
+5 -2
View File
@@ -42,7 +42,7 @@ enum CredentialType {
// 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=19
// NEXT_ID=20
// LINT.IfChange(SharedCredential)
message SharedCredential {
// The randomly generated unique id of the public credential.
@@ -80,7 +80,7 @@ message SharedCredential {
// The version number of this SharedCredential, matches the corresponding
// protocol version.
bytes version = 10;
bytes version = 10 [deprecated = true];
// The type assigned to the credential. The CredentialType is used to
// determine whether a device identity credential or account based identity
@@ -113,5 +113,8 @@ message SharedCredential {
// The HMAC of the plaintext identity token included (in encrypted form) in a
// signed V1 advertisement.
bytes identity_token_signed_adv_hmac_key_v1 = 18;
// Credential version used to infer the expected credential material.
uint64 credential_version = 19;
}
// LINT.ThenChange(//depot/google3/google/internal/location/nearby/presence/v1/nearby_resources.proto:SharedCredential)
+4 -1
View File
@@ -28,7 +28,7 @@ option optimize_for = LITE_RUNTIME;
// The local credential contains information of a local device for
// identity encryption and authentication. It should never leave the generating
// device.
// NEXT_ID=13
// NEXT_ID=14
message LocalCredential {
// Private signing key descriptor.
// For Ed25519PrivateKey, both `certificate_alias` and `encrypted_key` is set.
@@ -84,4 +84,7 @@ message LocalCredential {
// Signature algorithm version. Used to determine which algorithm to use to
// sign data.
string signature_version = 12;
// Credential version used to infer the expected credential material.
uint64 credential_version = 13;
}