Commit Graph

1025 Commits

Author SHA1 Message Date
David Lawrence beca50909d update to only use slots 0-3
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:31 -08:00
David Lawrence b7c38f0287 fixing tests
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:31 -08:00
David Lawrence 0fd1fa6ada arbitrary slots working
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:31 -08:00
David Lawrence fea898bd34 listing all keys in the yubikey works
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:31 -08:00
David Lawrence da18f54699 import-root, list, and remove working with yubikey
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:31 -08:00
David Lawrence 6ba7335793 fill in implementation of removeKey for yubikey
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:31 -08:00
David Lawrence be4c0669c1 move import/export to cryptoservice and add import to yubikey
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:31 -08:00
David Lawrence 6f1fd28a19 Merge pull request #25 from docker/touch_to_sign
add message when user is required to touch yubikey to sign.

Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: David Lawrence <dclwrnc@gmail.com> (github: endophage)
2015-11-12 01:09:26 -08:00
David Lawrence cf50ffcd33 add message when user is required to touch yubikey to sign. N.B. touch is required during Sign, not SignInit
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:09:25 -08:00
Diogo Mónica 52ac579b45 Merge pull request #27 from docker/update-cobra
Update the cobra and pflags dependencies

Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Mónica <diogo.monica@gmail.com> (github: endophage)
2015-11-12 01:09:21 -08:00
Ying Li 24cca5d6cc Update the cobra dependency and its subdependencies (pflag, blackfriday, sanitized_anchor_name, and go-md2man).
Signed-off-by: Ying Li <ying.li@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Ying Li <ying.li@docker.com> (github: endophage)
2015-11-12 01:09:14 -08:00
Diogo Mónica 7576793c8d Merge pull request #29 from docker/client-test-refactor
Notary-client test refactor

Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Mónica <diogo.monica@gmail.com> (github: endophage)
2015-11-12 01:09:09 -08:00
Ying Li 5b6f64de4b Refactor notary client tests.
Move common code out into helper functions, and split up the bigger tests
into tests that specifically test adding targets, getting changelists,
publishing, and listing, as opposed to having two giant tests instead.

Also depend more on existing functions in the code (such as
NotaryRepository.GetChangelists and the server ServerMux), rather than
reimplementing them in the tests.

Signed-off-by: Ying Li <ying.li@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Ying Li <ying.li@docker.com> (github: endophage)
2015-11-12 01:09:06 -08:00
Ying Li 2cb072667c Merge pull request #24 from docker/fix-cryptoservice-create-get-key
Fix the problem where root was being searched for in root_keys/repo/####_root.key

Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Ying Li <cyli@users.noreply.github.com> (github: endophage)
2015-11-12 01:09:02 -08:00
Ying Li 2a9e163bd2 Fixed cryptoservice.Create to call keyStore.AddKey with a GUN only if
it is not a root role.

Updated the cryptoservice tests to test all key algorithms, all roles,
and cryptoservices without a GUN.  This then also found bugs in
cryptoservice.GetKey, cryptoservice.RemoveKey, and
cryptoservice.GetPrivateKey, which weren't really being exercised
previously.

Signed-off-by: Ying Li <ying.li@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Ying Li <ying.li@docker.com> (github: endophage)
2015-11-12 01:08:57 -08:00
Diogo Mónica 1230f5a41d Merge pull request #16 from docker/error_cleanup
lots of errors cleanup

Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Mónica <diogo.monica@gmail.com> (github: endophage)
2015-11-12 01:08:51 -08:00
David Lawrence 519a2ccbe8 removing all errors that aren't in use, fixing one place in memorystore that was using a different errorcode to all other stores, pushing errors into appropriate packages
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:08:49 -08:00
Diogo Mónica 7c6cc7d34c Merge pull request #20 from docker/passphrase_messaging
improve password challenge messaging when using yubikey

Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Mónica <diogo.monica@gmail.com> (github: endophage)
2015-11-12 01:08:43 -08:00
David Lawrence bc0c0d4ea1 health check will never be able to get auth token so remove RootHandler wrapper
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:08:41 -08:00
David Lawrence 22244fff65 improve password challenge messaging when using yubikey
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:08:41 -08:00
Diogo Monica 68992ddaf5 Resolving rebase conflicts
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Monica <diogo@docker.com> (github: endophage)
2015-11-12 01:07:09 -08:00
Jessica Frazelle 8902c8c0e9 fix go lint
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Jessica Frazelle <acidburn@docker.com> (github: endophage)
2015-11-12 01:07:05 -08:00
Jessica Frazelle 5f21ebd185 Add pkcs11 build tags
Add build tags and a check in Makefile to be sure you do not import
pkcs11 lib somewhere where it should not be. This will ensure docker
import and integration will continue to work.

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Jessica Frazelle <acidburn@docker.com> (github: endophage)
2015-11-12 01:07:00 -08:00
Jessica Frazelle 913c5ef033 add build tag files for pkcs11 dlopen lib
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Jessica Frazelle <acidburn@docker.com> (github: endophage)
2015-11-12 01:06:51 -08:00
Diogo Monica af1bf0c1d5 Removing debug adding pcs11 to makefiles
Signed-off-by: Diogo Monica <diogo@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Monica <diogo@docker.com> (github: endophage)
2015-11-12 01:06:46 -08:00
Diogo Monica b59225297a Fixing makefile
Signed-off-by: Diogo Monica <diogo@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Monica <diogo@docker.com> (github: endophage)
2015-11-12 01:06:40 -08:00
David Lawrence 07f0065152 ask for pin when signing
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-11-12 01:06:38 -08:00
Diogo Monica 53ed60ed89 Adding mandatory touch for signatures
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Monica <diogo@docker.com> (github: endophage)
2015-11-12 01:06:33 -08:00
Jessica Frazelle 4648666b7c add pkcs11 build tags
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Jessica Frazelle <acidburn@docker.com> (github: endophage)
2015-11-12 01:06:26 -08:00
Diogo Monica 21138e6bad Working version of Notary and Yubikey
Signed-off-by: Diogo Monica <diogo@docker.com>

