Commit Graph

1045 Commits

Author SHA1 Message Date
Diogo Mónica 0e0605c6e2 Merge pull request #43 from dmcgowan/fix-fmt-lines
Use logrus instead of fmt.Println
2015-07-12 11:40:08 -07:00
Derek McGowan f292b562e2 Use logrus instead of fmt.Println
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-10 17:10:23 -07:00
Diogo Mónica cab1006568 Merge pull request #42 from docker/signing-methods
Signing methods
2015-07-10 15:21:21 -07:00
Diogo Monica 5a7e1ca7f2 Vendoring new gotuf
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-10 15:17:44 -07:00
Aaron Lehmann f8e087a17a Unify CryptoService and RootCryptoService
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-10 15:10:44 -07:00
Aaron Lehmann 81f5fd7461 Switch to RSA-PSS
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-10 15:10:19 -07:00
Aaron Lehmann a45c3e3965 Modify TestAddTarget to make TestAddListTarget
This test now checks ListTargets and GetTargetByName as well. To do
this, it needs to expose signed metadata files over the internal HTTP
server. This means adding the timestamp private key to the key store and
exposing various json files as endpoints that serialize the necessary
data.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-10 10:19:14 -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
Diogo Mónica 436e02d390 Merge pull request #32 from dmcgowan/fix-default-loglevel
Fix default log level
2015-07-09 23:56:13 -07:00
Derek McGowan bd61c9896f Merge pull request #40 from dmcgowan/circle-remove-old
Remove circle old go version
2015-07-09 21:35:50 -07:00
Derek McGowan 338c781d48 Remove circle old go version
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-09 21:31:02 -07:00
Diogo Monica 1ae9cf057e Removing dangling temp test directories 2015-07-09 21:03:54 -07:00
Diogo Mónica d21823a825 Merge pull request #39 from imduffy15/patch-1
Fix example configuration file given in README.md
2015-07-09 20:48:26 -07:00
Ian Duffy ed4454c9c9 Fix example configuration file given in README.md
The example configuration given in README.md is missing a comma character and doesn't form valid JSON.

This PR adds the comma as required.

Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2015-07-10 04:35:02 +01:00
Diogo Monica 96069d3619 Removing uneeded file
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 19:27:25 -07:00
Diogo Mónica 7e467501a2 Merge pull request #37 from docker/tuf_rebase
Tuf rebase, ready to merge into master.
2015-07-09 19:21:03 -07:00
Diogo Mónica 92c7856627 Merge pull request #38 from dmcgowan/circle-new-go-only
Remove use of old version of Docker in circle build
2015-07-09 19:13:40 -07:00
Derek McGowan 885c59fa9e Remove use of old version of Docker in circle build
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-09 19:08:09 -07:00
Diogo Monica 9ae667c9aa Adding new vendored gotuf
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 18:57:53 -07:00
Diogo Monica 06a28c89ee Added root key creation if non-existing to notary
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 18:56:06 -07:00
Diogo Monica 682e7ea00b Fixing lint
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 17:58:55 -07:00
Diogo Monica d7999b6cdc Fixing stat and error checking for x509filestore
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 17:58:47 -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
Diogo Monica 8c6de46aca Added list keys that ignores symlinks 2015-07-09 17:58:10 -07:00
David Lawrence 53ad4a7539 fixing publish
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:10 -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
Diogo Monica 4635bed2db Major refactor of keys
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 17:58:10 -07:00
David Lawrence 73ca456297 annotating Publish and making it accept a password retriever function
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
Diogo Monica 6738a40cd8 Rebased and fixed issues 2015-07-09 17:58:09 -07:00
Aaron Lehmann 4f6b2da44d Add TestValidateRootKey, validates presence of x509 cert in root.json 2015-07-09 17:58:09 -07:00
Aaron Lehmann abe320307d Add TestAddTarget
This test adds two targets, and after each one, inspects the changelist
files to make sure they meet expectations.
2015-07-09 17:58:09 -07:00
David Lawrence 6bff14a679 refactoring NotaryClient out
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
David Lawrence ebbb30b56c hold unlocked signer on repository
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
David Lawrence c3e49afe1a passing cert to initialize
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
David Lawrence 6982d2f1ae put rootSigner on repository
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
David Lawrence c9ab3394de further publish updates, it pushes now, but doesn't sign roots correctly
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
Aaron Lehmann e7163aacff Add missing Close calls to address file descriptor leak 2015-07-09 17:58:09 -07:00
Diogo Monica f9f11e5781 Starting the key refactor; rename UnlockedRootKey
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 17:58:09 -07:00
Diogo Monica 2f986f1a1b WIP 2015-07-09 17:58:09 -07:00
Aaron Lehmann aa2caade20 Convert client_test.go to use testify
This simplifies the code and will be more consistent with upcoming
tests.
2015-07-09 17:58:09 -07:00
Aaron Lehmann 4602f5fb6c Extend TestInitRepo to parse and sanity-check TUF metadata 2015-07-09 17:58:09 -07:00
Aaron Lehmann 42e3f1a1c0 Use trustmanager.FingerprintCert instead of more complex method 2015-07-09 17:58:09 -07:00
Aaron Lehmann 458a7a8fac Add TestInitRepo
This test initializes a repo and then performs a series of sanity checks
on the filesystem hierarchy.
2015-07-09 17:58:09 -07:00
Aaron Lehmann 8b1e9e0faf Fix uninitialized privKeyStore member in NotaryRepository
Store a pointer to trustmanager.KeyFileStore in CryptoService,
RootCryptoService, NotaryClient, and NotaryRepository, instead of
copying the KeyFileStore structure.

Populate this pointer when creating a NotaryRepository. Previously, it
was left uninitialized.
2015-07-09 17:58:09 -07:00
Aaron Lehmann e7462dcdad Write test for FileStore's Link method
Also remove debugging print statements from the Link method.
2015-07-09 17:58:09 -07:00
Diogo Monica f4e1d3e932 Changing hardlink to symlink
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 17:58:09 -07:00
David Lawrence 12b4b3d80d working on publish with changelist
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
David Lawrence 3bcc0e1d4d updating wo make notary work with rufus again
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
David Lawrence 1d163650a3 changelist implementation
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:09 -07:00
David Lawrence 9d5e988586 working refactor
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-09 17:58:08 -07:00