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
Aaron Lehmann
02dfdaf197
Use correct regular expression for repository names in HTTP handlers
...
Import github.com/docker/distribution/registry/api/v2 to share the
regexps that the registry API uses.
Remove ErrUnauthorized in errors package, since it conflicts with one
defined in v2.
Fixes #92
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-27 14:51:59 -07:00
David Lawrence
503a1b8a6e
change error log to debug
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-23 14:24:46 -07:00
Diogo Monica
3154aa9d29
Adding tests for CertsToRemove, and move tests around
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-22 19:08:01 -07:00
David Lawrence
6fd60f88d1
add ErrExpired to notary client to translate from gotuf ErrExpired
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-22 18:54:00 -07:00
Diogo Mónica
21a9b99e94
Merge pull request #114 from docker/invalid_password_err
...
better error handling for invalid password
2015-07-22 15:09:53 -07:00
David Lawrence
1fc3257f6e
updating gotuf dep with some better http error handling.
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-22 13:19:52 -07:00
David Lawrence
cfe8255187
better error handling for invalid password
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-22 11:37:54 -07:00
David Lawrence
8b2888d122
latest vendored gotuf
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-21 13:57:21 -07:00
David Lawrence
b44e835275
update default expiry times to those agreed on
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-20 14:59:19 -07:00
Diogo Monica
42ded6231c
Converted tests to testify and EC generation
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-20 13:36:03 -07:00
Nathan McCauley
ff2e583439
Merge pull request #101 from dmcgowan/passphrase-util
...
Move passphrase logic to its own package
2015-07-20 13:15:20 -07:00
Derek McGowan
c35c1ea254
Move passphrase logic to its own package
...
The logic to retrieve passphrase is generic and may be used by directly by clients.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-20 13:02:05 -07:00
Diogo Mónica
a5df3c00cc
Merge pull request #89 from docker/general_cleanup
...
WIP general cleanup
2015-07-20 12:45:03 -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
David Lawrence
20b60d9cc2
cleaning up cache vs filestore
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-20 11:47:30 -07:00
Nathan McCauley
0642da80f1
review feedback
...
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-20 11:00:24 -07:00
Nathan McCauley
38fe6bd45b
gofmt across the baord
...
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-20 11:00:24 -07:00
Nathan McCauley
de6f65b7e7
many testing fixups to support key aliasing
...
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-20 11:00:22 -07:00
Nathan McCauley
f239757dfd
keystore aliasing, take 2
...
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-20 10:58:20 -07:00
Nathan McCauley
23b7e8c6af
Update keyfilestore to use passwordRetriever
...
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-20 10:58:16 -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
9d31d343f3
Merge pull request #83 from docker/cooking-the-tofu-to-support-rotations
...
Cooking the tofu to support rotations
2015-07-19 14:50:39 -07:00
David Lawrence
3974e0015c
removing single file append changelist
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-18 22:51:40 -07:00
David Lawrence
c9732dd9cb
stop targets dir being created, we don't use it
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-18 22:46:04 -07:00
David Lawrence
54d40f2ae3
updating error messages
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-18 22:25:19 -07:00
David Lawrence
5015b1f47d
fixing timestamps, clearing changelists, and the Adding target byte log
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-18 17:55:13 -07:00
Diogo Monica
117a25758d
Fixing return errors
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-18 01:42:57 -07:00
David Lawrence
b561f347ed
updating errors to use distribution's errcode package
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-17 18:02:56 -07:00
David Lawrence
d453c6548d
client side of multi TUF file atomic update
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-17 17:48:06 -07:00
Diogo Mónica
552ccf411a
Merge pull request #80 from docker/test-publish
...
Add a unit test for publish
2015-07-17 16:53:45 -07:00
Aaron Lehmann
afc331b930
Add a unit test for publish
...
This instantiates a temporary server, publishes some targets to it, and
makes sure we can pull back the correct targets from the server.
Also fixes a few problems with the client unit tests, error reporting in
the client, and logging in the server.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 16:27:31 -07:00
Diogo Monica
f532550742
Rebase works
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:44:51 -07:00
Diogo Monica
c817ba3606
Fixed bug in Root Validation and added more test
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:05 -07:00
Diogo Monica
17c9fcd911
Added basic tests for ValidateRoot
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:05 -07:00
Diogo Monica
f5873eef8c
Adding RemoveAll to X509FileStore and correcting functions caller
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Aaron Lehmann
d2ea9cc0d5
Updates to notary for gotuf's split of PublicKey and PrivateKey interfaces
...
Functions should now take data.PublicKey or data.PrivateKey instead of
data.Key.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 11:35:22 -07:00
Diogo Mónica
1a5ad474f3
Merge pull request #66 from docker/rename-certificate-stores
...
Rename certificate stores to trustedCertificateStore and trustedCAStore
2015-07-15 22:40:03 -07:00
Diogo Mónica
0ed6072a4a
Merge pull request #67 from docker/adding-certs
...
Adding new certificates
2015-07-15 22:35:54 -07:00
Diogo Monica
d743dfac6e
Fixed config files and trust manager tests to point at new fixtures
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-15 19:46:57 -07:00
Aaron Lehmann
36a8f77129
Rename certificate stores to trustedCertificateStore and trustedCAStore
...
Add convenience methods to KeyStoreManager to add certs to both cert
stores.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-15 18:10:53 -07:00
Aaron Lehmann
e5a42d4df9
Add ExportKeysByGUN function
...
It exports the keys for a particular GUN to a zip, encrypted with a
specified passphrase.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-15 17:14:57 -07:00
Aaron Lehmann
6d3d98b873
Move non-root keys to tuf_keys subdirectory
...
This subdirectory is at the same level as root_keys. It avoids having
rootKeyStore and nonRootKeyStore overlap. Previously, the base directory
for rootKeyStore was .../private/root_keys and the base directory for
nonRootKeyStore was .../private.
This commit also removes deduplicating logic in ExportAllKeys, which is
no longer needed now that the stores don't overlap.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-15 17:14:57 -07:00
Aaron Lehmann
a16581ecc7
Move CryptoService and UnlockedCryptoService into a cryptoservice package
...
Move GenRootKey and GetRootCryptoService to KeyStoreManager, now that
they don't depend on client-specific types.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-14 18:39:38 -07:00
Aaron Lehmann
6068f30145
Move caStore and certificateStore into KeyStoreManager
...
Refactor validateRoot into KeyStoreManager. It now takes the DNS name as
a parameter. When KeyStoreManager is used with a NotaryRepository, the
DNS name should be the GUN of the repository.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-14 18:39:38 -07:00
Aaron Lehmann
d5c7c40955
Introduce a KeyStoreManager to abstract management of root and non-root key storage
...
This structure encapsulates what used to be "rootKeyStore" and
"privKeyStore". These are being moved out of NotaryRepository, so that
operations like listing keys, importing keys, and exporting keys aren't
tied to a NotaryRepository structure.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-14 18:39:38 -07:00
Diogo Monica
ead0224526
Removing commented out code
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-13 20:32:51 -07:00
Aaron Lehmann
e4704f9729
Update notary for removal of signed.Signer
...
We now deal with CryptoServices directly instead of passing around
Signers.
UnlockedSigner becomes UnlockedCryptoService because it no longer
contains a Signer.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-13 15:18:02 -07:00
Diogo Monica
a139807d89
Fixing lint
...
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-13 14:01:26 -07:00