1
0
mirror of https://github.com/docker/docs.git synced 2026-10-31 10:34:26 +03:00
Commit Graph

1290 Commits

Author SHA1 Message Date
Riyaz Faizullabhoy
a052d9e105 client library for retrieving keys and signatures for all roles
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-01-20 12:00:09 -08:00
Diogo Mónica
60e6d254b3 Merge pull request #477 from docker/swizzler
Update tests while messing up metadata
2016-01-20 11:05:34 -08:00
Ying Li
df53f51b0b Refactor swizzler to not produce a repo itself, but to just take some initial metadata.
Updated the testutils/repo.go utility to be able to produce a repository with delegations
and to export metadata from said repo instead.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-20 10:02:14 -08:00
Ying Li
3c72ef762b Merge pull request #482 from docker/random-lint-fix
Add some comments about the notary constants, and other lint fixes.
2016-01-19 23:39:11 -08:00
Diogo Mónica
b6b5acb0a1 Merge pull request #469 from endophage/fixing_468
Offline operation when server not reachable
2016-01-19 17:18:19 -08:00
Ying Li
1404aa9dad Remove client update tests for which it seems like the user is actively sabotaging themselves.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 16:32:34 -08:00
Ying Li
edc30ffdb9 Skip the longer client update tests if testing in short mode.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 16:28:52 -08:00
Ying Li
ea0a64eeab Add a few tests for updating when the local repo is corrupt.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 16:28:52 -08:00
Ying Li
4838a90640 Refactor metadata changers into a helper fuzzer object in testutils package.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 16:27:01 -08:00
Ying Li
6f2e851b29 Merge pull request #479 from docker/remove_to_lower
Do not lowercase role names when adding a change
2016-01-19 16:22:41 -08:00
Ying Li
2ff7bf6375 Add some comments about the notary constants, and other lint fixes.
It seems that `make vet` sometimes disagrees locally vs on CircleCI.  This
just fixes my local `make vet` complaints.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 15:55:47 -08:00
David Lawrence
33fee1d356 test for returning nil roundtripper from tokenAuth
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-19 15:47:12 -08:00
David Lawrence
46682b71eb if we can't connect to the server when setting up, return a nil roundtripper. Check roundtripper when initializing HTTPStore and substitute an OfflineStore if it is nil.
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-19 14:34:50 -08:00
Ying Li
a3b9a5543f Do not lowercase role names when adding a change
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 14:32:00 -08:00
Ying Li
4f8d28ad7f Add tests for updating replacing corrupted local cache
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 14:07:46 -08:00
Ying Li
b4d3ac881d Add a RemoveMeta function to the MetadataStore interface (useful for testing).
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-19 14:07:29 -08:00
Ying Li
cf0bb5a9be Merge pull request #440 from docker/diogo-cli-adding-delegations
delegation command for notary-cli
2016-01-19 13:54:56 -08:00
Riyaz Faizullabhoy
732b85008e Merge pull request #454 from docker/delete-repo-data
client library and cli deletion functionality
2016-01-19 13:38:45 -08:00
Riyaz Faizullabhoy
ca67f1e71a client library deletion functionality, and integration into remove cert
CLI

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-01-19 11:18:33 -08:00
Ying Li
8dac9fd0cd Merge pull request #478 from HuKeping/minor
Comments: minor typo
2016-01-19 09:46:56 -08:00
HuKeping
b044b65f4b Comments: minor typo
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-01-19 20:33:36 +08:00
Riyaz Faizullabhoy
138d6cea09 Add, remove, and list delegation command. TUF changelist action change
for deletions (force vs. individual items)
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-01-18 16:24:45 -08:00
Diogo Mónica
e451f635e8 Merge pull request #471 from docker/test_repo_root_cert
Change testutils.EmptyRepo() to use a cert as the root.json root key.
2016-01-18 14:14:06 -08:00
Ying Li
200fefbff8 EmptyRepo needs to take a GUN in order to generate a valid cert.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-18 10:46:06 -08:00
David Lawrence
560ffd0483 Merge pull request #472 from HuKeping/timestamp2snapshot
Fix a wrong function call
2016-01-18 10:01:32 -08:00
Ying Li
aaefd545cf Merge pull request #473 from HuKeping/consistent
Keep a consistent coding style
2016-01-18 09:56:44 -08:00
HuKeping
fdc0f04268 Keep code style consistent
GetLeafCerts and GetIntermediaCerts are similiar and a consistent
implementation will be more friendly to those people who wants to read
the code.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-01-18 19:58:02 +08:00
HuKeping
ef3932d6b1 Fix a wrong function call
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-01-18 19:27:28 +08:00
Diogo Mónica
5b90639f75 Merge pull request #465 from docker/test_dropping_keys_in_tufkeys
Test dropping keys in tuf_keys
2016-01-15 19:11:26 -08:00
Ying Li
0bbf979cf4 Change testutils.EmptyRepo() to use a cert as the root.json root key.
This involves making it use ECDSA keys since we can't generate ED25519 certs.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-15 19:11:17 -08:00
Ying Li
dd0223f7cf Fix pretty-print keys to not print "." if there is no GUN.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-15 18:54:47 -08:00
Ying Li
877d47bb5c Add tests to ensure you can just drop a key in tuf_key and use it for signing.
This is important for user keys, which do not necessarily need to be under a GUN,
and may have a role other than one of the canonical roles (e.g. "user" role).

Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-15 18:54:41 -08:00
David Lawrence
c44de7e37a Merge pull request #415 from endophage/cleaning_certs_code
some cleanup of certs code
2016-01-15 13:40:11 -08:00
David Lawrence
c0fb05584e fixing incorrect comments
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-15 11:30:32 -08:00
David Lawrence
9e80ad8158 remove certs.NewManager function
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-15 11:30:32 -08:00
David Lawrence
a8b21cafe0 CertManager is completely removed
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-15 11:30:32 -08:00
David Lawrence
78fb3eef7f trustedCAStore isn't being used anywhere, deleted it
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-15 11:30:32 -08:00
David Lawrence
48ecd8d2cb some cleanup of certs code
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-15 11:30:32 -08:00
Diogo Mónica
503a2cfe3c Merge pull request #460 from docker/fixing-migrations
Fixing initial.sql syntax
2016-01-14 18:19:45 -08:00
Diogo Monica
14b8bc8098 Fixing initial.sql syntax
Signed-off-by: Diogo Monica <diogo@docker.com>
2016-01-14 18:16:51 -08:00
Diogo Mónica
a7804cb280 Merge pull request #441 from docker/expose-old-version-err
Pass original invalid version storage error details into standardized err
2016-01-14 16:51:11 -08:00
Diogo Mónica
c6b8456b01 Merge pull request #457 from docker/error-messages-fix
Translate ErrMetaNotFound when updating, so long as it's on root, to ErrRepositoryNotExist
2016-01-14 16:48:53 -08:00
Ying Li
d4820c5756 Translate ErrMetaNotFound when updating, so long as it's on root, to ErrRepositoryNotExist.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-14 15:27:11 -08:00
Ying Li
94c3c31f36 Merge pull request #453 from docker/fix-resign-root-on-publish
Ensure that we do not unnecessarily re-sign/serialize a root.json file on publish
2016-01-14 14:58:50 -08:00
Diogo Mónica
91bd1bff1d Merge pull request #456 from HuKeping/client
Improve client logging
2016-01-14 14:55:27 -08:00
Ying Li
c65fc03ef9 Update test to make x509 keys start a day in the past.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-14 14:15:38 -08:00
Ying Li
f57f2beb08 Factor marshalling a SignedRoot into JSON into TUF/data/root.go, and
add an injectable serializer (so we can test JSON marshalling/unmarshalling
error propagation).

Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-14 10:51:24 -08:00
Ying Li
b74f1835b7 Ensure that we do not unnecessarily re-sign/serialize a root.json file on publish
Adds additional tests to ensure that keys aren't unnecessarily created on error,
and that only the required keys to sign are used.

Signed-off-by: Ying Li <ying.li@docker.com>
2016-01-14 10:51:24 -08:00
Diogo Mónica
e548503560 Merge pull request #455 from docker/fix-yubikey-tests
Fix bug where the yubikey store was not prioritized over the filestore in a client repo.
2016-01-14 10:11:20 -08:00
Riyaz Faizullabhoy
8d0ff6c996 Pass original invalid version storage error details into standardized errors
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-01-14 09:57:36 -08:00