File: password_sharing_invitation_specifics.proto

package info (click to toggle)
chromium 139.0.7258.138-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,120,676 kB
  • sloc: cpp: 35,100,869; 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 (134 lines) | stat: -rw-r--r-- 4,621 bytes parent folder | download | duplicates (6)
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
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.sync.protocol";

option optimize_for = LITE_RUNTIME;

package sync_pb;

import "components/sync/protocol/nigori_specifics.proto";

message PasswordSharingInvitationData {
  // Contains password fields required for sending. See PasswordSpecificsData
  // for field descriptions.
  message PasswordGroupElementData {
    // See PasswordSpecificsData::Scheme for values.
    optional int32 scheme = 2;
    optional string signon_realm = 3;
    optional string origin = 4;
    optional string username_element = 5;
    optional string password_element = 7;
    optional string display_name = 8;
    optional string avatar_url = 9;
  }

  message PasswordGroupData {
    optional string username_value = 1;
    optional string password_value = 2;
    repeated PasswordGroupElementData element_data = 3;
  }

  reserved 1;

  optional PasswordGroupData password_group_data = 2;
}

// Contains user profile information.
message UserDisplayInfo {
  // Primary email address of the user.
  optional string email = 1;

  // The user's full name.
  optional string display_name = 2;

  // Portrait photo of the user.
  optional string profile_image_url = 3;
}

message UserInfo {
  // Obfuscated Gaia ID.
  optional string user_id = 1;

  optional UserDisplayInfo user_display_info = 2;

  // Latest user's public key registered on the server.
  optional CrossUserSharingPublicKey cross_user_sharing_public_key = 3;
}

// Incoming invitations for password sending.
message IncomingPasswordSharingInvitationSpecifics {
  // Unique client tag for the invitation. This does *not* have to be the same
  // GUID as for the outgoing invitation.
  optional string guid = 1;

  // Profile information about the sender of the password. Sender's public key
  // is used to authenticate the sender for `encrypted_key_for_recipient`.
  optional UserInfo sender_info = 2;

  // Encrypted PasswordSharingInvitationData using recipient's public key
  // corresponding to `recipient_key_version` and sender's private key to
  // authenticate the sender, see https://www.rfc-editor.org/rfc/rfc9180.html.
  optional bytes encrypted_password_sharing_invitation_data = 3;

  // An unsynced field for use internally on the client. This field should
  // never be set in any network-based communications because it contains
  // unencrypted material.
  optional PasswordSharingInvitationData client_only_unencrypted_data = 4;

  optional uint32 recipient_key_version = 6;

  reserved 5;
}

// Outgoing invitations for password sending.
message OutgoingPasswordSharingInvitationSpecifics {
  // Unique client tag for the invitation, generated by the client.
  optional string guid = 1;

  // Recipient's user identifier (obfuscated Gaia ID).
  optional string recipient_user_id = 2;

  // Encrypted PasswordSharingInvitationData using recipient's public key
  // corresponding to `recipient_key_version` and sender's private key to
  // authenticate the sender, see https://www.rfc-editor.org/rfc/rfc9180.html.
  optional bytes encrypted_password_sharing_invitation_data = 3;

  // An unsynced field for use internally on the client. This field should
  // never be set in any network-based communications because it contains
  // unencrypted material.
  optional PasswordSharingInvitationData client_only_unencrypted_data = 4;

  optional uint32 recipient_key_version = 6;

  // Version of Public key of the sender which is used to authenticate the
  // sender of the password. Must be equal to the latest committed version.
  optional uint32 sender_key_version = 7;

  reserved 5;
}

// Used for the server to return fine-grained commit errors back to the client.
message OutgoingPasswordSharingInvitationCommitError {
  // This enum is used in histograms. Entries should not be renumbered and
  // numeric values should never be reused. Also remember to update in
  // tools/metrics/histograms/enums.xml.
  // LINT.IfChange(OutgoingPasswordSharingInvitationCommitError)
  enum ErrorCode {
    UNKNOWN = 0;

    // Sender's public key version is different on the server.
    PUBLIC_KEY_VERSION_MISMATCH = 1;

    // The sender and the recipient are not in the same family according to the
    // Google family service.
    NOT_FAMILY_MEMBER = 2;
  }
  // LINT.ThenChange(/tools/metrics/histograms/metadata/sync/enums.xml:OutgoingPasswordSharingInvitationCommitError)

  optional ErrorCode error_code = 1;
}