Commit graph

2271 commits

Author SHA1 Message Date
Stephen Day
48294d928c Merge pull request #2343 from stevvooe/prepare-2.6.2
[release/2.6] release: prepare for 2.6.2 release
2017-07-20 14:12:45 -07:00
Stephen J Day
04ce68659d
release: prepare for 2.6.2 release
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-20 14:12:13 -07:00
Stephen Day
c829241c21 Merge pull request #2341 from stevvooe/limit-payload-size-26
[release/2.6] registry/{storage,handlers}: limit content sizes
2017-07-20 13:53:59 -07:00
Stephen J Day
29fa466deb
registry/{storage,handlers}: limit content sizes
Under certain circumstances, the use of `StorageDriver.GetContent` can
result in unbounded memory allocations. In particualr, this happens when
accessing a layer through the manifests endpoint.

This problem is mitigated by setting a 4MB limit when using to access
content that may have been accepted from a user. In practice, this means
setting the limit with the use of `BlobProvider.Get` by wrapping
`StorageDriver.GetContent` in a helper that uses `StorageDriver.Reader`
with a `limitReader` that returns an error.

When mitigating this security issue, we also noticed that the size of
manifests uploaded to the registry is also unlimited. We apply similar
logic to the request body of payloads that are full buffered.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 55ea440428)
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-20 13:37:43 -07:00
Derek McGowan
42ea75ca2d Merge pull request #2284 from mstanleyjones/release/2.6
Put architecture.md back into distribution repo
2017-05-23 13:10:44 -07:00
Misty Stanley-Jones
ed2b6867b2 Put architecture.md back into distribution repo
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-05-23 11:26:12 -07:00
Derek McGowan
a25b9ef0c9
Update changelog for 2.6.1
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-04-05 16:18:07 -07:00
Derek McGowan
0d39820aa7 Update changelog for 2.6.1-rc2
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-21 13:13:43 -07:00
yixi zhang
abf796d17c
Use app.driver.Stat for registry health check
`app.driver.List` on `"/"` is very expensive if registry contains significant amount of images. And the result isn't used anyways.
In most (if not all) storage drivers, `Stat` has a cheaper implementation, so use it instead to achieve the same goal.

Signed-off-by: yixi zhang <yixi@memsql.com>
2017-03-21 13:11:58 -07:00
Derek McGowan
74278cdaa6 Update release notes for 2.6.1-rc1
Release notes for forwarded header fix patch release

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-21 10:49:45 -07:00
Derek McGowan
5c43c3b0ee
Remove support for X-Forwarded-Port
Partially reverts change adding support for X-Forwarded-Port.
Changes the logic to prefer the standard Forwarded header over
X-Forwarded headers. Prefer forwarded "host" over "for" since
"for" represents the client and not the client's request.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-20 17:02:58 -07:00
Troels Thomsen
d0b7c92004
Add test for precendence with standard port
Signed-off-by: Troels Thomsen <troels@thomsen.io>
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-20 17:01:36 -07:00
Derek McGowan
325b0804fe
Update release notes for 2.6
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-17 17:15:28 -08:00
Derek McGowan
1642cd85d5 Merge pull request #2123 from mstanleyjones/configuration_changes_backport_2.6
Backport #2116 to releases/2.6
2017-01-03 19:42:42 -08:00
Misty Stanley-Jones
7f3c4b5c65 Improve formatting of configuration.md
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 6ee03f5da7)
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-01-03 15:57:35 -08:00
Joao Fernandes
df1ddd8e46 Format configuration.md with code fences to avoid render issues
Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
2017-01-03 15:13:22 -08:00
Derek McGowan
0241c48be5
Release notes for v2.6.0-rc2
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-20 15:42:12 -08:00
Derek McGowan
438b8a1d4e
Update registry server to support repository class
Use whitelist of allowed repository classes to enforce.
By default all repository classes are allowed.

