Commit Graph

25 Commits

Author SHA1 Message Date
Ying Li cf4b77b760 Revert "switching out to consistently use canonical json for all marshalling of TUF data"
This reverts commit f417c834c4.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-08 14:53:09 -08:00
David Lawrence f417c834c4 switching out to consistently use canonical json for all marshalling of TUF data
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-06 11:15:27 -08:00
Riyaz Faizullabhoy dbb8c1065f use path instead of filepath to express TUF roles
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-01-04 16:23:02 -08:00
Ying Li 34055f8cf7 Code cleanups as per review, and after rebasing.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-12-18 16:51:48 -08:00
Ying Li f1761afc25 Fallback on the parent role if the role to add a target to doesn't exist.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-12-18 16:37:24 -08:00
Ying Li 3ecba24410 When publishing, also publish all the dirty targets roles.
This is in addition to the canonical targets role, which always gets
re-signed and publish (we may want to revisit this later).

This makes some tests pass - still need to do fallback of roles
and publishing a created delegation role without necessarily
having the signing key for that role.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-12-18 16:37:24 -08:00
David Lawrence 4243b258b3 making GetTargetsByName work with delegations
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-17 10:46:41 -08:00
David Lawrence 5891805b29 addressing review
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-15 16:21:30 -08:00
David Lawrence 79b05d4c0a changelists for delegations
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-14 17:23:47 -08:00
Ying Li 8b9cc4c3f6 Minor review comment changes:
- add a specific error type when the server is requested to manage
  an unsupported key type
- variable name change

Signed-off-by: Ying Li <ying.li@docker.com>
2015-12-10 17:16:53 -08:00
Ying Li 4b46a34524 NotaryRepository.Intialize supports server managing snapshot keys.
If configured to have the server manage the snapshot key, the snapshot
key is not generated and there will be no snapshot metadata.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-12-10 10:16:39 -08:00
David Lawrence f73560d839 creating concrete types for the various key ciphers
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-28 16:02:55 -07:00
David Lawrence 2833a88292 adding gotuf to notary
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-27 16:36:06 -07:00
David Lawrence 8a996f417a updating godeps and notary for some syntax changes in gotuf brought on by golint
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-20 23:56:35 -07:00
David Lawrence 98cde51f18 working basic key rotation for targets and snapshot key. Command is 'notary key rotate [GUN]'
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-09 20:35:06 -07:00
David Lawrence 959d0267ac command skeletons in place, changelist actions implemented
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-09 19:24:08 -07:00
David Lawrence 83f96997d3 changelist management of key rotation
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-09 19:23:47 -07:00
David Williamson 83d0d8657f Add ChangeIterator interface for Changelists
+ Ref https://github.com/docker/notary/issues/144
    + Create ChangeIterator interface
    + Implement ChangeIterator interface for memChangeList
    + Implement ChangeIterator interface for fileChangeList
    + Add iterator test case to changelist_test
    + Add iterator test case to file_changelist_test
    + Change func applyChangelist to use iterator per PR comment
    + Remove redundant defer statement in file_changelist_test.go (PR comment)
    + Change Next error check to simple array bounds check (PR comment)
    + Add negative unit test cases to increase code coverage

Signed-off-by: David Williamson <david.williamson@docker.com>
2015-08-30 14:19:00 -07:00
David Lawrence 529230369a tests for changelist client helpers
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-28 11:29:46 -07:00
David Lawrence 0f322c69a2 fixing remove
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-28 10:21:14 -07:00
David Lawrence 7c05c0e334 breaking out role initialization to shorten NotaryRepository.Initialize a bit
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-20 11:47:30 -07:00
Diogo Monica 3b261e8972 Removing comments
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-20 10:08:15 -07:00
David Lawrence d1b09962f1 using roundtripper in notary client
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-10 10:02:38 -07:00
Aaron Lehmann 082d4f3c7c Change NotaryRepository to honor the baseURL passed in
Remove "transport", because it's not used.

In the actual notary client, pass in a hard-coded URL for now (same one
previously hardcoded in getRemoteStore). In tests, create a trivial HTTP
server using net/http/httptest, which returns a timestamp.key file.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 17:58:33 -07:00
David Lawrence 8d9ce1b2e5 forgot to add client/helpers file
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:10 -07:00