Remove symlinks from notary-client repo creation

Signed-off-by: Ying Li <ying.li@docker.com>
Signed-off-by: Diogo Monica <diogo@docker.com>

WIP

Signed-off-by: Diogo Monica <diogo@docker.com>

working yubikey integration
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)

Fixing small colon bug

Signed-off-by: Diogo Monica <diogo@docker.com>

Added things. Ship it.

Signed-off-by: Diogo Monica <diogo@docker.com>

Bringing ecdsahwcryptosigner to 2015

Signed-off-by: Diogo Monica <diogo@docker.com>

Working version of notary and yubikey

Signed-off-by: Diogo Monica <diogo@docker.com>
2015-11-12 01:06:09 -08:00
Diogo Monica ae11483a7b initial work on pkcs11 support
Signed-off-by: David Lawrence <david.lawrence@docker.com>

Signed-off-by: Diogo Monica <diogo@docker.com> (github: endophage)
2015-11-12 01:05:55 -08:00
Sven Dowideit a9fda578ee Merge pull request #268 from moxiegirl/docs-structure
Adding in Docs infrastructure
2015-11-11 09:39:49 +10:00
Mary Anthony 3f33c86d98 Adding in Docs infrastructure
Signed-off-by: Mary Anthony <mary@docker.com>
2015-11-10 09:44:45 -08:00
Ying Li 0f3a194cf2 Merge pull request #265 from HuKeping/master
Replace tab with space on script
2015-11-04 18:33:23 -08:00
Hu Keping f8a665cd82 Replace tab with space on script
It may inconsistent on different hosts(8/4 spaces per tab).

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-11-04 10:50:40 +08:00
Diogo Mónica 0b3377a86c Merge pull request #263 from jfrazelle/update-canonical
rebased canonical/json off go 1.5.1
2015-11-03 16:52:32 +00:00
Ying Li 2d8ebb9d4a Merge pull request #264 from jfrazelle/fix-makefile
Fix version in makefile
2015-11-02 22:41:32 -08:00
Jessica Frazelle 412679084a
Fix version in makefile
OLD:
```
jessie at debian in ~/notary on fix-makefile
$ ./bin/notary version
notary
 Version:    '1.0-rc1'
 Git commit: 'ab66379'
```

WITH PATCH:
```
jessie at debian in ~/notary on fix-makefile
$ ./bin/notary version
notary
 Version:    1.0-rc1
 Git commit: ab66379
```

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-02 17:33:33 -08:00
David Lawrence ab6637934d Merge pull request #258 from mtrmac/unused-sha256
Don't compute an unnecessary cryptographic hash
2015-11-02 11:12:39 -08:00
Jessica Frazelle 8e8c2977da
rebased canonical/json off go 1.5.1
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-02 10:26:42 -08:00
Miloslav Trmač 29ae808472 Don't compute an unnecessary cryptographic hash
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2015-11-02 15:27:02 +01:00
Diogo Mónica dfaa8daf9b Merge pull request #255 from mtrmac/no-P224
Don't use elliptic.P224()
2015-11-01 10:32:03 +00:00
Diogo Mónica fd0775e1dc Merge pull request #257 from mtrmac/fix-export-root
Fix (notary key export-root)
2015-11-01 10:31:29 +00:00
Diogo Mónica 75c1b48a58 Merge pull request #260 from cyli/document-require-1.5.1
Update README to reflect go 1.5.1 requirement
2015-11-01 10:21:13 +00:00
Ying Li 07ae585485 Fix dockerfiles to no longer have the "-X ...GitCommit" deprecation warning
Signed-off-by: Ying Li <ying.li@docker.com>
2015-11-01 01:47:55 -07:00
Ying Li 301c0892f3 Update README to reflect go 1.5.1 requirement and add an endpoint
to the makefile to check the go version

Signed-off-by: Ying Li <ying.li@docker.com>
2015-11-01 01:47:02 -07:00
Ying Li fa5c4e608d Merge pull request #256 from mtrmac/fix-import-root
Remove key ID from (notary key import-root)
2015-10-30 13:23:33 -07:00
Ying Li e2c6e989e9 Merge pull request #259 from mtrmac/drop-debug-print
Remove a left-over debugging Println
2015-10-30 13:15:49 -07:00
Miloslav Trmač 40bfc3f890 Don't use elliptic.P224()
This curve is not available on Fedora and RHEL systems, so removing the
reference allows tests to pass there.  Vast majority of the
curve-specific work is done in the golang crypto/elliptic package, so
this does not weaken the tests noticeably.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2015-10-30 20:44:05 +01:00
Miloslav Trmač 62dc66e936 Remove key ID from (notary key import-root)
PR #242 has started requiring a passphrase for the imported key, and
recomputes the key ID, making the command-line argument redundant.  So,
remove it from the command line and from the KeyStoreManager API.

Also updates the comment for KeyStoreManager.ImportRootKey, and changes
(notary key import-root) to refuse unexpected arguments instead of
silently ignoring them.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2015-10-30 20:40:03 +01:00