Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Drop effective and permitted cap for non-root user. #1397

Closed

Conversation

Random-Liu
Copy link
Member

See moby/moby#36587.
Ref kubernetes-sigs/kind#1331.

We may want to cherrypick into supported branches.

/cc @mikebrow @BenTheElder @michaelbannister @cheftako

Signed-off-by: Lantao Liu [email protected]

@k8s-ci-robot
Copy link

@Random-Liu: GitHub didn't allow me to request PR reviews from the following users: michaelbannister, cheftako, BenTheElder.

Note that only containerd members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

See moby/moby#36587.
Ref kubernetes-sigs/kind#1331.

We may want to cherrypick into supported branches.

/cc @mikebrow @BenTheElder @michaelbannister @cheftako

Signed-off-by: Lantao Liu [email protected]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Random-Liu
Copy link
Member Author

The new test passed with runc 1.0.0-rc9, but failed with runc 1.0.0-rc10.

I guess this runc change is related: opencontainers/runc#2086

The test expectation matches moby/moby#36587. If the expectation of moby/moby#36587 is correct, I believe opencontainers/runc#2086 is a regression.

/cc @crosbymichael @justincormack

@k8s-ci-robot
Copy link

@Random-Liu: GitHub didn't allow me to request PR reviews from the following users: justincormack.

Note that only containerd members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

The new test passed with runc 1.0.0-rc9, but failed with runc 1.0.0-rc10.

I guess this runc change is related: opencontainers/runc#2086

The test expectation matches moby/moby#36587. If the expectation of moby/moby#36587 is correct, I believe opencontainers/runc#2086 is a regression.

/cc @crosbymichael @justincormack

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done!
See comments.

docker build -t $(IMAGE) .

push:
gcloud docker -- push $(IMAGE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding a todo or open an issue to convert to using test images via local image cache... vs round tripping them through gcr.io. Would also be nice to set the test image name via make so we don't have to hard code it in the source file if possible.

// if the user is non-root.
// See https://github.com/moby/moby/pull/36587.
//
// This option should be behind options for setting users and capabilities.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/behind/used after/

uid int64
startOK bool
}{
"shouldn't be able to run container with a private workdir only accessible to nobody as a non-root user": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest: "shouldn't be able to run test container, with a private workdir that is accessible to nobody, as non-root user"

uid: 1234,
startOK: false,
},
"shouldn be able to run container with a private workdir only accessible to nobody as root": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest: "should be able to run test container, with a private workdir that is accessible to nobody, as root user"

assert.NoError(t, imageService.RemoveImage(&runtime.ImageSpec{Image: img}))
}()

t.Log("Create a container to print capabilities")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/print/test/

@BenTheElder
Copy link

Gentle poke -- Let me know if I can help out here 😅

@justincormack
Copy link
Contributor

LGTM.

@BenTheElder
Copy link

gentle ping, we've got users that are disappointed to see things pass in CI that would've failed if the node runtime was dockerd 😅 ... would love to help get this in a running containerd, let me know if I can do anything.

@dims
Copy link
Member

dims commented Mar 15, 2020

@BenTheElder looks like @Random-Liu has the pen now since there are a few things left from @mikebrow 's review.

@mikebrow
Copy link
Member

@Random-Liu just a couple nits..

@k8s-ci-robot
Copy link

@Random-Liu: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cri-containerd-node-e2e f19395a link /test pull-cri-containerd-node-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

paulfantom added a commit to paulfantom/kube-rbac-proxy that referenced this pull request Oct 8, 2020
* upstream/master:
  *: move to klog v2
  Add support for ignore-paths
  Update README.md
  *: cut v0.7.0
  update to use user ID 65532 as workrround for containerd/cri#1397
  update the manifests
  make image be rootless
  upgrade to use go 1.13 and remove the vendors
  upgrade to use go 1.13 and remove the vendors
paulfantom added a commit to paulfantom/kube-rbac-proxy that referenced this pull request Oct 8, 2020
* upstream/master:
  *: move to klog v2
  Add support for ignore-paths
  Update README.md
  *: cut v0.7.0
  update to use user ID 65532 as workrround for containerd/cri#1397
  update the manifests
  make image be rootless
  upgrade to use go 1.13 and remove the vendors
  upgrade to use go 1.13 and remove the vendors
@BenTheElder
Copy link

carrying forward in containerd/containerd#4669

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants