Commit Graph

807 Commits

Author SHA1 Message Date
Ying Li 75516a1e84 Add the CheckHealth implementations to the RPC servers, go fmt some other files
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-07 20:51:53 -07:00
Ying Li 701e5df79e Change the rpc Server objects to take a function that can check health
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-07 18:12:51 -07:00
Ying Li 74a5b1b541 Change the signer protocol to include a health check
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-07 18:12:23 -07:00
Ying Li a67ed67bdc Add a health check function for the key DB store that verifies we can access the required table
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-07 16:31:24 -07:00
cyli 3e60d0acd5 Move the skipTLSVerify information to Configure Notary Server.
Signed-off-by: cyli <cyli@twistedmatrix.com>
2015-10-05 16:07:33 -07:00
cyli c188fc18bc Add prerequisites section to Using Notary and Compiling Notary Server.
Signed-off-by: Ying Li ying.li@docker.com
2015-10-05 14:30:57 -07:00
cyli 331cd799c4 Include basic setup instructions on how to compile notary applications. 2015-10-05 13:50:43 -07:00
cyli 684a8253fb Provide the default uesrname/password in the mysql start file, for ease of starting with notary
As per #75, the default username/password should not be hardcoded, so when that changes this README should also change
2015-10-05 12:08:24 -07:00
Viktor Stanchev cd77fe8737 Mention how to connect to local notary in README
Signed-off-by: Viktor Stanchev <me@viktorstanchev.com>
2015-10-05 11:16:30 -07:00
moxiegirl 1ce6aa4c34 Merge pull request #196 from ggtools/birthday-pr
Minor improvements on server url
2015-09-24 17:15:01 -07:00
Diogo Mónica add67a3213 Merge pull request #195 from jbeda/master
Make static cross darwin builds work
2015-09-20 14:23:52 -07:00
Christophe Labouisse be6813ed43 Add documentation for environment variable. 2015-09-20 19:26:33 +02:00
Christophe Labouisse f9508e37e0 Add env var for default server url
The default server URL can now be set using the `NOTARY_SERVER_URL`
environment variable. Specifying the `--server` parameter still
override this value.

Signed-off-by: Christophe Labouisse <christophe@labouisse.org>
2015-09-19 17:25:12 +02:00
Christophe Labouisse 36594b360c Add missing --server option to verify.
Verify was making call to the server but didn't have a way to
override the default value.

Signed-off-by: Christophe Labouisse <christophe@labouisse.org>
2015-09-19 17:15:08 +02:00
Joe Beda f7d0ea70af Use pure-go library to get user home directory.
Fixes #194.

Signed-off-by: Joe Beda <joe.github@bedafamily.com>
2015-09-10 16:07:38 -07:00
Joe Beda 87b1b2efbc Add new dependency: github.com/mitchellh/go-homedir
Signed-off-by: Joe Beda <joe.github@bedafamily.com>
2015-09-10 16:07:38 -07:00
David Lawrence ac05822d7d Merge pull request #182 from jfrazelle/change-canonical-json-dep
LGTM
2015-09-04 11:22:11 -07:00
Jessica Frazelle 74b4ef064c change canonical json package
update godeps for gotuf and canonical json

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-03 20:11:49 -07:00
David Williamson 910e0e7686 Merge pull request #191 from davidwilliamson/File-Changelist-Iterator
Add ChangeIterator interface for Changelists
2015-08-31 13:37:56 -07:00
David Williamson 83d0d8657f Add ChangeIterator interface for Changelists
+ Ref https://github.com/docker/notary/issues/144
    + Create ChangeIterator interface
    + Implement ChangeIterator interface for memChangeList
    + Implement ChangeIterator interface for fileChangeList
    + Add iterator test case to changelist_test
    + Add iterator test case to file_changelist_test
    + Change func applyChangelist to use iterator per PR comment
    + Remove redundant defer statement in file_changelist_test.go (PR comment)
    + Change Next error check to simple array bounds check (PR comment)
    + Add negative unit test cases to increase code coverage

