Commit Graph

85 Commits

Author SHA1 Message Date
David Lawrence
e7fa1951ab hard fail if TLS is only partially configured
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-31 10:49:42 -07:00
Diogo Mónica
149ba6fd0f Merge pull request #157 from docker/configurable_key_algo
make key algorithm configurable for local development with in memory …
2015-07-30 13:36:01 -07:00
David Lawrence
f7ca3ef62e make key algorithm configurable for local development with in memory ed25519 crypto service
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-30 11:53:39 -07:00
Derek McGowan
f9c63780b7 Use gotuf expires function
The gotuf library defines a function to check expiration of timestamps which notary will make use of.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-29 17:11:56 -07:00
Diogo Mónica
383f51134e Merge pull request #131 from docker/diogo-env-passphrases
Adding support for passphrases from env
2015-07-27 17:43:59 -07:00
Diogo Monica
b9dd9efe12 Adding default timestamp key to be ECDSA
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-27 17:35:30 -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
47f651ef8a fixing timestamp key retrieval
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-24 18:05:46 -07:00
Diogo Monica
a0f5411bcf Remove old GORM attempt from server
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-24 05:47:01 -07:00
David Lawrence
ee383ced9c adding db queries
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-24 14:35:45 -07:00
Diogo Monica
85898a578d Removing Writing data debug line
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-22 23:41:18 -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
David Lawrence
7ce7e5815e fixing 'writing data' log message
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
Diogo Mónica
9b604d0a6c Merge pull request #98 from docker/timestamp_errors
fixing timestamp errors on list
2015-07-20 10:47:10 -07:00
David Lawrence
7db33797a8 fixing timestamp errors on list
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-20 10:35:40 -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
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
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
c39a218a40 Merge pull request #51 from dmcgowan/add-ping-endpoint
Add ping endpoint
2015-07-17 17:55:22 -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
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
Nathan McCauley
88e7346782 Merge pull request #71 from docker/unify-cryptoservice
Unify cryptoservice
2015-07-17 11:10:59 -07:00
Aaron Lehmann
125d72fd77 Big refactor to make signer use cryptoservices
- Add MemoryFileStore, a partial FileStore implementation that doesn't
  persist on disk.

- Create a KeyStore interface that allows pluggable key store types. Use
  this interface in the cryptoservice implementation.

- Add KeyMemoryStore, which uses MemoryFileStore to provide a KeyStore.

- Add GetKey and DeleteKey functions to cryptoservice.CryptoService.

- Refactor the hardware RSA signing service as a CryptoService.

- Replace custom ed25519 code with cryptoservice.CryptoService.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 09:33:19 -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
ddfcd50471 Changing .pem to .crt everywhere
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-15 20:44:09 -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
David Lawrence
72d7d35221 fixing database queries
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-15 16:19:14 -07:00
Derek McGowan
93dc0285bc Add ping endpoint
Ping endpoint added so clients can get the list of authentication challenges before making an initial request.
Updated MainHandler to return JSON object instead of a string.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-14 14:08:12 -07:00
Derek McGowan
3971955cfe Change fallback timestamp algorithtm to supported version
ECDSA timestamp keys currently not supported by crypto service, use support ED25519.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-14 11:44:50 -07:00
David Lawrence
0f26bdf956 adding errors if role is empty or bad
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-13 19:50:09 -07:00
David Lawrence
6533da1be4 tests for atomic update
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-13 18:19:31 -07:00
David Lawrence
5bcd3ff52d reworking the insert check for TUF metadata in the database
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-13 18:18:33 -07:00
David Lawrence
40921a4bed fixing lint and vet errors
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-13 18:18:33 -07:00
David Lawrence
ec08d28610 provide an additional handler to allow clients to update any set of TUF metadata atomically
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-13 18:18:33 -07:00
Diogo Mónica
935b9a9366 Merge pull request #47 from docker/cryptoservice-refactor
Refactor crypto service
2015-07-13 15:29:59 -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
David Lawrence
da59198191 adding htpasswd auth to support the same set of mechanisms as distribution
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-13 14:17:24 -07:00
Diogo Monica
765a2cf661 Refactor crypto service
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-13 13:53:47 -07:00
Diogo Monica
ba94fdd19d Signature/key types are now used correcty and are represented by constants.
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-12 22:21:29 -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
Diogo Monica
682e7ea00b Fixing lint
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-09 17:58:55 -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
89379a728c adding timestamping and some general cleanup
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-03 15:38:09 -07:00
David Lawrence
0f1e8b0134 adding delete to server
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-06-21 16:37:30 -07:00
David Lawrence
73f9935ea1 renaming server/version to server/storage. version was a bad name I picked late at night 2015-06-20 19:16:20 -07:00
Nathan McCauley
518d0a2702 Notary Server in server log messages
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-06-19 11:17:06 -07:00
Nathan McCauley
e46a95227c rename vetinari to notary
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-06-19 11:01:19 -07:00
David Lawrence
91c1380070 list/lookup have empty output if they fail 2015-06-18 18:24:36 -07:00
David Lawrence
6bb833f7ff fixing version check 2015-06-18 14:39:48 -07:00