Commit graph

1332 commits

Author SHA1 Message Date
Josh Hawn
2e3af8efcf Refactor token verification to support x5c header
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-17 16:12:57 -08:00
Brian Bland
f9b119974d Genericizes the yaml+environment versioned configuration parser
Registry configuration parsing uses the new parser with a single version
declaration and an environment prefix of "REGISTRY"
2014-12-17 14:22:02 -08:00
Stephen Day
3c0dbe2595 Merge pull request #859 from jlhawn/ng_auth_package
Adds auth package with token auth backend
2014-12-17 14:03:30 -08:00
Josh Hawn
b54bf450dc Fixes typo on auth/token VerifyOptions field
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-17 12:16:32 -08:00
Stephen Day
d92a6cc12e Merge pull request #860 from BrianBland/next-generation
Fixes Dockerfile "go get" command
2014-12-17 12:08:54 -08:00
Brian Bland
454d4e918a Fixes Dockerfile "go get" command
Now pulls down all dependencies for registry sub-packages
2014-12-17 12:04:18 -08:00
Josh Hawn
d30a8321d8 Address auth package comments from stevvooe
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-17 11:35:35 -08:00
Stephen Day
b3b5b48b88 Merge pull request #856 from BrianBland/ng-hooks
Adds pre-commit hook, hook config script, and relevant README
2014-12-17 11:11:23 -08:00
Stephen Day
0261fe4e21 Merge pull request #857 from BrianBland/ng-benchmarks
Adds benchmarks for Put/Get, WriteStream/ReadStream, List, and Delete
2014-12-17 11:09:55 -08:00
Josh Hawn
88de2e11fb Refactor auth stringSet into common.StringSet
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-17 10:57:05 -08:00
Josh Hawn
56f685c0dd Adds auth package with token auth backend
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-16 23:14:12 -08:00
Olivier Gambier
26d5bece6b Multi-go test 2014-12-16 16:56:10 -08:00
Brian Bland
a7b8e4fda0 Adds benchmarks for Put/Get, WriteStream/ReadStream, List, and Delete
Also fixes an open fd leak in the filesystem driver that these
benchmarks revealed.
2014-12-16 13:00:29 -08:00
Stephen Day
15ecd3b3e9 Merge pull request #855 from BrianBland/ng-configuration
Allows HTTP bind address to be overridden by an environment variable
2014-12-15 18:27:20 -08:00
Brian Bland
1a6893dbb6 Adds pre-commit hook, hook config script, and a README
The pre-commit hook will automatically gofmt code in place, warning you
about any changes. It will also fail to commit if either golint or go
vet fails.
2014-12-15 18:09:11 -08:00
Olivier Gambier
049bf61912 Fix test 2014-12-15 17:41:30 -08:00
Brian Bland
c51ea97234 Allows HTTP bind address to be overridden by an environment variable
Uses REGISTRY_HTTP_ADDR
2014-12-15 14:17:51 -08:00
Olivier Gambier
a35273a0db Merge pull request #854 from stevvooe/next-generation
NG: Use filesystem driver in default configuration
2014-12-15 13:53:53 -08:00
Stephen J Day
6e846d6b29 Use filesystem driver in default configuration 2014-12-15 11:53:52 -08:00
Olivier Gambier
55b49254a0 Merge pull request #848 from stevvooe/next-generation
Relax requirement for size argument during blob upload
2014-12-13 15:59:04 -08:00
Stephen J Day
fc7b47cdae Port client to use URLBuilder to create urls
This change ports the client use the URLBuilder to create urls. Without this,
it produces broken urls for certain use cases. The client has also been updated
to no longer use the size argument to complete blob uploads. Much of this work
has been done after testing with the staging registry instance.
2014-12-12 19:09:26 -08:00
Stephen J Day
a4f42b8eea Relax requirement for size argument during blob upload
During client implementation, it was found that requiring the size argument
made client implementation more complex. The original benefit of the size
argument was to provide an additional check alongside of tarsum to validate
incoming data. For the purposes of the registry, it has been determined that
tarsum should be enough to validate incoming content.