Signed-off-by: David Williamson <david.williamson@docker.com>
2015-08-30 14:19:00 -07:00
David Lawrence 1592ff3527 Merge pull request #188 from endophage/notary-cli-auth
Notary cli auth
2015-08-28 14:21:29 -07:00
David Lawrence 2532363fa3 wrapping up token authentication
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-08-19 14:36:30 -07:00
Derek McGowan a5aea53ef5 Add username and password prompt
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-08-19 13:48:16 -07:00
Derek McGowan 16ff63599d Updated notary cli to use authenticated transport
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-08-19 13:48:16 -07:00
Derek McGowan e50e750fb0 Update vendor to add distribution client authentication
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-08-19 13:48:16 -07:00
David Lawrence 1c4d5a65ff Merge pull request #189 from docker/auth-context
Don't blindly overwrite ctx with result of Authorized
2015-08-19 13:48:02 -07:00
Aaron Lehmann 234c510096 Don't blindly overwrite ctx with result of Authorized
If Authorized returns an error, it returns nil for ctx. This means the
deferred function will dereference a nil pointer.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-08-17 15:42:32 -07:00
Nathan McCauley df079a3e27 Merge pull request #184 from docker/mccauley/update-readme
Update README
2015-08-11 23:28:08 -07:00
Nathan McCauley bbe780fba1 Update README
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-08-11 23:26:49 -07:00
David Lawrence e7853ea008 Merge pull request #183 from tonistiigi/passphrase-msg
Update passphrase error message
2015-08-11 14:20:16 -07:00
Tonis Tiigi 59c063b8fe Update passphrase error message
Let the user know why passphrase wasn’t accepted.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-08-10 12:44:30 -07:00
Diogo Mónica 52b064b6a6 Merge pull request #174 from docker/logging
Change logging to use contexts effectively
2015-08-10 10:31:21 -07:00
Diogo Mónica 33b77ea733 Merge pull request #175 from endophage/get_remote_err
check error in initializing remote store
2015-08-10 10:30:08 -07:00
Diogo Mónica aad4a2b5ff Merge pull request #177 from docker/import-export-symlinks
Import and export symlinks in keystore
2015-08-10 10:29:47 -07:00
Diogo Mónica f8bf396991 Merge pull request #179 from jfrazelle/fix-the-freaking-makefile
fix makefile
2015-08-10 10:13:40 -07:00
Nathan McCauley bf2831f3a5 Merge pull request #178 from endophage/server_validation
server side validation during updates
2015-08-07 10:49:23 -07:00
Nathan McCauley 710f7a6560 Merge pull request #166 from jfrazelle/static-binaries-for-the-static-binaries-gods
compile the notary server binary statically
2015-08-07 00:27:16 -07:00
David Lawrence 6616bed616 validation tests
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-08-06 17:38:37 -07:00
Jessica Frazelle f5df60b280 fix makefile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-08-05 17:54:11 -07:00
David Lawrence 0ece438313 server side validation during updates
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-08-05 14:00:07 -07:00
Aaron Lehmann ec3167eedb Import and export symlinks in keystore
- Export symlinks by encoding them in the zip file.

- Detect symlinks in a zip file on import and create them on the local
  filesystem.

- Add test coverage.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-08-03 15:03:31 -07:00
David Lawrence 8e8122eb55 Merge pull request #176 from dmcgowan/update-copyright
Update license to set copyright holder
2015-07-31 17:22:21 -07:00
Derek McGowan 3b7d420f98 Update license to set copyright holder
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-31 16:27:40 -07:00
David Lawrence 3794dbf28e check error in initializing remote store
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-31 16:20:17 -07:00
Aaron Lehmann a833f055e2 Change logging to use contexts effectively
Use the github.com/docker/distribution/context package to get a logger
that adds a unique ID and useful information about each HTTP request.

Use this logger in HTTP handlers instead of using logrus or the log
package directly.

Remove [Notary Server] and [Notary Signer] prefixes from log messages.

The distribution/context package was already vendored, so there are no
Godeps changes necessary.

Sample output:

    notaryserver_1 | time="2015-07-31T23:02:01Z" level=debug msg="retrieving timestamp key for docker.com/docker"
    notarysigner_1 | time="2015-07-31T23:02:01Z" level=debug msg="generated ECDSA key with keyID: ea89e7dc49a13feab1e5ed349760b148c3c6ebd86968b2bc6cb0d003a8b79f78"
    notarysigner_1 | time="2015-07-31T23:02:01Z" level=debug msg="generated new ecdsa key for role:  and keyID: ea89e7dc49a13feab1e5ed349760b148c3c6ebd86968b2bc6cb0d003a8b79f78"
    notarysigner_1 | time="2015-07-31T23:02:01Z" level=info msg="CreateKey: Created KeyID ea89e7dc49a13feab1e5ed349760b148c3c6ebd86968b2bc6cb0d003a8b79f78"
    notaryserver_1 | time="2015-07-31T23:02:01Z" level=debug msg="Creating new timestamp key for docker.com/docker. With algo: ecdsa"
    notaryserver_1 | time="2015-07-31T23:02:01Z" level=debug msg="Inserting timestamp key for docker.com/docker"
    notaryserver_1 | time="2015-07-31T23:02:01Z" level=debug msg="200 GET timestamp key" docker.com/docker=gun http.request.host="192.168.99.100:4443" http.request.id=a720da02-4312-48ae-b122-6d4bce9d3b20 http.request.method=GET http.request.remoteaddr="192.168.99.1:58178" http.request.uri="/v2/docker.com/docker/_trust/tuf/timestamp.key" http.request.useragent="Go 1.1 package http"
    notaryserver_1 | time="2015-07-31T23:02:01Z" level=info msg="response completed" http.request.host="192.168.99.100:4443" http.request.id=a720da02-4312-48ae-b122-6d4bce9d3b20 http.request.method=GET http.request.remoteaddr="192.168.99.1:58178" http.request.uri="/v2/docker.com/docker/_trust/tuf/timestamp.key" http.request.useragent="Go 1.1 package http" http.response.duration=29.703624ms http.response.status=200 http.response.written=181

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 16:06:56 -07:00
Diogo Mónica 864c3f05c9 Merge pull request #168 from jfrazelle/add-version-to-server-and-signer
add version to signer and server logs for debugging and issues
2015-07-31 15:45:05 -07:00
Jessica Frazelle 95cdfbeb58 add version to signer and server logs for debugging and issues
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-07-31 15:17:42 -07:00
Aaron Lehmann 1c4d74e746 Merge pull request #171 from endophage/url_matching
can't be so restrictive on notary's GUN matching in URLs
2015-07-31 14:53:41 -07:00
David Lawrence efda5034d9 can't be so restrictive on notary's GUN matching in URLs
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-31 14:38:24 -07:00
Diogo Mónica ed14cf2001 Merge pull request #173 from dmcgowan/fix-notary-godep
Update notary godeps
2015-07-31 14:32:00 -07:00