Commit Graph

92 Commits

Author SHA1 Message Date
e26a79ce37 Prevent panic upon error pulling registry
Upstream-commit: e836b0064bc18300ca9213c749f464e52ca9d001
Component: engine
2013-09-16 16:18:25 -07:00
e60a2a9f3c Login against private registry
To improve the use of docker with a private registry the login
command is extended with a parameter for the server address.

While implementing i noticed that two problems hindered authentication to a
private registry:

1. the resolve of the authentication did not match during push
   because the looked up key was for example localhost:8080 but
   the stored one would have been https://localhost:8080

   Besides The lookup needs to still work if the https->http fallback
   is used

2. During pull of an image no authentication is sent, which
   means all repositories are expected to be private.

These points are fixed now. The changes are implemented in
a way to be compatible to existing behavior both in the
API as also with the private registry.

Update:

- login does not require the full url any more, you can login
  to the repository prefix:

  example:
  docker logon localhost:8080

Fixed corner corner cases:

- When login is done during pull and push the registry endpoint is used and
  not the central index

- When Remote sends a 401 during pull, it is now correctly delegating to
  CmdLogin

- After a Login is done pull and push are using the newly entered login data,
  and not the previous ones. This one seems to be also broken in master, too.

- Auth config is now transfered in a parameter instead of the body when
  /images/create is called.
