1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00
Commit Graph

447 Commits

Author SHA1 Message Date
Riyaz Faizullabhoy
01bbd532c6 Update update logic to error out on corrupted previous root metadata
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-26 16:59:22 -07:00
Ying Li
be82a0a5f4 Merge pull request #687 from cyli/error-refactor
Remove a redundant ErrChecksumMismatch error in tuf/client
2016-04-20 16:57:01 -07:00
Ying Li
053c2a5a79 Remove a redundant ErrChecksumMismatch error in tuf/client, since we
already have a ErrMismatchedChecksum in tuf/data/errors.

Also, have the CheckHashes function take a role name so that the
ErrMismatchedChecksum error can include the role name.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-20 11:08:03 -07:00
HuKeping
be03c1a9dc Add some test
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 20:48:02 +08:00
HuKeping
b3686803c1 Pass to components exactly what they want instead of using global variable
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 20:46:23 +08:00
HuKeping
3f1806d70b Move helper function bootstrap to its own file
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 20:28:59 +08:00
HuKeping
ae889ad37a Move the configuration for TLS to its own file.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 20:25:17 +08:00
HuKeping
8725f6a4c7 Move the configuration for API servers to its own file.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 20:18:02 +08:00
HuKeping
3501c0edf5 Move the setUpCryptoservices to its own file.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 20:06:51 +08:00
HuKeping
a80c539ce8 Move the passphraseRetriever to its own file.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 19:42:38 +08:00
HuKeping
dc147d12c4 Add a source file to hold the configuration things for signer
Let's name it config.go

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-20 19:42:38 +08:00
Ying Li
1367311d41 Update client warning to be more clear about why you need to keep your root key past initial root rotation.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-19 15:14:14 -07:00
Ying Li
0f5a40e591 Use askConfirm rather than processing 'yes' or 'no' input manually everywhere.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-19 15:14:14 -07:00
Ying Li
2c26ccb118 Warn users before they rotate the root key with the CLI
Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-19 15:14:14 -07:00
Riyaz Faizullabhoy
8d357d44cd Error unit tests for bad cli input, include trustpinning merge
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 13:59:58 -07:00
Riyaz Faizullabhoy
26c1ce1865 Include addhash command in config and insufficient arg tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 13:39:26 -07:00
Riyaz Faizullabhoy
1abf013e69 Add positive integration test
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 13:39:26 -07:00
Riyaz Faizullabhoy
2f7d8f9774 addhash command with multihash functionality
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 13:39:26 -07:00
Riyaz Faizullabhoy
94a2e3a741 Change config to disable_tofu instead of tofu
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 11:01:56 -07:00
Riyaz Faizullabhoy
8c9424f051 Allow for multiple pinned certs per gun
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 11:01:55 -07:00
Riyaz Faizullabhoy
60faca0661 Use most specific CA prefix for pinning
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 11:01:55 -07:00
Riyaz Faizullabhoy
c2f5753630 Update CA pinning logic to include intermediates, add positive test case
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 11:01:55 -07:00
Riyaz Faizullabhoy
2d065f241d Change config parsing, add helpers to clean up config usage
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 11:01:55 -07:00
Riyaz Faizullabhoy
7d6fdc08cd Update function description for expected behavior, groundwork for config
in validation

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-19 11:01:54 -07:00
David Lawrence
3e5d6d1f31 review from Hukeping
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-04-18 20:57:45 -07:00
Riyaz Faizullabhoy
b04a5c00e0 Add more tests and restructure
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-15 10:25:22 -07:00
Riyaz Faizullabhoy
f3854dc390 Add unit tests, remove auth key, cleanup
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:05 -07:00
David Lawrence
92c17b754c make notary-signer tests work and add test for signer bootstrap
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-04-14 19:38:04 -07:00
David Lawrence
33f5255c8d need a passthrough bootstrap on TufMetaStore
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-04-14 19:38:03 -07:00
Riyaz Faizullabhoy
67d1847cb3 Remove authkey usage
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:03 -07:00
Riyaz Faizullabhoy
d86227642a Add bootstrapper for signer
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:03 -07:00
Riyaz Faizullabhoy
d95891e54f Caching logic for TufMetaStorage
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:02 -07:00
David Lawrence
b196a803e2 updating use of indices and queries
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-04-14 19:38:02 -07:00
Riyaz Faizullabhoy
30f356f940 Use consistent meta storage for server binary
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:02 -07:00
Riyaz Faizullabhoy
f8a67f8af0 Add rethink init for signer config
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-14 19:38:02 -07:00
David Lawrence
b8c62731a6 adding bootstrapping and config update for notary server
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-04-14 19:38:02 -07:00
David Lawrence
045721250f rethink server implementation
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-04-14 19:38:02 -07:00
Ying Li
cea46f7c3e Change root cert rotation to be root key rotation instead
Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-13 22:12:53 -07:00
Ying Li
54d1cb1855 Revert "Implement new (notary cert rotate) command."
This reverts commit 684c17867740e77460f2940d3d76023f7a9647ed, and extra cert rotate test changes

Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-13 11:48:36 -07:00
Miloslav Trmač
5a14044574 Implement new (notary cert rotate) command.
This is a trivial wrapper around the NotaryRepository functionality. The
UI is simplest possible, a single (notary cert rotate) rotates all
certificates.

This handles the common case (only a single certificate)
perfectly

If there were multiple certificates, rotating all of them
regardless of age does not really hurt; we can easily extend this to
give the user more control (having the user specify a cert ID, for
example) later if necessary.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2016-04-13 11:48:36 -07:00
Ying Li
cf4e726514 "make lint" wasn't actually linting every file in the repo. golint ./...
ignores buildtags, for instance, and somehow didn't pick up some code in
the signer.

This calls golint on every go file in the repo and also fixes some linting
issues, which involves renaming two yubikey functions to avoid stuttering.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-12 22:28:32 -07:00
Ying Li
bc4e8a0f9e Change the HTTP server returned by signer config to be a pointer
Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-11 14:31:41 -07:00
Ying Li
77b33cf10f Add the buildtags to go list ./... in the Makefile, signer should not be pkcs11
Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-11 13:25:23 -07:00
HuKeping
31851edf81 Kind of cleanup
Move the configuration parsing for notary-server to its own file.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-08 09:28:02 +08:00
Riyaz Faizullabhoy
cb6bf2e1a2 Update assert to require for cmd
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-04 12:05:04 -07:00
David Lawrence
2e70ce0b3b Merge pull request #641 from docker/one-key-per-line
Print one key and/or path per line when listing delegations
2016-03-22 14:48:29 -07:00
Riyaz Faizullabhoy
d1dbc3dbd4 Add delegation passphrase env var
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-22 10:09:38 -07:00
Riyaz Faizullabhoy
731710f628 Print one key and/or path per line when listing delegations
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 16:54:07 -07:00
Riyaz Faizullabhoy
c54183bc27 Add error case to keyInfo generation, test yubikey backup, fix rebase conflicts
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:35:34 -07:00
Riyaz Faizullabhoy
e1613cdcb2 Address review comments
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:31:07 -07:00