Commit Graph

807 Commits

Author SHA1 Message Date
Diogo Mónica 56e4cdff6f Merge pull request #81 from docker/cover-makefile-target
Fix cover target in Makefile
2015-07-17 16:54: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 f5d1a1fbf5 Add test coverage for KeyMemoryStore (and by extension, MemoryFileStore)
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 16:45:36 -07:00
Aaron Lehmann 1d6aa22963 Fix cover target in Makefile
It shouldn't depend on .cover, because the makefile doesn't say how to
builld .cover.

It also needs to be included in .PHONY so "make cover" forces coverage
to be run.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-17 16:27:54 -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
Nathan McCauley a90a8b27b3 Merge pull request #65 from docker/adding-the-not-yummy-kind-of-tofu
Adding the not yummy kind of tofu
2015-07-17 15:59:30 -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 00f8f56942 Cosmetic code changes
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:06 -07:00
Diogo Monica 4c805611d0 Adding more error types and being extra careful with checks
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:06 -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 945691912a Added error type to X509FileStore
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 1c10f2233d Add better comments, debug code and errors to ValidateRoot
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:33:05 -07:00
Diogo Monica 2c9a0d6331 Adding tests to RemoveAll in X509Stores
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 3ec4f1d7f4 Adding RemoveKey and Test
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -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
Diogo Monica e72141f38a Simplifying the root rotation logic
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 5354c3b191 Added logic for root certificate rotation
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 5a77976901 Rebasing from master
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica 8d9d2f1dde Add TOFU logic
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:43 -07:00
Diogo Monica a7d8cb0a19 Adding chain support for roots.json and scaning for leaf instead of hardcoding
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:31:03 -07:00
Diogo Monica 58e6544d0a Adding Cert retrieval by common name, and renaming KeyID to CertID
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:28:30 -07:00
Diogo Monica 0313aa5958 Adding parsing of multiple certificates, and leaf cert filtering methods
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-17 14:28:30 -07:00
Diogo Mónica b91777d51a Merge pull request #78 from jfrazelle/move-coverage-script-to-makefile
Move coverage script to makefile
2015-07-17 12:38:43 -07:00
Jessica Frazelle 23a2d8a3ec move coverage script to makefile function
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-07-17 12:17:38 -07:00
Diogo Mónica 5bfd490be1 Merge pull request #77 from jfrazelle/74-cross-compile-binaries
cross compile binaries / dockerfile fixes
2015-07-17 12:11:09 -07:00
Diogo Mónica c749917b37 Merge pull request #79 from docker/separate-public-private-keys
Updates to notary for gotuf's split of PublicKey and PrivateKey interfaces
2015-07-17 12:02:06 -07:00
Jessica Frazelle 7a588ab223 Add makefile target for cross
Can be run with:

```
docker build --rm --force-rm -t notary .

docker run --rm -it \
    -v $(pwd)/cross:/go/src/github.com/docker/notary/cross \
    notary \
    make cross
```

Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-07-17 11:36:38 -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
Jessica Frazelle 541920c770 Re-add back root Dockerfile for cross comiling and with GOPATH setup correctly.
Fix notary-server Dockerfile so the COPY is after the run otherwise the cache
will bust on the COPY and you wind up having to run the RUN apt-get every
single time you build the Dockerfile.

Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-07-17 07:38:17 -07:00
Aaron Lehmann f5c1d8dbc9 Add ED25519 support to cryptoservice and x509utils
Add unit tests for cryptoservice that do sign and verify for all three
supported algorithms.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-16 18:44:44 -07:00
Richard Scothern 52acadc625 Merge pull request #70 from RichardScothern/enable-remote-signer
Enable remote signing service
2015-07-16 11:34:17 -07:00
Richard Scothern e5d6180276 Enable remote signing service
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-07-16 11:16:40 -07:00
David Lawrence 40eaf8f2f1 Merge pull request #69 from RichardScothern/deploy
Fix the staging deployment.
2015-07-16 10:00:33 -07:00
Richard Scothern df18a541e2 Fix the staging deployment.
Add a service name and ephemeral ports to notary server.
Remove certs as TLS is terminated in the ELB.

Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-07-16 09:50:52 -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
Richard Scothern 8eafc998f7 Merge pull request #63 from endophage/fix_sql
fixing database queries
2015-07-15 22:33:48 -07:00
Diogo Monica 3debfbca10 Reissued all certs with correct SANs
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-15 21:42:24 -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 3d58e6b810 Added tests for x509Filestore
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-15 19:57:48 -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
Diogo Monica cdee810942 Changed notary-server to point at new certs
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-15 19:45:34 -07:00
Diogo Monica 9a065a8d40 Adding new testing fixtures
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-15 19:44:58 -07:00
Diogo Monica 76d81563b3 Simplifying AddCertFromPEM to use help functions
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-15 19:44:37 -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
Diogo Mónica 06e445c2ef Merge pull request #64 from docker/signer-use-gotuf-types
Change notary-signer to use gotuf's key types
2015-07-15 17:44:57 -07:00
Aaron Lehmann c54f2d0768 Merge pull request #62 from docker/import-export
Add key import and export features
2015-07-15 17:43:19 -07:00