blob: 14de5ac6a5dcc150220017024cfa290cf08ab4e9 [file] [log] [blame]
Shivani Sharmad81bdd42019-05-23 17:19:561// Copyright 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/base/network_isolation_key.h"
6
Matt Menke166443c2019-05-24 18:45:597#include "base/stl_util.h"
Eric Robinsonfc7de102019-06-21 15:27:108#include "base/test/scoped_feature_list.h"
Matt Menke2fa45992019-08-06 23:07:359#include "base/values.h"
Eric Robinsonfc7de102019-06-21 15:27:1010#include "net/base/features.h"
Shivani Sharmad81bdd42019-05-23 17:19:5611#include "testing/gtest/include/gtest/gtest.h"
12#include "url/gurl.h"
13#include "url/origin.h"
14
15namespace net {
16
17TEST(NetworkIsolationKeyTest, EmptyKey) {
18 NetworkIsolationKey key;
19 EXPECT_FALSE(key.IsFullyPopulated());
20 EXPECT_EQ(std::string(), key.ToString());
21 EXPECT_TRUE(key.IsTransient());
Matt Menke166443c2019-05-24 18:45:5922 EXPECT_EQ("null", key.ToDebugString());
Shivani Sharmad81bdd42019-05-23 17:19:5623}
24
25TEST(NetworkIsolationKeyTest, NonEmptyKey) {
26 url::Origin origin = url::Origin::Create(GURL("http://a.test/"));
Shivani Sharma8ae506c2019-07-21 21:08:2727 NetworkIsolationKey key(origin, origin);
Shivani Sharmad81bdd42019-05-23 17:19:5628 EXPECT_TRUE(key.IsFullyPopulated());
29 EXPECT_EQ(origin.Serialize(), key.ToString());
30 EXPECT_FALSE(key.IsTransient());
Matt Menke166443c2019-05-24 18:45:5931 EXPECT_EQ("http://a.test", key.ToDebugString());
Shivani Sharmad81bdd42019-05-23 17:19:5632}
33
34TEST(NetworkIsolationKeyTest, OpaqueOriginKey) {
35 url::Origin origin_data =
36 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"));
Shivani Sharma8ae506c2019-07-21 21:08:2737 NetworkIsolationKey key(origin_data, origin_data);
Shivani Sharmad81bdd42019-05-23 17:19:5638 EXPECT_TRUE(key.IsFullyPopulated());
39 EXPECT_EQ(std::string(), key.ToString());
40 EXPECT_TRUE(key.IsTransient());
Matt Menke166443c2019-05-24 18:45:5941
42 // Create another opaque origin, and make sure it has a different debug
43 // string.
Shivani Sharma8ae506c2019-07-21 21:08:2744 const auto kOriginNew = origin_data.DeriveNewOpaqueOrigin();
45 EXPECT_NE(key.ToDebugString(),
46 NetworkIsolationKey(kOriginNew, kOriginNew).ToDebugString());
Matt Menke166443c2019-05-24 18:45:5947}
48
49TEST(NetworkIsolationKeyTest, Operators) {
50 // These are in ascending order.
51 const NetworkIsolationKey kKeys[] = {
52 NetworkIsolationKey(),
53 // Unique origins are still sorted by scheme, so data is before file, and
54 // file before http.
55 NetworkIsolationKey(
Shivani Sharma8ae506c2019-07-21 21:08:2756 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>")),
Matt Menke166443c2019-05-24 18:45:5957 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"))),
Shivani Sharma8ae506c2019-07-21 21:08:2758 NetworkIsolationKey(url::Origin::Create(GURL("file:///foo")),
59 url::Origin::Create(GURL("file:///foo"))),
60 NetworkIsolationKey(url::Origin::Create(GURL("http://a.test/")),
61 url::Origin::Create(GURL("http://a.test/"))),
62 NetworkIsolationKey(url::Origin::Create(GURL("http://b.test/")),
63 url::Origin::Create(GURL("http://b.test/"))),
64 NetworkIsolationKey(url::Origin::Create(GURL("https://a.test/")),
65 url::Origin::Create(GURL("https://a.test/"))),
Matt Menke166443c2019-05-24 18:45:5966 };
67
68 for (size_t first = 0; first < base::size(kKeys); ++first) {
69 NetworkIsolationKey key1 = kKeys[first];
70 SCOPED_TRACE(key1.ToDebugString());
71
72 EXPECT_TRUE(key1 == key1);
73 EXPECT_FALSE(key1 < key1);
74
75 // Make sure that copying a key doesn't change the results of any operation.
76 // This check is a bit more interesting with unique origins.
77 NetworkIsolationKey key1_copy = key1;
78 EXPECT_TRUE(key1 == key1_copy);
79 EXPECT_FALSE(key1 < key1_copy);
80 EXPECT_FALSE(key1_copy < key1);
81
82 for (size_t second = first + 1; second < base::size(kKeys); ++second) {
83 NetworkIsolationKey key2 = kKeys[second];
84 SCOPED_TRACE(key2.ToDebugString());
85
86 EXPECT_TRUE(key1 < key2);
87 EXPECT_FALSE(key2 < key1);
88 EXPECT_FALSE(key1 == key2);
89 EXPECT_FALSE(key2 == key1);
90 }
91 }
92}
93
94TEST(NetworkIsolationKeyTest, UniqueOriginOperators) {
Shivani Sharma8ae506c2019-07-21 21:08:2795 const auto kOrigin1 =
96 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"));
97 const auto kOrigin2 =
98 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"));
99 NetworkIsolationKey key1(kOrigin1, kOrigin1);
100 NetworkIsolationKey key2(kOrigin2, kOrigin2);
Matt Menke166443c2019-05-24 18:45:59101
102 EXPECT_TRUE(key1 == key1);
103 EXPECT_TRUE(key2 == key2);
104
105 // Creating copies shouldn't affect comparison result.
106 EXPECT_TRUE(NetworkIsolationKey(key1) == NetworkIsolationKey(key1));
107 EXPECT_TRUE(NetworkIsolationKey(key2) == NetworkIsolationKey(key2));
108
109 EXPECT_FALSE(key1 == key2);
110 EXPECT_FALSE(key2 == key1);
111
112 // Order of Nonces isn't predictable, but they should have an ordering.
113 EXPECT_TRUE(key1 < key2 || key2 < key1);
114 EXPECT_TRUE(!(key1 < key2) || !(key2 < key1));
Shivani Sharmad81bdd42019-05-23 17:19:56115}
116
Yao Xiao6924a36a2019-07-12 16:55:19117TEST(NetworkIsolationKeyTest, WithFrameOrigin) {
Shivani Sharma8ae506c2019-07-21 21:08:27118 const auto kOriginA = url::Origin::Create(GURL("http://a.test"));
119 const auto kOriginB = url::Origin::Create(GURL("http://b.test"));
120 NetworkIsolationKey key1(kOriginB, kOriginB);
121 NetworkIsolationKey key2(kOriginB, kOriginA);
Eric Robinsonfc7de102019-06-21 15:27:10122 EXPECT_TRUE(key2.IsFullyPopulated());
123 EXPECT_FALSE(key2.IsTransient());
124 EXPECT_EQ("http://b.test", key2.ToString());
125 EXPECT_EQ("http://b.test", key2.ToDebugString());
126
127 EXPECT_TRUE(key1 == key2);
128 EXPECT_FALSE(key1 != key2);
129 EXPECT_FALSE(key1 < key2);
130 EXPECT_FALSE(key2 < key1);
131}
132
Yao Xiao6924a36a2019-07-12 16:55:19133TEST(NetworkIsolationKeyTest, OpaqueOriginKeyWithFrameOrigin) {
Eric Robinsonfc7de102019-06-21 15:27:10134 url::Origin origin_data =
135 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"));
136
137 NetworkIsolationKey key1(url::Origin::Create(GURL("http://a.test")),
138 origin_data);
139 EXPECT_TRUE(key1.IsFullyPopulated());
140 EXPECT_FALSE(key1.IsTransient());
141 EXPECT_EQ("http://a.test", key1.ToString());
142 EXPECT_EQ("http://a.test", key1.ToDebugString());
143
144 NetworkIsolationKey key2(origin_data,
145 url::Origin::Create(GURL("http://a.test")));
146 EXPECT_TRUE(key2.IsFullyPopulated());
147 EXPECT_TRUE(key2.IsTransient());
148 EXPECT_EQ("", key2.ToString());
149 EXPECT_EQ(origin_data.GetDebugString(), key2.ToDebugString());
150 EXPECT_NE(origin_data.DeriveNewOpaqueOrigin().GetDebugString(),
151 key2.ToDebugString());
152}
153
Matt Menke2fa45992019-08-06 23:07:35154TEST(NetworkIsolationKeyTest, ValueRoundTripEmpty) {
155 const url::Origin kJunkOrigin =
156 url::Origin::Create(GURL("data:text/html,junk"));
157
158 // Convert empty key to value and back, expecting the same value.
159 NetworkIsolationKey no_frame_origin_key;
160 base::Value no_frame_origin_value;
161 ASSERT_TRUE(no_frame_origin_key.ToValue(&no_frame_origin_value));
162
163 // Fill initial value with junk data, to make sure it's overwritten.
164 NetworkIsolationKey out_key(kJunkOrigin, kJunkOrigin);
165 EXPECT_TRUE(NetworkIsolationKey::FromValue(no_frame_origin_value, &out_key));
166 EXPECT_EQ(no_frame_origin_key, out_key);
167
168 // Perform same checks when frame origins are enabled.
169
170 base::test::ScopedFeatureList feature_list;
171 feature_list.InitAndEnableFeature(
172 net::features::kAppendFrameOriginToNetworkIsolationKey);
173
174 NetworkIsolationKey frame_origin_key;
175 base::Value frame_origin_value;
176 ASSERT_TRUE(frame_origin_key.ToValue(&frame_origin_value));
177
178 // Fill initial value with junk data, to make sure it's overwritten.
179 out_key = NetworkIsolationKey(kJunkOrigin, kJunkOrigin);
180 EXPECT_TRUE(NetworkIsolationKey::FromValue(frame_origin_value, &out_key));
181 EXPECT_EQ(frame_origin_key, out_key);
182
183 // The Values should also be the same in both cases.
184 EXPECT_EQ(no_frame_origin_key, frame_origin_key);
185}
186
187TEST(NetworkIsolationKeyTest, ValueRoundTripNoFrameOrigin) {
188 const url::Origin kJunkOrigin =
189 url::Origin::Create(GURL("data:text/html,junk"));
190
191 NetworkIsolationKey key1(url::Origin::Create(GURL("https://foo.test/")),
192 kJunkOrigin);
193 base::Value value;
194 ASSERT_TRUE(key1.ToValue(&value));
195
196 // Fill initial value with junk data, to make sure it's overwritten.
197 NetworkIsolationKey key2(kJunkOrigin, kJunkOrigin);
198 EXPECT_TRUE(NetworkIsolationKey::FromValue(value, &key2));
199 EXPECT_EQ(key1, key2);
200
201 base::test::ScopedFeatureList feature_list;
202 feature_list.InitAndEnableFeature(
203 net::features::kAppendFrameOriginToNetworkIsolationKey);
204
205 // Loading should fail when frame origins are enabled.
206 EXPECT_FALSE(NetworkIsolationKey::FromValue(value, &key2));
207}
208
209TEST(NetworkIsolationKeyTest, ValueRoundTripFrameOrigin) {
210 const url::Origin kJunkOrigin =
211 url::Origin::Create(GURL("data:text/html,junk"));
212
213 base::test::ScopedFeatureList feature_list;
214 feature_list.InitAndEnableFeature(
215 net::features::kAppendFrameOriginToNetworkIsolationKey);
216
217 NetworkIsolationKey key1(url::Origin::Create(GURL("https://foo.test/")),
218 url::Origin::Create(GURL("https://foo.test/")));
219 base::Value value;
220 ASSERT_TRUE(key1.ToValue(&value));
221
222 // Fill initial value with junk data, to make sure it's overwritten.
223 NetworkIsolationKey key2(kJunkOrigin, kJunkOrigin);
224 EXPECT_TRUE(NetworkIsolationKey::FromValue(value, &key2));
225 EXPECT_EQ(key1, key2);
226
227 feature_list.Reset();
228
229 // Loading should fail when frame origins are disabled.
230 EXPECT_FALSE(NetworkIsolationKey::FromValue(value, &key2));
231}
232
233TEST(NetworkIsolationKeyTest, ToValueTransientOrigin) {
234 const url::Origin kTransientOrigin =
235 url::Origin::Create(GURL("data:text/html,transient"));
236
237 for (bool use_frame_origins : {false, true}) {
238 SCOPED_TRACE(use_frame_origins);
239 base::test::ScopedFeatureList feature_list;
240 if (use_frame_origins) {
241 feature_list.InitAndEnableFeature(
242 net::features::kAppendFrameOriginToNetworkIsolationKey);
243 }
244
245 NetworkIsolationKey key1(kTransientOrigin, kTransientOrigin);
246 EXPECT_TRUE(key1.IsTransient());
247 base::Value value;
248 EXPECT_FALSE(key1.ToValue(&value));
249 }
250}
251
252TEST(NetworkIsolationKeyTest, FromValueBadData) {
253 // Can't create these inline, since vector initialization lists require a
254 // copy, and base::Value has no copy operator, only move.
255 base::Value::ListStorage not_a_url_list;
256 not_a_url_list.emplace_back(base::Value("not-a-url"));
257
258 base::Value::ListStorage transient_origin_list;
259 transient_origin_list.emplace_back(base::Value("data:text/html,transient"));
260
261 base::Value::ListStorage too_many_origins_list;
262 too_many_origins_list.emplace_back(base::Value("https://too/"));
263 too_many_origins_list.emplace_back(base::Value("https://many/"));
264 too_many_origins_list.emplace_back(base::Value("https://origins/"));
265
266 const base::Value kTestCases[] = {
267 base::Value(base::Value::Type::STRING),
268 base::Value(base::Value::Type::DICTIONARY),
269 base::Value(std::move(not_a_url_list)),
270 base::Value(std::move(transient_origin_list)),
271 base::Value(std::move(too_many_origins_list)),
272 };
273
274 for (bool use_frame_origins : {false, true}) {
275 SCOPED_TRACE(use_frame_origins);
276 base::test::ScopedFeatureList feature_list;
277 if (use_frame_origins) {
278 feature_list.InitAndEnableFeature(
279 net::features::kAppendFrameOriginToNetworkIsolationKey);
280 }
281
282 for (const auto& test_case : kTestCases) {
283 NetworkIsolationKey key;
284 // Write the value on failure.
285 EXPECT_FALSE(NetworkIsolationKey::FromValue(test_case, &key))
286 << test_case;
287 }
288 }
289}
290
Shivani Sharma53b39d4c2019-11-14 11:38:41291TEST(NetworkIsolationKeyTest, UseRegistrableDomain) {
292 base::test::ScopedFeatureList feature_list;
293 feature_list.InitAndEnableFeature(
294 net::features::kUseRegistrableDomainInNetworkIsolationKey);
295
296 // Both origins are non-opaque.
297 url::Origin origin_a = url::Origin::Create(GURL("http://a.foo.test:80"));
298 url::Origin origin_b = url::Origin::Create(GURL("https://b.foo.test:2395"));
299
300 // Resultant NIK should have the same scheme as the initial origin and
301 // default port. Note that frame_origin will be empty as triple keying is not
302 // enabled.
303 url::Origin expected_domain_a = url::Origin::Create(GURL("http://foo.test"));
304 net::NetworkIsolationKey key(origin_a, origin_b);
305 EXPECT_EQ(expected_domain_a, key.GetTopFrameOrigin().value());
306 EXPECT_FALSE(key.GetFrameOrigin().has_value());
307
308 // More tests for using registrable domain are in
309 // NetworkIsolationKeyWithFrameOriginTest.UseRegistrableDomain.
310}
311
Yao Xiao6924a36a2019-07-12 16:55:19312class NetworkIsolationKeyWithFrameOriginTest : public testing::Test {
Eric Robinsonfc7de102019-06-21 15:27:10313 public:
Yao Xiao6924a36a2019-07-12 16:55:19314 NetworkIsolationKeyWithFrameOriginTest() {
Eric Robinsonfc7de102019-06-21 15:27:10315 feature_list_.InitAndEnableFeature(
Yao Xiao6924a36a2019-07-12 16:55:19316 net::features::kAppendFrameOriginToNetworkIsolationKey);
Eric Robinsonfc7de102019-06-21 15:27:10317 }
318
319 private:
320 base::test::ScopedFeatureList feature_list_;
321};
322
Yao Xiao6924a36a2019-07-12 16:55:19323TEST_F(NetworkIsolationKeyWithFrameOriginTest, WithFrameOrigin) {
Eric Robinsonfc7de102019-06-21 15:27:10324 NetworkIsolationKey key(url::Origin::Create(GURL("http://b.test")),
325 url::Origin::Create(GURL("http://a.test/")));
326 EXPECT_TRUE(key.IsFullyPopulated());
327 EXPECT_FALSE(key.IsTransient());
328 EXPECT_EQ("http://b.test http://a.test", key.ToString());
329 EXPECT_EQ("http://b.test http://a.test", key.ToDebugString());
330
331 EXPECT_TRUE(key == key);
332 EXPECT_FALSE(key != key);
333 EXPECT_FALSE(key < key);
334}
335
Yao Xiao6924a36a2019-07-12 16:55:19336TEST_F(NetworkIsolationKeyWithFrameOriginTest, OpaqueOriginKey) {
Eric Robinsonfc7de102019-06-21 15:27:10337 url::Origin origin_data =
338 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"));
339
340 NetworkIsolationKey key1(url::Origin::Create(GURL("http://a.test")),
341 origin_data);
342 EXPECT_TRUE(key1.IsFullyPopulated());
343 EXPECT_TRUE(key1.IsTransient());
344 EXPECT_EQ("", key1.ToString());
345 EXPECT_EQ("http://a.test " + origin_data.GetDebugString(),
346 key1.ToDebugString());
347 EXPECT_NE(
348 "http://a.test " + origin_data.DeriveNewOpaqueOrigin().GetDebugString(),
349 key1.ToDebugString());
350
351 NetworkIsolationKey key2(origin_data,
352 url::Origin::Create(GURL("http://a.test")));
353 EXPECT_TRUE(key2.IsFullyPopulated());
354 EXPECT_TRUE(key2.IsTransient());
355 EXPECT_EQ("", key2.ToString());
356 EXPECT_EQ(origin_data.GetDebugString() + " http://a.test",
357 key2.ToDebugString());
358 EXPECT_NE(
359 origin_data.DeriveNewOpaqueOrigin().GetDebugString() + " http://a.test",
360 key2.ToDebugString());
361}
362
Yao Xiao6924a36a2019-07-12 16:55:19363TEST_F(NetworkIsolationKeyWithFrameOriginTest, OpaqueOriginKeyBoth) {
Eric Robinsonfc7de102019-06-21 15:27:10364 url::Origin origin_data_1 =
365 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"));
366 url::Origin origin_data_2 =
367 url::Origin::Create(GURL("data:text/html,<body>Hello Universe</body>"));
368 url::Origin origin_data_3 =
369 url::Origin::Create(GURL("data:text/html,<body>Hello Cosmos</body>"));
370
371 NetworkIsolationKey key1(origin_data_1, origin_data_2);
372 NetworkIsolationKey key2(origin_data_1, origin_data_2);
373 NetworkIsolationKey key3(origin_data_1, origin_data_3);
374
375 // All the keys should be fully populated and transient.
376 EXPECT_TRUE(key1.IsFullyPopulated());
377 EXPECT_TRUE(key2.IsFullyPopulated());
378 EXPECT_TRUE(key3.IsFullyPopulated());
379 EXPECT_TRUE(key1.IsTransient());
380 EXPECT_TRUE(key2.IsTransient());
381 EXPECT_TRUE(key3.IsTransient());
382
383 // Test the equality/comparisons of the various keys
384 EXPECT_TRUE(key1 == key2);
385 EXPECT_FALSE(key1 == key3);
386 EXPECT_FALSE(key1 < key2 || key2 < key1);
387 EXPECT_TRUE(key1 < key3 || key3 < key1);
388
389 // Test the ToString and ToDebugString
390 EXPECT_EQ(key1.ToDebugString(), key2.ToDebugString());
391 EXPECT_NE(key1.ToDebugString(), key3.ToDebugString());
392 EXPECT_EQ("", key1.ToString());
393 EXPECT_EQ("", key2.ToString());
394 EXPECT_EQ("", key3.ToString());
395}
396
Shivani Sharma53b39d4c2019-11-14 11:38:41397TEST_F(NetworkIsolationKeyWithFrameOriginTest, UseRegistrableDomain) {
398 base::test::ScopedFeatureList feature_list;
399 feature_list.InitWithFeatures(
400 {net::features::kAppendFrameOriginToNetworkIsolationKey,
401 net::features::kUseRegistrableDomainInNetworkIsolationKey},
402 {});
403
404 // Both origins are non-opaque.
405 url::Origin origin_a = url::Origin::Create(GURL("http://a.foo.test:80"));
406 url::Origin origin_b = url::Origin::Create(GURL("https://b.foo.test:2395"));
407
408 // Resultant NIK should have the same schemes as the initial origins and
409 // default port.
410 url::Origin expected_domain_a = url::Origin::Create(GURL("http://foo.test"));
411 url::Origin expected_domain_b = url::Origin::Create(GURL("https://foo.test"));
412 net::NetworkIsolationKey key(origin_a, origin_b);
413 EXPECT_EQ(expected_domain_a, key.GetTopFrameOrigin().value());
414 EXPECT_EQ(expected_domain_b, key.GetFrameOrigin().value());
415
416 // Top frame origin is opaque but not the frame origin.
417 url::Origin origin_data =
418 url::Origin::Create(GURL("data:text/html,<body>Hello World</body>"));
419 key = NetworkIsolationKey(origin_data, origin_b);
420 EXPECT_TRUE(key.GetTopFrameOrigin()->opaque());
421 EXPECT_EQ(origin_data, key.GetTopFrameOrigin().value());
422 EXPECT_EQ(expected_domain_b, key.GetFrameOrigin().value());
423
424 // Top frame origin is non-opaque but frame origin is opaque.
425 key = NetworkIsolationKey(origin_a, origin_data);
426 EXPECT_EQ(expected_domain_a, key.GetTopFrameOrigin().value());
427 EXPECT_EQ(origin_data, key.GetFrameOrigin().value());
428 EXPECT_TRUE(key.GetFrameOrigin()->opaque());
429
430 // Empty NIK stays empty.
431 net::NetworkIsolationKey empty_key;
432 EXPECT_FALSE(empty_key.GetTopFrameOrigin().has_value());
433 EXPECT_FALSE(empty_key.GetFrameOrigin().has_value());
434}
435
Shivani Sharmad81bdd42019-05-23 17:19:56436} // namespace net