At this time, the size check is optional but we may consider removing it
completely.
2014-12-12 19:08:50 -08:00
Stephen Day
8fd47c1c18 Merge pull request #849 from BrianBland/ng-error-reporting
Adds bugsnag and newrelic metrics and error reporting
2014-12-12 18:29:25 -08:00
Brian Bland
cd057fd120 Updates configuration tests for bugsnag and newrelic params 2014-12-12 18:05:37 -08:00
Brian Bland
43a50b5e82 Adds bugsnag and newrelic metrics and error reporting
Configuration variables are added under the REGISTRY_REPORTING
namespace, for example REGISTRY_REPORTING_BUGSNAG_APIKEY
2014-12-12 17:49:06 -08:00
Olivier Gambier
d726630ad0 Merge pull request #846 from stevvooe/next-generation
Consolidate routes and error codes into v2 package
2014-12-12 17:17:24 -08:00
Stephen J Day
3916938481 Add tests for URLBuilder 2014-12-12 15:48:41 -08:00
Stephen J Day
bb300231d0 Allow variadic url values for BuildBlobUploadURL
URL values may be required to complete an upload in a single POST request,
which may include digest and size. This is not implemented in the server side,
yet, but is part of the HTTP API specification.
2014-12-12 15:36:16 -08:00
Stephen J Day
d08f0edcf1 Migrate references to consolidated v2 package
Routes and errors are now all referenced from a single v2 package. This
packages exports are acceptable for use in the server side as well as
integration into docker core.
2014-12-12 15:36:15 -08:00
Stephen J Day
5abfc91021 Merge errors and urls package into unified v2 package
To provide a single package with v2 API definitions, the locked down portions
of the API have been merged into a single package. References to exported items
will appear as v2.XXX, indicating their origin. The definitions in this package
will soon be locked down for change, acceppting only additions that will not
change protocol behavior.
2014-12-12 15:36:15 -08:00
Stephen J Day
92dca269f0 Change errors export from Descriptors to ErrorDescriptors 2014-12-12 15:36:15 -08:00
Stephen J Day
e14e5d14b1 Correct documentation errors in urls package 2014-12-12 15:36:15 -08:00
Stephen J Day
83f882b427 Migrate webapp to use exported urls.URLBuilder package 2014-12-12 15:36:15 -08:00
Stephen J Day
9b872ca150 Prepare urls.URLBuilder package for export
The URLBuilder is now exported with documentation for its behavior. Its a light
wrapper around gorilla mux that avoids one having to remember exact arguments
take by each route.
2014-12-12 15:36:15 -08:00
Stephen J Day
e5b6da80d0 Move urls.go into urls package 2014-12-12 15:36:15 -08:00
Stephen J Day
5b13e95511 Porting registry to use urls package
This simply moves the registry app to be using the urls package and its
exported route names. This supports locking down exported route definitions for
use in client packages.
2014-12-12 15:36:15 -08:00
Stephen J Day
da19114d1a Prepare urls package for exports
The route definition files have been prepared for export with documentation.
Consts have been updated and tests are now passing for the urls package.
2014-12-12 15:36:15 -08:00
Stephen J Day
c78d173cf7 Move routes to urls package
To lock down V2 api routing, we are moving it to a separate package, with an
exported router creation function and route names. Updates will follow to
prepare the package for export.
2014-12-12 15:36:15 -08:00
Stephen Day
47324d0398 Merge pull request #844 from BrianBland/ng-storagedriver-tests
Enforces a path format for storage drivers
2014-12-11 20:14:50 -08:00
Brian Bland
5fbf08bab5 Adds tests for storage driver handling of valid and invalid paths 2014-12-11 14:54:04 -08:00
Brian Bland
8a1889efeb Enforces a path format for storage drivers (#819)
Requires all paths in the inmemory and filesystem drivers to begin with
a slash, and then contain only valid path components (2+ alphanumeric
characters with optional period, hyphen, and underscore separators)
delimited by slashes.

Also updates the storage driver test suites to construct paths of this
format, and causes the suite to abort if files are not cleaned up after
the test run.
2014-12-11 14:19:41 -08:00
Olivier Gambier
18ace1f454 Merge pull request #842 from stevvooe/next-generation
Pluralize API methods and add the base endpoint to support API checks
2014-12-11 01:47:21 -08:00
Stephen J Day
76929fb63f Implement V2 API base endpoint
This implements a base endpoint that will respond with a 200 OK and an empty
json response. Such an endpoint can be used as to ping the v2 service or as an
endpoint to check authorization status.
2014-12-10 22:43:45 -08:00
Stephen J Day
2a16a2ff6a Pluralize route API paths
During the specification period, it was suggested that pluralized object names
are more idiomatic in APIs than singular. This changeset simply adopts that
preference for the API going forward. The client has been updated to remain
compatible.
2014-12-10 22:29:58 -08:00
Olivier Gambier
3bbc8ce3c2 Fix address 2014-12-10 17:59:13 -08:00
Stephen Day
a1f74a783a Merge pull request #840 from BrianBland/ng-storagedriver-tests
Increases stress test factor of TestConcurrentFileStreams
2014-12-10 17:38:51 -08:00
Olivier Gambier
500d11564b Merge pull request #841 from stevvooe/next-generation
Export error descriptors and provide tool generate markdown table
2014-12-10 16:54:15 -08:00
Stephen J Day
b721b0a15c Export error descriptors and provide tool generate markdown table
To support accurate specification generation, this changeset includes a quick
and dirty tool to generate a markdown table of error codes generated by the
registry API. Equivalent supports for routes will likely follow.

Exported descriptors could be used to generate other documentation, as well.
2014-12-10 16:41:43 -08:00
Brian Bland
f57e544919 Increases stress test factor of TestConcurrentFileStreams
Also makes this test respect the Short flag, reducing the number of
threads by a factor of 4 and space usage by a factor of 16

Note: this test is probably unreasonable to run on the inmemory driver
without the Short flag
2014-12-10 16:20:14 -08:00
Olivier Gambier
91cea1aa16 Merge pull request #839 from stevvooe/next-generation
Initial Dockerfile for running registry
2014-12-10 16:01:02 -08:00