Commit Graph

642 Commits (v2.0.0-rc.2)

Author SHA1 Message Date
Olivier Gambier 5b23de4177 Merge pull request #865 from stevvooe/next-generation
Integrate auth.AccessController into registry app
2014-12-18 15:04:55 -08:00
Stephen J Day 29d0d2202a Baseline specification from docker/docker#9015
As a baseline for the new registry API specification, we are checking in the
proposal as currently covered in docker/docker#9015. This will allow us to
trace the process of transforming the proposal into a specification. The goal
is to use api descriptors to generate templated documentation into SPEC.md. The
resulting product will be submitted into docker core as part of the client PR.
2014-12-18 14:50:07 -08:00
Stephen J Day d0a9e9b475 Integrate auth.AccessController into registry app
This changeset integrates the AccessController into the main registry app. This
includes support for configuration and a test implementation, called "silly"
auth. Auth is only enabled if the configuration is present but takes measure to
ensure that configuration errors don't allow the appserver to start with open
access.
2014-12-18 12:34:56 -08:00
Stephen Day 3b8847f489 Merge pull request #863 from BrianBland/ng-storagedriver
Fixes filesystem storage driver List semantics for nonexistent directory
2014-12-18 10:47:31 -08:00
Stephen Day e20c6ea4fb Merge pull request #861 from BrianBland/ng-configuration
Genericizes the yaml+environment versioned configuration parser
2014-12-18 10:44:25 -08:00
Stephen Day e847c27b80 Merge pull request #858 from docker/CI
Multi-go test
2014-12-18 10:39:21 -08:00
Brian Bland 030b0ff310 Allows storagedriver parameter values to be of type interface{}
This enables use of nil, booleans, numeric types, and even complex structures for parameter values, assuming they can be parsed from yaml.
2014-12-17 19:06:55 -08:00
Olivier Gambier e600f7ccb7 Erm 2014-12-17 18:14:25 -08:00
Brian Bland bc8ab9b392 Fixes filesystem storage driver List semantics for nonexistent directory
Now returns a PathNotFoundError
2014-12-17 17:00:18 -08:00
Josh Hawn 4c42477abf Refactored out usage of strconv.Quote()
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-17 16:16:02 -08:00
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