1
0
mirror of https://github.com/docker/docs.git synced 2026-11-06 12:54:24 +03:00
Commit Graph

1500 Commits

Author SHA1 Message Date
HuKeping
08c0da745f Drop the actions
All the other code would not have to know about the exact auth mechanism.

Use "readOnly", we can just include "pull" when readonly is true,
and "push", "pull" when readonly is false.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-02-27 10:26:23 +08:00
HuKeping
af5ee13d8a Bugfix: the actions should not always be pull and push
The similiar fix in docker daemon:
- https://github.com/docker/docker/pull/20382

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-02-26 10:25:50 +08:00
Riyaz Faizullabhoy
c1c2ca1d6d Merge pull request #595 from HuKeping/cleanup
Cleanup: remove the unused function
2016-02-25 11:14:02 -08:00
HuKeping
f9681e6287 Cleanup: remove the unused function
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-02-25 21:48:32 +08:00
David Lawrence
3a89320e5d Merge pull request #588 from endophage/fix_snapshot_expiry
Fix server signed snapshot expiry/regeneration
2016-02-24 16:40:56 -08:00
Riyaz Faizullabhoy
4904c8882e Merge pull request #590 from docker/yubi-import-check
Move yubikey import role check to avoid excessive passphrase prompting
2016-02-24 16:20:47 -08:00
David Lawrence
cb2dd07edc the server was not setting the longer snapshot expiry time. When generating a timestamp it was also retriving the snapshot directly from the database and only validating the checksum still matched what was in the timestamp. Due to the addition of consistent downloads, this mean a new snapshot never got generated. It is necessary for GetOrCreateTimestamp to call GetOrCreateSnapshot to ensure a new snapshot is generated as and when required
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-24 15:51:31 -08:00
Riyaz Faizullabhoy
d69d0188a4 Move yubikey import role check to avoid excessive passphrase prompting
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-24 14:29:40 -08:00
David Lawrence
e692e5d69e Merge pull request #589 from docker/del-add-print
print IDs instead of key itself
2016-02-24 13:38:13 -08:00
Riyaz Faizullabhoy
596a362a36 print IDs instead of key itself
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-24 11:18:33 -08:00
Riyaz Faizullabhoy
6d76ce10ba Merge pull request #577 from docker/walker-template
WalkTargets on tuf repo for targets and delegations
2016-02-23 13:19:54 -08:00
Riyaz Faizullabhoy
bde878cdb6 changing API for updating delegations
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:57:08 -08:00
Riyaz Faizullabhoy
729bb88537 addressing review comments
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
Riyaz Faizullabhoy
06e34e825a walk for updating/creating delegations, validate changes to paths
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
Riyaz Faizullabhoy
fe1c8ea1d8 More robust errors for visitor and walker, improve comments
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
Riyaz Faizullabhoy
22c220d4d2 RemoveTargets with walker
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
Riyaz Faizullabhoy
456e5054a8 Currently always validate role names and restrict paths while walking
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
Riyaz Faizullabhoy
5398bcf4fd AddTargets uses walk and visitor
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
Riyaz Faizullabhoy
e279c99daf use walker for GetDelegationRole
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
Riyaz Faizullabhoy
a7153aeccb WalkTargets on tuf repo, use in getting targets/roles
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-23 11:55:31 -08:00
David Lawrence
9e9802bdd0 Merge pull request #573 from docker/validate-meta-on-parse
Adds extra validation when calling `XFromSigned` functions
2016-02-23 10:17:02 -08:00
David Lawrence
926964df29 Merge pull request #585 from endophage/download_valid_children
check validity of children during download
2016-02-23 10:08:20 -08:00
David Lawrence
1e99830716 check validity of children during download and don't overwrite already loaded children
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-22 20:47:58 -08:00
Ying Li
be3520c011 Update the integration tests after rebase
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:52:18 -08:00
Ying Li
8ca8f073fa Have isValidRootRoleStructure take both role names in order to construct an ErrInvalidMetadata
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:39:54 -08:00
Ying Li
191307fc07 specifying other non-base roles on the root metadata is not invalid
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
61dad28b1e Validate that snapshot and timestamp have required sha256 checksums
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
4b13e7d358 Refactor RootRole verification into a helper function used by root and targets validation
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
d8938f76e7 When downloading snapshot, return ErrNotLoaded if timestamp hasn't been loaded. Similarly for targets.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
57e28e4f09 Rename the validation functions and add more tests
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
314cfb9a17 Add targets metadata validation to the targets data structure
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
4cae84bb29 Add snapshot metadata validation to the snapshot data structure
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
8335d194ce Add timestamp metadata validation to the timestamp data structure
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Ying Li
36ea1f6901 Add root metadata validation to the root data structure
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 19:16:32 -08:00
Diogo Mónica
da91edcb6e Merge pull request #587 from endophage/update_pkcs11
updating miekg/pkcs11 for go 1.6
2016-02-22 18:53:53 -08:00
David Lawrence
9db2ae3ed6 updating miekg/pkcs11 for go 1.6
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-22 17:53:24 -08:00
David Lawrence
332fc35dc5 Merge pull request #578 from endophage/go1.6
updates and bugfixes for go 1.6
2016-02-22 16:35:48 -08:00
Ying Li
c625402ef7 Merge pull request #572 from docker/per-metadata-type-mutation
Per metadata type mutation tests
2016-02-22 16:34:33 -08:00
Ying Li
1e48fd35ff Use ToSigned in the swizzler
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-22 15:27:53 -08:00
David Lawrence
4c6c6d99ff Merge pull request #579 from docker/remove-more-path-hex
remove path hash prefix from TargetsDelegations
2016-02-22 10:32:37 -08:00
Riyaz Faizullabhoy
8a5c8c0495 Merge pull request #582 from docker/dockertest-fixes
Update dockertest file
2016-02-19 17:04:55 -08:00
Ying Li
c07cb37f20 Update with new docker version, and be more precise in what failures are allowed.
Also, rather than use the regular docker configuration dir, create a temporary one
so we don't break existing real repo info.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-19 16:30:49 -08:00
Ying Li
b8866877b0 Clarify test comment
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-18 18:59:14 -08:00
Riyaz Faizullabhoy
3a5fbf0033 remove path hash prefix from TargetsDelegations
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-18 17:40:50 -08:00
David Lawrence
e270795768 updates and bugfixes for go 1.6
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-18 16:45:40 -08:00
Riyaz Faizullabhoy
14edbe33e1 add snapshot meta check in download root, update tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-02-17 19:40:11 -08:00
Ying Li
9dfaee1add Refactor and add to per-metadata-type mutation tests
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-17 19:39:57 -08:00
Ying Li
edb70b5474 Fix test bug where root role mutations weren't being tested
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-17 19:35:03 -08:00
Ying Li
401690d621 Include client update tests to test updating non-root metadata that are missing pieces
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-17 19:35:03 -08:00
Ying Li
95325cd19b Include client update tests to test updating roots that are missing roles
Signed-off-by: Ying Li <ying.li@docker.com>
2016-02-17 19:35:03 -08:00