File: vault.proto

package info (click to toggle)
chromium 139.0.7258.127-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,122,156 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (141 lines) | stat: -rw-r--r-- 3,565 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Trusted vault protos to communicate with backend written in proto3 to avoid
// subtle differences between enum fields.
syntax = "proto3";

option java_multiple_files = true;
option java_package = "org.chromium.components.trusted_vault.proto";

option optimize_for = LITE_RUNTIME;

package trusted_vault_pb;

message SharedMemberKey {
  int32 epoch = 1;
  bytes wrapped_key = 2;
  bytes member_proof = 3;
}

message RotationProof {
  int32 new_epoch = 1;
  bytes rotation_proof = 2;
}

message SecurityDomainDetails {
  message SyncDetails {
    bool degraded_recoverability = 1;
  }

  SyncDetails sync_details = 1;
}

message SecurityDomain {
  string name = 1;
  int32 current_epoch = 2;
  SecurityDomainDetails security_domain_details = 3;
}

message Timestamp {
  // Represents seconds of UTC time since Unix epoch
  // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
  // 9999-12-31T23:59:59Z inclusive.
  int64 seconds = 1;
  // Non-negative fractions of a second at nanosecond resolution. Negative
  // second values with fractions must still have non-negative nanos values
  // that count forward in time. Must be from 0 to 999,999,999
  // inclusive.
  int32 nanos = 2;
}

message PhysicalDeviceMetadata {
  enum DeviceType {
    DEVICE_TYPE_UNKNOWN = 0;
    DEVICE_TYPE_ANDROID = 1;
    DEVICE_TYPE_IOS = 2;
    DEVICE_TYPE_CHROMEOS = 3;
    DEVICE_TYPE_WINDOWS = 4;
    DEVICE_TYPE_MAC_OS = 5;
    DEVICE_TYPE_LINUX = 6;
  }

  // The device type for physical device members.
  DeviceType device_type = 1;
}

message LskfMetadata {
  Timestamp expiration_time = 1;
}

message GooglePasswordManagerPinMetadata {
  Timestamp expiration_time = 1;
  bytes encrypted_pin_hash = 2;
}

message SecurityDomainMember {
  string name = 1;
  bytes public_key = 2;

  message SecurityDomainMembership {
    string security_domain = 1;
    repeated SharedMemberKey keys = 3;
    repeated RotationProof rotation_proofs = 4;
  }

  repeated SecurityDomainMembership memberships = 3;

  enum MemberType {
    MEMBER_TYPE_UNSPECIFIED = 0;
    MEMBER_TYPE_PHYSICAL_DEVICE = 1;
    MEMBER_TYPE_LOCKSCREEN_KNOWLEDGE_FACTOR = 2;
    MEMBER_TYPE_ICLOUD_KEYCHAIN = 4;
    MEMBER_TYPE_GOOGLE_PASSWORD_MANAGER_PIN = 5;
  }

  MemberType member_type = 4;

  message MemberMetadata {
    bool usable_for_retrieval = 1;
    oneof member_metadata_variant {
      PhysicalDeviceMetadata physical_device_metadata = 3;
      LskfMetadata lskf_metadata = 4;
      GooglePasswordManagerPinMetadata google_password_manager_pin_metadata = 5;
    }
  }
  MemberMetadata member_metadata = 6;
}

message JoinSecurityDomainsRequest {
  SecurityDomain security_domain = 1;
  SecurityDomainMember security_domain_member = 2;
  repeated SharedMemberKey shared_member_key = 3;
  int32 member_type_hint = 4;
  bytes current_public_key_to_replace = 5;
}

message JoinSecurityDomainsResponse {
  SecurityDomain security_domain = 1;
}

message JoinSecurityDomainsErrorDetail {
  JoinSecurityDomainsResponse already_exists_response = 1;
}

message ListSecurityDomainMembersResponse {
  repeated SecurityDomainMember security_domain_members = 1;
  string next_page_token = 2;
}

// There is no way to google.protobuf.Any directly in this codebase, so this
// proto just replicates it.
message Proto3Any {
  string type_url = 1;
  bytes value = 2;
}

// Forked version of google.rpc.Status.
message RPCStatus {
  repeated Proto3Any details = 3;
}