Add authorized resources to context after authorization.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-20 15:42:12 -08:00
Derek McGowan
4d0424b470
Update contrib token server to support repository class
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-20 15:42:11 -08:00
Derek McGowan
07d2f1aac7
Add class to repository scope
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-20 15:42:11 -08:00
Derek McGowan
f982e05861
Update scope specification for resource class
Update grammar to support a resource class. Add
example for plugin repository class.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-20 15:42:11 -08:00
Derek McGowan
74c5c2fee4
Remove newlines from end of error strings
Golint now checks for new lines at the end of go error strings,
remove these unneeded new lines.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-20 15:42:11 -08:00
Richard Scothern
e249b61e90 Merge pull request #2059 from RichardScothern/2.6-release-notes
Release notes for v2.6.0-rc1
2016-11-11 12:03:20 -08:00
Richard Scothern
ff9533dd6f Release notes for v2.6.0-rc1
Signed-off-by: Richard Scothern <richard.scothern@docker.com>
2016-11-11 11:54:35 -08:00
Richard Scothern
cb98aa744b Merge pull request #2060 from RichardScothern/release-prep
Release preperation: update AUTHORS and version file
2016-11-11 10:28:15 -08:00
Richard Scothern
cb2c78ce9b Release preperation: update AUTHORS and version file
Signed-off-by: Richard Scothern <richard.scothern@docker.com>
2016-11-11 09:23:05 -08:00
Derek McGowan
9cc7c94e4e Merge pull request #2052 from RichardScothern/fix-links
Fix storage driver links
2016-11-11 09:05:44 -08:00
Richard Scothern
6e62b39842 Merge pull request #2036 from pyr/fix/sort-v2-headers
v2 signer: correctly sort headers
2016-11-10 15:31:24 -08:00
Derek McGowan
8016d2d890 Merge pull request #2053 from dmcgowan/add-trim-name
Add trim name method helper to create name only references
2016-11-10 15:03:34 -08:00
Derek McGowan
31a91e419c
Add trim name method helper to create name only references
Add a simple helper to create name only references without having
to first get the name as a string and reparse. This method does
not fail so ignoring or checking error to simply trim reference
is not required.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-10 14:46:04 -08:00
Richard Scothern
4d65dd513e Merge pull request #2038 from spacexnice/master
fix: oss driver would get connection reset by peer when upload large image layer.
2016-11-10 14:44:32 -08:00
Richard Scothern
09b2d06d5d Fix storage driver links
Signed-off-by: Richard Scothern <richard.scothern@docker.com>
2016-11-10 14:28:28 -08:00
Stephen Day
4ad885a672 Merge pull request #2051 from vieux/update_plugin_media_typev1
switch to v1 and remove .image
2016-11-10 11:49:48 -08:00
Victor Vieux
b82a2efc33 switch to v1 and remove .image
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 11:39:15 -08:00
Derek McGowan
ac0493db12 Merge pull request #2040 from RichardScothern/release-checklist
Document registry release process
2016-11-10 10:33:30 -08:00
Derek McGowan
717134d7c2 Merge pull request #2048 from dmcgowan/use-api-errors
Update oauth errors to use api errors
2016-11-09 20:27:40 -08:00
Derek McGowan
051801f1d0
Update oauth errors to use api errors
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-09 19:29:18 -08:00
Stephen Day
26c9a77535 Merge pull request #2039 from vdemeester/add-match-support-to-reference
Add a new Match method to the reference package
2016-11-09 18:49:21 -08:00
Stephen Day
e04e6ddd2c Merge pull request #2047 from dmcgowan/fix-authorization-error
Add OAuth error for client
2016-11-09 18:03:38 -08:00
Derek McGowan
16396a7a80
Add OAuth error for client
Allow clients to handle errors being set in the WWW-Authenticate
rather than in the body. The WWW-Authenticate errors give a
more precise error describing what is needed to authorize
with the server.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-09 15:27:40 -08:00
Derek McGowan
a1a73884f9
Refactor authorization challenges to its own package
Split challenges into its own package. Avoids possible
import cycle with challenges from client.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-09 15:27:40 -08:00
Vincent Demeester
353e3a4c9d
Add a new Match method to the reference package
The Match method allows to see if a reference matches a specified
patterns.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-09 22:04:52 +01:00
Derek McGowan
02f4195788 Merge pull request #2044 from aaronlehmann/preserve-tag-and-digest
digest: Preserve tag and digest in With* functions
2016-11-08 15:10:22 -08:00
Aaron Lehmann
bc1e7aa603 digest: Preserve tag and digest in With* functions
When WithDigest is called on a reference that has a tag, it should
preserve the tag.

When WithTag is called on a reference that has digest, it should
preserve the digest.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-08 14:47:33 -08:00
yaoyao.xyy
a4a227e351 oss native large file copy consume too much time which will eventually lead to client timeout because of no data transmit throughout native copy. change maxCopySize to 128MB, ensure only sm all medium size file use oss native copy to avoid connection reset by peer. And fix Move function with CopyLargeFileInParallel to optimize oss upload copy
Signed-off-by: yaoyao.xyy <yaoyao.xyy@alibaba-inc.com>
2016-11-08 12:14:13 +08:00
Richard Scothern
1e501d0bd7 Document registry release process
Signed-off-by: Richard Scothern <richard.scothern@docker.com>
2016-11-07 12:48:55 -08:00
Derek McGowan
a2611c7520 Merge pull request #2027 from ahmetalpbalkan/pr-azure-memleak2
Update vendored azure-sdk-for-go
2016-11-04 10:08:40 -07:00
Ahmet Alp Balkan
2ab25288a2
Update vendored azure-sdk-for-go
Updating to a recent version of Azure Storage SDK to be
able to patch some memory leaks through configurable HTTP client
changes which were made possible by recent patches to it.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-11-03 13:24:57 -07:00
Derek McGowan
fbe6e8d212 Merge pull request #2008 from miminar/honor-x-forwarded-port
Honor X-Forwarded-Port header
2016-11-02 12:56:17 -07:00
Derek McGowan
6edf9c5070 Merge pull request #2032 from yuexiao-wang/cleanup-makefile
Add targets for Makefile
2016-11-02 10:40:47 -07:00