Commit Graph

43153 Commits

Author SHA1 Message Date
356502dd2c Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-27 05:17:06 +00:00
f8da0365c2 Merge pull request #305 from tonistiigi/cve-2019-14271-1809
[18.09] Initialize nss libraries in Glibc so that the dynamic libraries are l…
Upstream-commit: 8ff992ae26ecedb7b80ee71be902d0fbc0879861
Component: engine
2019-07-26 19:54:17 -07:00
fbde297068 Initialize nss libraries in Glibc so that the dynamic libraries are loaded in the host environment not in the chroot from untrusted files.
See also OpenVZ a3f732ef75/src/enter.c (L227-L234)

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit a316b10dab79d9298b02c7930958ed52e0ccf4e4)
Upstream-commit: 706204124878a97142be511c0c46bcc16b43b0bd
Component: engine
2019-07-26 13:34:35 -07:00
6622522ad6 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-25 21:03:51 +00:00
b74e2311ef Merge pull request #301 from thaJeztah/18.09_bump_libnetwork2
[18.09] bump libnetwork 55685ba49593e67f5e1c8180539379b16736c25e (18.09 branch)
Upstream-commit: e8c623b37e1bd82c9affd149427e892906549fd1
Component: engine
2019-07-25 12:53:04 -07:00
53720a99f3 Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-24 01:03:20 +00:00
37f88aed06 Merge component 'cli' from git@github.com:docker/cli 18.09 2019-07-24 00:37:03 +00:00
66bb1728c9 Merge pull request #1961 from thaJeztah/18.09_format_vendor
[18.09 backport] bump gotest.tools 2.3.0, and reformat vendor.conf
Upstream-commit: 62f123fbd2
Component: cli
2019-07-23 16:33:19 -07:00
fda0f4da05 vendor.conf: reserve space for downstream projects
This helps merge conflicts in situations where downstream
projects have additional dependencies.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8c5460a2cc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7b3d023163
Component: cli
2019-07-23 16:01:57 -07:00
f3bbdf63ec bump gotest.tools v2.3.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c8d685457b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 32c4d8c40f
Component: cli
2019-07-23 16:01:52 -07:00
59f528c717 Sort vendor.conf alphabetically
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 773a91f9e9
Component: cli
2019-07-23 16:01:48 -07:00
a77c898b5d Reformat vendor.conf and pin all deps by git-sha
To make it better readable, and to encourage pinning
by sha, but "align" to a tagged release.

similar to 6026ce4a8b (#1822)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1764ffafca
Component: cli
2019-07-23 16:01:45 -07:00
8d1fd8dfed Bump to gotest.tools v2.2.0
I would like to use the regex matcher

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 986196e3e3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c1c3add698
Component: cli
2019-07-23 16:01:41 -07:00
f21fe83c94 Merge pull request #1959 from thaJeztah/18.09_backport_bump_docker_licensing
[18.09 backport] bump docker/licensing to 9781369abdb5281cdc07a2a446c6df01347ec793
Upstream-commit: e298714728
Component: cli
2019-07-23 15:59:32 -07:00
561749fec0 Merge pull request #1971 from thaJeztah/18.09_backport_skip_windows_permissions_check
[18.09 backport] Windows: skip permissions check on key
Upstream-commit: 1de93b845b
Component: cli
2019-07-23 15:58:01 -07:00
0bebf6af46 Merge pull request #1994 from thaJeztah/18.09_backport_cross_platform_bind
[18.09 backport] Detect Windows absolute paths on non-Windows CLI
Upstream-commit: 3d0a1f66eb
Component: cli
2019-07-23 15:56:25 -07:00
379d3f1f44 Merge pull request #168 from thaJeztah/18.09_backport_bump_golang_1.11
[18.09 backport] Bump Golang to 1.11.11
Upstream-commit: 241a7fc265f97989fa8cd9054f40acc1f066dd4d
Component: engine
2019-07-23 15:22:23 -07:00
02e521708b Merge pull request #1709 from thaJeztah/18.09_backport_bump_golang_1.11
[18.09 backport] bump Golang 1.11.11, and some makefile improvements
Upstream-commit: 5f4a501c27
Component: cli
2019-07-23 15:21:43 -07:00
c9d036b71b bump libnetwork 55685ba49593e67f5e1c8180539379b16736c25e (18.09 branch)
full diff: e7933d41e7...55685ba495

changes included:

- docker/libnetwork#2382 Backporting PR 2069 to bump_18.09
  - backport of https://github.com/docker/libnetwork#2069 Rolling back the port configs if failed to programIngress()
- docker/libnetwork#2363 [18.09] align dependencies with engine 18.09
- docker/libnetwork#2400 [18.09 backport] Fix TestValidRemoteDriver GetCapabilities errors
- docker/libnetwork#2391 [18.09 backport] Correctly clean up --config-only networks
  - backport of docker/libnetwork#2373
  - fixes moby/moby#35101
- docker/libnetwork#2392 [18.09 backport] remove gosimple - package is gone and it's not important

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a3767c7e9803f0a595a07b0548e99d60e861062
Component: engine
2019-07-23 15:16:58 -07:00
8cd45c2679 Merge pull request #1793 from thaJeztah/18.09_backport_fix_circle_vendor_flakiness
[18.09 backport] CircleCI: Increase no-output timeout to 15 minutes for vendoring
Upstream-commit: 7969d87630
Component: cli
2019-07-23 14:27:08 -07:00
2edbd754c6 Merge pull request #2002 from thaJeztah/18.09_backport_docs
[18.09 backport] assorted docs and completion script fixes
Upstream-commit: 642235d082
Component: cli
2019-07-23 14:14:55 -07:00
0dd43dd87f Merge pull request #613 from andrewhsu/1809ga
[18.09] bump ver 18.09.8
2019-07-17 10:03:56 -07:00
ef17941184 Merge branch '18.09' of github.com:docker/docker-ce into 18.09 2019-07-17 17:02:13 +00:00
4d26fa95ad Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-17 17:01:58 +00:00
6c4ac5b4bf bump ver 18.09.8
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-07-17 17:01:48 +00:00
8b3c3fd2fd Merge component 'engine' from git@github.com:docker/engine 18.09 2019-07-17 16:50:12 +00:00
67476cf36f Merge pull request #298 from thaJeztah/18.09_backport_scrub
[18.09 backport] DebugRequestMiddleware: unconditionally scrub data field
Upstream-commit: 456712c5b8d9d92c047f6a7d7cff270527ecac28
Component: engine
2019-07-17 09:09:51 -07:00
b48ef8cdca DebugRequestMiddleware: Remove path handling
Path-specific rules were removed, so this is no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 530e63c1a61b105a6f7fc143c5acb9b5cd87f958)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f8a0f26843bc5aff33cf9201b75bd4bdbb48a3ad)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a11c3098a3d5106b2d7c90d971c9300099556a49
Component: engine
2019-07-17 17:24:44 +02:00
3b1e458374 DebugRequestMiddleware: unconditionally scrub data field
Commit 77b8465d7e68ca102d7aae839c7b3fe0ecd28398 added a secret update
endpoint to allow updating labels on existing secrets. However, when
implementing the endpoint, the DebugRequestMiddleware was not updated
to scrub the Data field (as is being done when creating a secret).

When updating a secret (to set labels), the Data field should be either
`nil` (not set), or contain the same value as the existing secret. In
situations where the Data field is set, and the `dockerd` daemon is
running with debugging enabled / log-level debug, the base64-encoded
value of the secret is printed to the daemon logs.

The docker cli does not have a `docker secret update` command, but
when using `docker stack deploy`, the docker cli sends the secret
data both when _creating_ a stack, and when _updating_ a stack, thus
leaking the secret data if the daemon runs with debug enabled:

1. Start the daemon in debug-mode

        dockerd --debug

2. Initialize swarm

        docker swarm init

3. Create a file containing a secret

        echo secret > my_secret.txt

4. Create a docker-compose file using that secret

        cat > docker-compose.yml <<'EOF'
        version: "3.3"
        services:
          web:
            image: nginx:alpine
            secrets:
              - my_secret
        secrets:
          my_secret:
            file: ./my_secret.txt
        EOF

5. Deploy the stack

        docker stack deploy -c docker-compose.yml test

6. Verify that the secret is scrubbed in the daemon logs

        DEBU[2019-07-01T22:36:08.170617400Z] Calling POST /v1.30/secrets/create
        DEBU[2019-07-01T22:36:08.171364900Z] form data: {"Data":"*****","Labels":{"com.docker.stack.namespace":"test"},"Name":"test_my_secret"}

7. Re-deploy the stack to trigger an "update"

        docker stack deploy -c docker-compose.yml test

8. Notice that this time, the Data field is not scrubbed, and the base64-encoded secret is logged

        DEBU[2019-07-01T22:37:35.828819400Z] Calling POST /v1.30/secrets/w3hgvwpzl8yooq5ctnyp71v52/update?version=34
        DEBU[2019-07-01T22:37:35.829993700Z] form data: {"Data":"c2VjcmV0Cg==","Labels":{"com.docker.stack.namespace":"test"},"Name":"test_my_secret"}

This patch modifies `maskSecretKeys` to unconditionally scrub `Data` fields.
Currently, only the `secrets` and `configs` endpoints use a field with this
name, and no other POST API endpoints use a data field, so scrubbing this
field unconditionally will only scrub requests for those endpoints.

If a new endpoint is added in future where this field should not be scrubbed,
we can re-introduce more fine-grained (path-specific) handling.

This patch introduces some change in behavior:

- In addition to secrets, requests to create or update _configs_ will
  now have their `Data` field scrubbed. Generally, the actual data should
  not be interesting for debugging, so likely will not be problematic.
  In addition, scrubbing this data for configs may actually be desirable,
  because (even though they are not explicitely designed for this purpose)
  configs may contain sensitive data (credentials inside a configuration
  file, e.g.).
- Requests that send key/value pairs as a "map" and that contain a
  key named "data", will see the value of that field scrubbed. This
  means that (e.g.) setting a `label` named `data` on a config, will
  scrub/mask the value of that label.
- Note that this is already the case for any label named `jointoken`,
  `password`, `secret`, `signingcakey`, or `unlockkey`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7ce4be93ae8edd2da62a588e01c67313a4aba0c)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 73db8c77bfb2d0cbdf71ce491f3d3e66c9dd5be6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 32b40c53662e733b4627b0b303c71b52484a31f4
Component: engine
2019-07-17 17:24:35 +02:00
2294bf630c TestMaskSecretKeys: use subtests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 32d70c7e21631224674cd60021d3ec908c2d888c)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit ebb542b3f88d7f5551f6b6e1d8d2774a2c166409)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1371b11749854515289abe6bcc0c1b0759ea7a5b
Component: engine
2019-07-17 17:24:23 +02:00
16da52903d TestMaskSecretKeys: add more test-cases
Add tests for

- case-insensitive matching of fields
- recursive masking

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit db5f811216e70bcb4a10e477c1558d6c68f618c5)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 18dac2cf32faeaada3bd4e8e2bffa576ad4329fe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 310770b6deae3ff2f244654b8e84c14576e38493
Component: engine
2019-07-17 17:24:14 +02:00
1a64b8a4d1 Prevent bash process substitution error in cygwin
Signed-off-by: Matteo Orefice <matteo.orefice@bites4bits.software>
(cherry picked from commit 0b49495b1d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0dff33436c
Component: cli
2019-07-12 16:18:41 +02:00
025a808cd4 fix: docker login autocomplete for zsh
Changed `--user` to `--username`

Signed-off-by: Rohan Verma <hello@rohanverma.net>
(cherry picked from commit 1dc756e8df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 048af5b37b
Component: cli
2019-07-12 16:10:24 +02:00
87dd848fb9 Add bash completion for events --filter node
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit c1639e1e42)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7ee8241f71
Component: cli
2019-07-12 16:09:59 +02:00
d352de241a docs: add info for events backlog and scope
1. Adds `docker events` description info on the two scope types of events.
2. Adds `docker events` note in two places about backlog limit of event log.

Further info and background info in Issue 727

Signed-off-by: Bret Fisher <bret@bretfisher.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 988b9a0d96)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 74d51dc13b
Component: cli
2019-07-12 16:08:23 +02:00
45c60750ea Detect Windows absolute paths on non-Windows CLI
When deploying a stack using a relative path as bind-mount
source in the compose file, the CLI converts the relative
path to an absolute path, relative to the location of the
docker-compose file.

This causes a problem when deploying a stack that uses
an absolute Windows path, because a non-Windows client will
fail to detect that the path (e.g. `C:\somedir`) is an absolute
path (and not a relative directory named `C:\`).

The existing code did already take Windows clients deploying
a Linux stack into account (by checking if the path had a leading
slash). This patch adds the reverse, and adds detection for Windows
absolute paths on non-Windows clients.

The code used to detect Windows absolute paths is copied from the
Golang filepath package;
1d0e94b1e1/src/path/filepath/path_windows.go (L12-L65)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d6dd08d568)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a757fad956
Component: cli
2019-07-10 23:39:41 +02:00
6b835ba41a Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-07-10 01:01:54 +00:00
531574846b [18.09 backport] require container-selinux >= 2.74 (#352)
[18.09 backport] require container-selinux >= 2.74
Upstream-commit: 2dfffcfb076dccf33ac345fb3475bc349d68459d
Component: packaging
2019-07-09 12:40:17 -10:00
d9a98a0f86 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-07-06 21:01:21 +00:00
3c597067b9 [18.09] switch to balenalib/rpi-raspbian because resin/rpi-raspb… (#359)
[18.09] switch to balenalib/rpi-raspbian because resin/rpi-raspbian is deprecated
Upstream-commit: e8cb60baf6abb7b2cd50c9991056891be462b839
Component: packaging
2019-07-06 07:48:51 -10:00
b69692140e Merge component 'cli' from git@github.com:docker/cli 18.09 2019-07-04 00:46:01 +00:00
2f1c550ef2 Merge pull request #1978 from thaJeztah/18.09_backport_fix_rollback_config_interpolation
[18.09 backport] Fix Rollback config type interpolation
Upstream-commit: ec2ecc1c8b
Component: cli
2019-07-03 23:09:20 +02:00
5f9904bac8 Rollback config type interpolation on fields "parallelism" and "max_failure_ratio" were missing, as it uses the same type as update_config.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit efdf36fa81)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 23c88a8311
Component: cli
2019-07-03 19:20:08 +02:00
88031e7c4e switch to balenalib/rpi-raspbian because resin/rpi-raspbian is deprecated
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7ab3b5c11a0426117580b14e1b170b192945af1d
Component: packaging
2019-07-03 00:33:52 +02:00
2d0083d657 Merge pull request #611 from andrewhsu/1809ga
[18.09] bump ver 18.09.7
2019-06-27 10:13:33 -07:00
f53f261a1d bump ver 18.09.7
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-06-27 16:55:22 +00:00
52d814f953 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging 18.09 2019-06-27 01:02:59 +00:00
ba3d612d8c Merge pull request #355 from thaJeztah/18.09_backport_remove_pkcs11
[18.09 backport] Remove the pkcs11 tag, was a holdover from cli
Upstream-commit: cc243930f1600d0a1a5621afe4bd3abe9c299c11
Component: packaging
2019-06-26 12:32:09 -10:00
df56d66f46 Remove the pkcs11 tag, was a holdover from cli
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 76f7249ca4695f58cee9773cb8b8036e698c576b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 095a4c109d5ba3444ace84e53f363eb4855e57d2
Component: packaging
2019-06-26 01:01:03 +02:00
0ac05a6a78 require container-selinux >= 2.74
version 2.9 is really old; this sets the same minimal version
as is used for the containerd.io package

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a246b19b0723d41a8e58ff42d3af52fd57a7e94d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 95dea749d4cb7e474194bbe209f052e94da5df2e
Component: packaging
2019-06-26 00:48:50 +02:00