Riyaz Faizullabhoy
0f39dd7aa8
add GetKeyInfo test for memory store
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:04:04 -07:00
Riyaz Faizullabhoy
97e845e295
AddKey for cryptoservice
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:04:04 -07:00
Riyaz Faizullabhoy
95af5d4800
try cleaning up removekey, debugging tests
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:04:00 -07:00
Riyaz Faizullabhoy
23eb203a63
add key info api, use for passwd
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:03:14 -07:00
Riyaz Faizullabhoy
351b247aec
add tests for initial keystore state, and after removing and adding
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:03:11 -07:00
Riyaz Faizullabhoy
bbaef4faba
Flatten keystore by adding map, simple tests
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-18 11:00:50 -07:00
David Lawrence
127c4f26cf
Merge pull request #620 from endophage/rawmessage_pointer
...
json.RawMessage needs to be a pointer
2016-03-17 09:27:02 -07:00
David Lawrence
f943677613
Merge pull request #623 from docker/vestigial_signatures
...
remove signatures that are no longer valid during signing
2016-03-17 09:26:43 -07:00
Ying Li
71f09691f0
Merge pull request #632 from HuKeping/typo
...
Docs: typo
2016-03-16 20:10:11 -07:00
HuKeping
7f367292eb
Docs: typo
...
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-03-17 10:42:07 +08:00
David Lawrence
e09bdd5630
remove signatures that are no longer valid during signing, either because the key is no longer a valid signing key for the role, or the signature is invalid.
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-03-16 16:03:22 -07:00
David Lawrence
d7857bbf57
Merge pull request #616 from docker/remove-role-fallback
...
Remove delegation role fallback when applying targets changes
2016-03-16 15:56:36 -07:00
Riyaz Faizullabhoy
b65723fce3
Remove mentions of fallback
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-16 15:12:12 -07:00
Riyaz Faizullabhoy
83f7c758ca
Remove delegation role fallback when applying targets changes
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-16 15:12:11 -07:00
Riyaz Faizullabhoy
dda52a3fa1
Merge pull request #631 from docker/add-defaults-to-cache
...
Add defaults to cache-control config parsing
2016-03-16 15:08:30 -07:00
Ying Li
e5b2246004
Update docs with regards to the server configuration
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-16 14:53:42 -07:00
Ying Li
f1d78f8d6e
Add defaults for cache headers, and add tests to ensure that default configs can successfully be parsed
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-16 14:53:41 -07:00
Ying Li
66a39cb30c
Merge pull request #625 from mtrmac/dont-ignore-errors
...
Don't silently ignore swizzler errors
2016-03-16 11:14:38 -07:00
Miloslav Trmač
4898d252ee
Don't silently ignore swizzler errors
...
These calls can fail, and errors would cause false failures later in the
tests.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2016-03-16 18:33:48 +01:00
Riyaz Faizullabhoy
75883b3d4c
Merge pull request #630 from HuKeping/replace
...
Package replace
2016-03-16 09:54:45 -07:00
HuKeping
9cc5a7d9ea
Package replace
...
Replace the use of the "assert" package with the "require" package.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-03-16 16:21:35 +08:00
Riyaz Faizullabhoy
d5671984cf
Merge pull request #571 from docker/cli-server-rotate
...
Change the CLI to be able to rotate server managed keys
2016-03-15 18:50:37 -07:00
Ying Li
44cccbb4db
Make all key rotations publish immediately, not just remote key rotations
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 18:35:30 -07:00
Ying Li
baaa703249
Update advanced usage documentation
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 18:19:13 -07:00
Ying Li
fa5edc40af
Publish only the key rotation changes after a remote key rotation
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 18:17:27 -07:00
Ying Li
4e5e2f386a
Clean up yubikeys between each cmd/notary/keys_test.go test
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 18:17:27 -07:00
Ying Li
b6c4840231
Update comments, and publish in the CLI after remote key rotation
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 18:17:27 -07:00
Ying Li
e3716f0be9
Change the CLI for rotate key to require a role type
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 18:17:27 -07:00
Ying Li
07b9f504e4
Update the CLI and client to no longer reject remote timestamp rotations.
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 18:17:27 -07:00
David Lawrence
33eeb49c25
Merge pull request #626 from docker/use-requires
...
Use 'require' instead of 'assert' in client and TUF client tests
2016-03-15 17:44:22 -07:00
Ying Li
4022e97b08
Use 'require' instead of 'assert' in client and TUF client tests
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-15 13:52:48 -07:00
David Lawrence
c74fab9401
Merge pull request #601 from docker/cache-headers
...
Return cache control headers when returning metadata from server
2016-03-14 17:56:59 -07:00
David Lawrence
751f6b5a26
Merge pull request #622 from docker/snapshot-docs
...
Include note about docker1.11 default snapshot key behavior
2016-03-14 17:39:54 -07:00
Ying Li
e25746dac3
Use a CacheControlHandler that wraps other handlers instead
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:19:13 -07:00
Ying Li
84f5ed28d2
Move the configuration parsing for notary-server to its own file
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
Ying Li
e1397f4b03
Use updated-at for last modification date for getting current metadata
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
Ying Li
329b47d253
Parse for cache control options in the server config file
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
Ying Li
9b022a9cda
Modify server handler to set cache headers based upon a cache configuration object
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
Ying Li
802673fc9d
Add cache control headers to Getting metadata
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
Ying Li
8768c12901
Return the creation date for GetChecksum and GetCurrent from the server database store.
...
Signed-off-by: Ying Li <ying.li@docker.com>
2016-03-14 17:18:18 -07:00
David Lawrence
cd0b43a6b8
Merge pull request #617 from docker/no-keys-canonical-id
...
Message canonical key ids on error
2016-03-14 15:18:46 -07:00
Riyaz Faizullabhoy
b5b3d7c7c8
Include note about docker1.11 default snapshot key behavior
...
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-14 11:44:23 -07:00
David Lawrence
2fd125c489
json.RawMessage needs to be a pointer when embedded in a larger JSON struct to avoid double encoding problems.
...
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-03-11 16:34:16 -08:00
David Lawrence
ca90842799
Merge pull request #593 from HuKeping/add-sha512
...
Add SHA-512
2016-03-11 14:13:14 -08:00
Riyaz Faizullabhoy
571df4ba86
Merge pull request #618 from HuKeping/tiny
...
Tiny refactor
2016-03-11 11:28:27 -08:00
HuKeping
2136ca54ba
[MISC 4/4] distinguish nil and empty map
...
Since the function len(X) will return 0 no matter X is nil or
an empty map.
We should distinguish that.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-03-11 17:24:47 +08:00
HuKeping
9501cddc1d
[MISC 3/4] Refactor: move test helper function to test package
...
The helper function "GetSupportedHashes" is only used in tests,
it's better to move it to the relevant test file.
Since it's for the test, remove the origin test code for it.
And it also a good idea to call "NewfileMeta" instead of implement
once again.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-03-11 17:24:43 +08:00
HuKeping
30c9cfc113
[MISC 2/4] Constant: use constant instead of some literal string
...
Replace the "sha256" by the constant defined in the notary-const file.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-03-11 16:44:14 +08:00
HuKeping
6cd6b4726c
[MISC 1/4] Tiny refactor
...
Reduce function "snapshotExpired" in a simpler form and replace the
literal string by the constants defined in the data package.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-03-11 16:43:44 +08:00
HuKeping
7e1a9947de
Tiny refactor
...
If we can use a simple name for the local variable.
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-03-11 14:11:27 +08:00