Commit 39c631c
Rotate roots per spec (theupdateframework#143)
* update roots
* removing some debugging comments
* removing duplicate code for getLocalRootMeta by calling it from getLocalMeta
* fix based on the reviews.
* enable an arbitrary root verify another root (use case: n verify n+1) without the need for store them permanently.
* check non root metadata, refactor test, address comments
* updated according to the comments
* remove persistent metadata is the keys have changed.
* removing the unused ErrWrongRootVersion
* add DeleteMeta to the LocalStore interface and implemenet in MemoryLocalStore and FileLocalStore subtypes.
* delete (instead of setting to an empty raw message) the top-level metadata when their key has changed.
* add test fixtures for fast forward attack recovery.
* test for fast forward attack recovery
* addressed several comments.
* addressed more comments. Set the rootVersion in loadAndVerifyLocalRootMeta. Fixed a buggy test.
* Fixed a buggy test.
* fix comment typos
* fix race condition related to the expired check.
* fix race condition related to the expired check.
* kill unmarshalIgnoreExpired.
* add test for root update for client version above 1.
* add test for root update for client version greater than 1.
* update the VerifyIgnoreExpiredCheck method signature and add test for it.
* Avoid mocking IsExpired in the tests. Instead update test fixtured to have concerete timestamps (either expired or long exiring one)
* remove commented code
* update fixtures and clarify test comments.
* updating the comments based on the feedbacks.
* update roots
* removing some debugging comments
* removing duplicate code for getLocalRootMeta by calling it from getLocalMeta
* fix based on the reviews.
* enable an arbitrary root verify another root (use case: n verify n+1) without the need for store them permanently.
* check non root metadata, refactor test, address comments
* updated according to the comments
* remove persistent metadata is the keys have changed.
* removing the unused ErrWrongRootVersion
* delete (instead of setting to an empty raw message) the top-level metadata when their key has changed.
* add test fixtures for fast forward attack recovery.
* test for fast forward attack recovery
* addressed several comments.
* addressed more comments. Set the rootVersion in loadAndVerifyLocalRootMeta. Fixed a buggy test.
* Fixed a buggy test.
* fix comment typos
* Update client/client_test.go
Co-authored-by: Trishank Karthik Kuppusamy <trishank.kuppusamy@datadoghq.com>
* Update client/client_test.go
Co-authored-by: Trishank Karthik Kuppusamy <trishank.kuppusamy@datadoghq.com>
* fix race condition related to the expired check.
* fix race condition related to the expired check.
* kill unmarshalIgnoreExpired.
* add test for root update for client version above 1.
* add test for root update for client version greater than 1.
* update the VerifyIgnoreExpiredCheck method signature and add test for it.
* Avoid mocking IsExpired in the tests. Instead update test fixtured to have concerete timestamps (either expired or long exiring one)
* remove commented code
* update fixtures and clarify test comments.
* updating the comments based on the feedbacks.
* rebase and update test cases to long expiration (10 years from now), by default.
* add test cases for (1) when there is no local root, (2) there is a local root but no other top-level metadata
* remove the 'previous' of test folders
Co-authored-by: Trishank Karthik Kuppusamy <trishank.kuppusamy@datadoghq.com>1 parent 4ec5291 commit 39c631c
File tree
831 files changed
+42512
-137
lines changed- client
- leveldbstore
- testdata
- Published1Time_backwardRootVersion
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published1Time_client_no_root
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published1Time_client_root_only
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published1Time
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published2Times_keyrotated_initialrootexpired
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published2Times_keyrotated_invalidNewRootSignature
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published2Times_keyrotated_invalidOldRootSignature
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published2Times_keyrotated
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published2Times_snapshot_keyrotated
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published2Times_targets_keyrotated
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published2Times_timestamp_keyrotated
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published3Times_keyrotated_forwardRootVersion
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published3Times_keyrotated_initialrootsexpired_clientversionis2
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published3Times_keyrotated_initialrootsexpired
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- Published3Times_keyrotated_latestrootexpired
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp
- client/metadata
- current
- previous
- server
- metadata.staged
- metadata
- verify
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
831 files changed
+42512
-137
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
301 | | - | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
311 | | - | |
| 315 | + | |
312 | 316 | | |
313 | 317 | | |
314 | 318 | | |
| |||
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
363 | 548 | | |
364 | 549 | | |
365 | 550 | | |
| |||
552 | 737 | | |
553 | 738 | | |
554 | 739 | | |
| 740 | + | |
555 | 741 | | |
| 742 | + | |
556 | 743 | | |
557 | 744 | | |
558 | 745 | | |
559 | 746 | | |
560 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
561 | 751 | | |
562 | 752 | | |
| 753 | + | |
| 754 | + | |
563 | 755 | | |
564 | 756 | | |
565 | 757 | | |
566 | 758 | | |
567 | 759 | | |
568 | 760 | | |
569 | 761 | | |
570 | | - | |
571 | | - | |
572 | 762 | | |
573 | 763 | | |
| 764 | + | |
574 | 765 | | |
575 | 766 | | |
576 | 767 | | |
| |||
587 | 778 | | |
588 | 779 | | |
589 | 780 | | |
| 781 | + | |
590 | 782 | | |
591 | 783 | | |
592 | 784 | | |
| |||
619 | 811 | | |
620 | 812 | | |
621 | 813 | | |
| 814 | + | |
622 | 815 | | |
| 816 | + | |
623 | 817 | | |
624 | 818 | | |
625 | 819 | | |
626 | 820 | | |
627 | 821 | | |
628 | | - | |
629 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
630 | 826 | | |
631 | 827 | | |
632 | 828 | | |
| |||
704 | 900 | | |
705 | 901 | | |
706 | 902 | | |
707 | | - | |
708 | 903 | | |
709 | 904 | | |
710 | 905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
134 | 134 | | |
135 | | - | |
136 | | - | |
| 135 | + | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
140 | | - | |
| 139 | + | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
| |||
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
150 | | - | |
151 | 149 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 150 | + | |
| 151 | + | |
156 | 152 | | |
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
160 | | - | |
| 156 | + | |
| 157 | + | |
161 | 158 | | |
162 | 159 | | |
163 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments