| // Copyright 2019 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto2"; |
| |
| option optimize_for = LITE_RUNTIME; |
| |
| option java_package = "sync_pb"; |
| package sync_pb; |
| |
| message LocalTrustedVaultKey { |
| // The actual key. |
| optional bytes key_material = 1; |
| } |
| |
| message LocalDeviceRegistrationInfo { |
| // Private SecureBox key. |
| optional bytes private_key_material = 1; |
| |
| // Indicates whether device is registered, i.e. whether its public key is |
| // successfully submitted to the server. |
| optional bool device_registered = 2; |
| } |
| |
| message LocalTrustedVaultPerUser { |
| // User identifier. |
| optional bytes gaia_id = 1; |
| |
| // All keys known for a user. |
| repeated LocalTrustedVaultKey vault_key = 2; |
| |
| // The version corresponding to the last element in |vault_key|. |
| optional int32 last_vault_key_version = 3; |
| |
| // Indicates whether |vault_key| is stale, i.e. that the latest locally |
| // available key isn't the latest key in the vault. New keys need to be |
| // fetched through key retrieval procedure or by following key rotation. |
| optional bool keys_are_stale = 4; |
| |
| // Device key and corresponding registration metadata. |
| optional LocalDeviceRegistrationInfo local_device_registration_info = 5; |
| |
| // The time (in milliseconds since UNIX epoch) at which last unsuccessful (due |
| // to transient errors) request was sent to the vault service. Used for |
| // throttling requests to the server. |
| optional int64 last_failed_request_millis_since_unix_epoch = 6; |
| } |
| |
| message LocalTrustedVault { |
| repeated LocalTrustedVaultPerUser user = 1; |
| } |