Upstream-commit: fcee6056dc50de7698772a3049cdfa1eb0f2416f
Component: engine
2013-09-03 20:45:49 +02:00
a51aec19e0 registry: removing opaqueRequest
Upstream-commit: 0418702cfc69f3d748c7c8b00da467154944b540
Component: engine
2013-08-16 19:33:59 +02:00
6fda0862e2 hot fix display in parallel pull and go fmt
Upstream-commit: d7979ef2d0044dc7def9238f0a1aed909f0590bb
Component: engine
2013-08-15 11:42:40 +00:00
33c7b64d8e Add GitHub usernames to MAINTAINERS
Upstream-commit: 4dc04d7690a4d634d9afd93821bb8e78620c5f9f
Component: engine
2013-08-09 21:16:44 -04:00
51ecc0b473 Merge pull request #1481 from titanous/fix-sprint
Fix typo: fmt.Sprint -> fmt.Sprintf
Upstream-commit: 3d63087f78ff2ace86d5ea0331e32418914438b8
Component: engine
2013-08-09 17:28:59 -07:00
204241346e Fix typo: fmt.Sprint -> fmt.Sprintf
Upstream-commit: 3b23f02229fd3f4928934f317d41b8f497cec9a9
Component: engine
2013-08-09 19:52:05 -04:00
26c9729379 Merge pull request #1362 from dotcloud/registry_test
* Registry: Registry unit tests + mock registry
Upstream-commit: 3e6e08ce00eb7e90a5302683b71d6aaf826083ca
Component: engine
2013-08-07 15:30:07 -07:00
8b07d34a9b Merge pull request #1406 from dotcloud/1363-reduce_timeout-fix
Reduce connect and read timeout when pinging the registry (fixes issue #1363)
Upstream-commit: b6c4b325a446f9eb5829af3d6a7d0222cf0f22b6
Component: engine
2013-08-06 04:22:44 -07:00
54865cc8e5 Adapted tests to latest registry changes
Upstream-commit: 8aa9985ad07f71fa9bd3b31dde81c0da6d0dc655
Component: engine
2013-08-05 20:28:05 +02:00
67eddf7cb1 Cleanup
Upstream-commit: 2c85b964e3be0f7ca3ff513b855f7bd26b936cc9
Component: engine
2013-08-05 19:07:23 +02:00
4c19fdff39 Mock access logs don't show up in non-debug mode
Upstream-commit: 9159c819c3baf33844f0cc38a4baa0c6674e8b9a
Component: engine
2013-08-05 19:06:00 +02:00
779219a1f1 gofmt
Upstream-commit: 484ba4a8c5cd4c06330bdd5fb58f98f07619e2aa
Component: engine
2013-08-05 19:06:00 +02:00
d6b8f8b07e New registry unit tests remade from scratch, using the mock registry
Upstream-commit: 97b7b173b999c7422a3b045c3ceffa331a7239ca
Component: engine
2013-08-05 19:06:00 +02:00
4d1189a20d Mock registry: Fixed a bug where the index validation path would return a 200 status code instead of the expected 204
Upstream-commit: 29f69211c957a62f13b10036a579191a920f62a7
Component: engine
2013-08-05 19:06:00 +02:00
64f23d891d registry: Fixed a bug where token and cookie info wouldn't be sent when using LookupRemoteImage(). Fixed a bug where no error would be reported when getting a non-200 status code in GetRemoteImageLayer()
Upstream-commit: 553ce165c1235542d3a5dd526c063c7a4b9904f4
Component: engine
2013-08-05 19:05:14 +02:00
4732ba2be6 Disabled test server in the tests
Upstream-commit: 310ddec823cbeadf694c396b27b5610474f05bcc
Component: engine
2013-08-05 19:02:57 +02:00
8bf1856b5c Mocked registry: Added X-Docker-Size when fetching the layer
Upstream-commit: 6926ba558f14da4e48ff5c409a5e78f1e9e0e991
Component: engine
2013-08-05 19:02:57 +02:00
90a0202ee8 Fixed mocked registry
Upstream-commit: 97d1d6f5d20c1475b7cdfcecdf4eeba08de888bd
Component: engine
2013-08-05 19:02:57 +02:00
31aa6c5787 Implemented a Mocked version of the Registry server
Upstream-commit: 5f7abd5347fc28ff36b59a03a90dceee22e16606
Component: engine
2013-08-05 19:02:57 +02:00
438461c454 Merge pull request #1408 from dotcloud/1407-localhost_is_a_domain-fix
Always consider localhost as a domain name when parsing the FQN repos name
Upstream-commit: 1b08ab92d15765f961cb48fa764e8719a7486baf
Component: engine
2013-08-05 08:50:12 -07:00
c5da071b25 Merge pull request #1382 from monnand/650-http-utils
650 http utils and user agent field
Upstream-commit: feda3db1dd1c76d2866c2a628e28a4999b5b88da
Component: engine
2013-08-05 08:49:12 -07:00
193eaad413 Always consider localhost as a domain name when parsing the FQN repos name
Upstream-commit: c22f2617ad8ed2450d4d9dbb6e6ec39da4e51f2f
Component: engine
2013-08-04 17:59:12 -07:00
026e661083 Reduce connect and read timeout when pinging the registry (fixes issue #1363)
Upstream-commit: c860945be25c7768ee456b5a71524631ec0dddbd
Component: engine
2013-08-04 17:42:24 -07:00
3029f070e6 Return JSONError for HTTPResponse error
Upstream-commit: dae585c6e4c19817b2dbd106171728a0bb564ccc
Component: engine
2013-08-03 00:27:58 +00:00
63124b5509 reqFactory in Registry
Upstream-commit: 7dac26ce69b442d55122caa2897572d3ac8255fa
Component: engine
2013-08-02 03:08:08 -04:00
7aa4663949 Return registy status code in error
Added Details map to the JSONMessage
Upstream-commit: 3043c2641990d94298c6377b7ef14709263a4709
Component: engine
2013-07-30 23:24:31 +00:00
753746a54d Make sure the index also receives the checksums
Upstream-commit: 5b27652ac6eaf1bc4c2a16e51919ec4272a58fd6
Component: engine
2013-07-29 11:30:21 -07:00
0d6f4c9ed4 Handle extra-paremeter within checksum calculations
Upstream-commit: e3f68b22d8f0635a8c08ab56721e56dbe570a49a
Component: engine
2013-07-29 11:30:17 -07:00
e9895c9839 Refactor checksum
Upstream-commit: 8ca7b0646e6c4346075656f46847f53c2e868a3d
Component: engine
2013-07-29 11:30:17 -07:00
795426f1f2 Make sure the cookie is used in all registry queries
Upstream-commit: 3425c1b84c3f58ac5bb2feb91c4901b61561c58c
Component: engine
2013-07-25 12:31:23 -07:00
0da0fa300a Rename: VersionChecker->VersionInfo.
Upstream-commit: ede1e6d4754f3cffeac72f5d760fe4d87c5ae570
Component: engine
2013-07-23 17:05:13 -04:00
3427bb07af documentation.
Upstream-commit: cd209f406e889feaba50103e5ce50f7dcd23767a
Component: engine
2013-07-18 14:22:49 -04:00
ebb59e49d1 reduce the number of string copy operations.
Upstream-commit: 73e79a3310f3976b61a295f45e12aead9af41962
Component: engine
2013-07-10 18:59:43 -04:00
98e450c93d format in the user agent header should follow RFC 2616
Upstream-commit: 34cf976866f66bc77b961f4e66a9dd8aad1ffb00
Component: engine
2013-07-10 18:59:43 -04:00
81ebd3a19c Removed an unnecessary nil assignment
Upstream-commit: e832b01349fec2acee6ec3219dc9bfb61ad38764
Component: engine
2013-07-10 18:56:49 -04:00
9939aac9f5 Removed an unnecessary error check.
Upstream-commit: 26c8eae6fea53e9a78bd035614fff20086f00b17
Component: engine
2013-07-10 18:56:49 -04:00
5042ef8b4a added client's kernel version
Upstream-commit: d40efc4648af6bb5c60b37a789effd602af1f132
Component: engine
2013-07-10 18:56:49 -04:00
4c0f88c190 inserted setUserAgent in each HTTP request
Upstream-commit: 1bb8f60d5ae3810b465dd3c79a7a572fb017d078
Component: engine
2013-07-10 18:49:01 -04:00
eb5095a476 Added version checker interface
Upstream-commit: 1d01189f04f5187bd39e9212b7af3b3e83e86361
Component: engine
2013-07-10 18:49:01 -04:00
975937c08c Hardened repos name validation
Upstream-commit: 316c8328aab8f9d518574b4bef9e537fed4185f6
Component: engine
2013-07-09 16:46:55 -07:00
916139ebc6 Fixed potential security issue (never try http on official index when polling the endpoint). Also fixed local repos name when pulling index.docker.io/foo/bar
Upstream-commit: f44eac49fae1b33e6ff4c6f42c5e7305caf22252
Component: engine
2013-07-09 11:30:12 -07:00
76ecb3f5a4 fmt.Errorf instead of errors.New
Upstream-commit: 283ebf3ff92ef552ae9cdf23a17c1a375dac99bd
Component: engine
2013-07-05 14:56:56 -07:00
fba3efb6e1 Fixed ping URL
Upstream-commit: 4c174e0bfb4c6e6333f39fff3c70058eaed37e3a
Component: engine
2013-07-05 14:55:48 -07:00
44c8a27b06 Allowing namespaces in standalone registry
Upstream-commit: 57a6c83547ba4671940c3134a3f68586db603048
Component: engine
2013-07-05 14:30:43 -07:00
5ee43e9d28 Restoring old changeset lost by previous merge
Upstream-commit: cfc7684b7de542cfed9d8b90b654fe59c8aa4098
Component: engine
2013-07-05 12:37:07 -07:00
bf4fc24d05 Merging from master
Upstream-commit: be49f0a1182164d0d279484ec35931c1e3ef6d3c
Component: engine
2013-07-05 12:27:10 -07:00
057f0a4b6f Adding support for nicer URLs to support standalone registry (+ some registry code cleaning)
Upstream-commit: 66a9d06d9fa7a382c6852cf047e1448e0d3e1782
Component: engine
2013-07-05 12:20:58 -07:00
1c71d0a65e Implement several golint suggestions, including:
* Removing type declarations where they're inferred
* Changing Url -> URL, Id -> ID in names
* Fixing snake-case names
Upstream-commit: 19121c16d9514b391ce8f15aeff3c47c1ea5a841
Component: engine
2013-07-03 14:36:04 -07:00
cad00c9d8a fix two obvious bugs???
Upstream-commit: 9632cf09bfd7b4a8513799bf19070ecabd55c446
Component: engine
2013-07-02 22:11:03 +00:00