Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: tools/traffic_annotation/traffic_annotation.proto

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)
Patch Set: Traffic annotation sourceset added to net/BUILD.gn Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 syntax = "proto3";
2 package traffic_annotation;
3
4 // TODO: include policies
5
6 // Describes a specific kind of network traffic based on a fine-grained
7 // semantic classification of all network traffic generated by Chrome.
8 // Used for auditing purposes.
9 message NetworkTrafficAnnotation {
10 // This is a globally unique identifier that must stay unchanged while the
11 // network request carries the same semantic meaning. If the network request
12 // gets a new meaning, this ID needs to be changed.
13 // The purpose of this ID is to give humans a chance to reference
14 // NetworkTrafficAnnotations externally even when those change a little bit
15 // (e.g. adding a new piece of data that is sent along with a network
16 // request).
17 // IDs of one component should have a shared prefix so that sorting all
18 // NetworkTrafficAnnotations by unique_id groups those that belong to the same
19 // component together.
20 // For example:
21 // "spellchecker_lookup"
22 string unique_id = 1;
23
24 // Encapsulates information about the code location that generates this kind
25 // of network traffic.
26 message TrafficSource {
27 // File name where the network request is triggered.
28 // This is typically filled by the extractor and does not need to be
29 // specified in the source code. For manual whitelisting this needs to be
30 // specified.
31 string file = 1;
32
33 // Function name where the network request is instantiated.
34 // This is typically filled by the extractor and does not need to be
35 // specified in the source code. For manual whitelisting this needs to be
36 // specified.
37 string function = 2;
38
39 // __LINE__ in file, where the AuditPolicy object is instantiated.
40 // This is typically filled by the extractor and does not need to be
41 // specified in the source code.
42 // For whitelisted network requests in third_party/ that cannot be properly
43 // annotated in the source code, this attribute is empty.
44 int32 line = 3;
45
46 // For whitelisted network requests in third_party/ that cannot be properly
47 // annotated in the source code, this distinguishes between the first,
48 // second, ... annotated call.
49 // For annotations in the source code, this is not used because the line
50 // attribute uniquely identifies the network request.
51 int32 call_number = 4;
52 }
53
54 TrafficSource source = 2;
55
56 // Meta information about the network request.
57 message TrafficSemantics {
58 // Justification for an empty AuditPolicy policy.
59 // Typically this can be either a TODO or a hint that the annotation is
60 // made upstream in the code. For example, if net::URLFetcher::Create() has
61 // has annotation, the net::TCPClientSocket() that is used by the
battre 2017/01/19 08:10:15 nit: has an annotation
Ramin Halavati 2017/01/24 08:49:38 Done.
62 // URLFetcher does not need to be annotated as well.
63 string empty_policy_justification = 1;
64
65 // What component triggers the request. The components should be human
66 // readable and don’t need to reflect the components/ directory. Avoid
67 // abbreviations.
68 // Examples: spellchecker, component updater, website
69 string sender = 2;
70
71 // Plaintext description of the network request in language that is
72 // understandable by admins (ideally also users). Please avoid acronyms.
73 // Please describe the feature and the feature's value proposition as well.
74 // Examples:
75 // - Google Chrome can provide smarter spell-checking by sending text you
76 // type into the browser to Google's servers, allowing you to use the same
77 // spell-checking technology used by Google products, such as Docs.
78 // If the feature is enabled, Chrome will send the entire contents of text
79 // fields as you type in them to Google along with the browser’s default
80 // language. Google returns a list of suggested spellings, which will be
81 // displayed in the context menu.
82 // - A network request that comes from web content (a page the user visits)
83 string description = 3;
84
85 // What triggered the network request. Use a textual description. This
86 // should be a human readable string.
87 // For things that are clearly part of the website (resource load, form
88 // submission, fetch by a service worker,...), you *may* just put “website”
89 // here.
90 string trigger = 4;
91
92 // What nature of data is being sent. This should be a human readable
93 // string. Any user data and/or PII should be pointed out.
94 // Examples: “log files from /var/...”, “statistics about foobar”, “the
95 // signature of a form of a website”, “installed extensions and their
96 // version”, “a word on a website the user tapped on”
97 string data = 5;
98
99 enum Destination {
100 // A website the user visits (this may be google.com) or interacts with.
101 // For example search engines of the omnibar (also the default search
102 // engine) would be considered websites.
battre 2017/01/19 08:10:15 I would change this: A website the user visit or
Ramin Halavati 2017/01/24 08:49:38 Done.
103 WEBSITE = 0;
104 // A Google owned service, like SafeBrowsing, spellchecking, ...
105 GOOGLE_OWNED_SERVICE = 1;
106 // Other endpoints, e.g. a service hosting a PAC script
battre 2017/01/19 08:10:15 Other endpoints, e.g. a service hosting a PAC scri
Ramin Halavati 2017/01/24 08:49:38 Done.
107 OTHER = 2;
108 }
109 Destination destination = 6;
110
111 // Human readable description in case the destination points to OTHER.
112 string destination_other = 7;
113 }
114
115 TrafficSemantics semantics = 3;
116
117 message TrafficPolicy {
118 // Whether cookies/channel IDs/... can be sent or saved (use true if at
119 // least one is correct).
120 bool cookies_allowed = 1;
121
122 // If cookies_allowed is true and the request uses not the profile cookie
123 // store, please specify this here. You may use “system” to indicate that
124 // the System RequestContext and its cookie store are used or specify other
125 // exceptions (e.g. SafeBrowsing uses a separate cookie store).
126 string cookies_store_exceptions = 2;
127
128 // Human readable description of how to enable/disable a feature that
129 // triggers this network request by a user. Use “NA”, if no such setting
130 // exists (e.g. “Disable ‘Use a web service to help resolve spelling
131 // errors.’ in Chrome’s settings under Advanced”).
132 string setting = 3;
133
134 // Example policy configuration that disables this network request.
135 // This would be a text serialized protobuf of any enterprise policy.
136 // see out/Debug/gen/components/policy/cloud_policy.proto
137 repeated string policy = 4;
138 // TODO: repeated enterprise_management.CloudPolicySettings policy = 4;
battre 2017/01/19 08:10:15 Please try to fix this.
Ramin Halavati 2017/01/24 08:49:38 Done.
139
140 // Justification for not having a policy that disables this feature.
141 string policy_exception_justification = 5;
142 }
143
144 TrafficPolicy policy = 4;
145 };
146
147 // NetworkTrafficAnnotations that were extracted from the source code.
148 message ExtractedNetworkTrafficAnnotation {
149 repeated NetworkTrafficAnnotation network_traffic_annotation = 1;
150 };
151
152 // NetworkTrafficAnnotations that had to go into a whitelist file because the
153 // source code could not be annotated (e.g. because it is in a third-party
154 // library).
155 message WhitelistedNetworkTrafficAnnotations {
156 repeated NetworkTrafficAnnotation network_traffic_annotation = 1;
157 };
158
159 // All NetworkTrafficAnnotations from a Chromium configuration.
160 message NetworkTrafficAnnotations {
161 ExtractedNetworkTrafficAnnotation extracted_network_traffic_annotations = 1;
162 WhitelistedNetworkTrafficAnnotations whitelisted_network_traffic_annotations =
163 2;
164 };
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698