-
Notifications
You must be signed in to change notification settings - Fork 347
Conversation
|
Generated an issue to track work on a docker/default seccomp helper needed in containerd/containerd |
|
Generated a PR over in containerd to provide the helpers we need: containerd/containerd#1493 |
|
rebased to pick up the build fix and new seccomp helpers from containerd. |
|
modified vendor commit to pick up the new critools seccomp test bucket |
|
@Random-Liu ok 137 - 128 maps to SIGKILL |
|
@Random-Liu ok I have one fix to push to the containerd/containerd code I was checking for runtime.GOARCH == "amd" not "amd64" so I didn't pick up the default arch_prctl permission. See: containerd/containerd#1532 |
|
@Random-Liu and the other issue is docker supported name: or names: where the oci spec expects names: for the permission white and black lists... I'll fix both.. |
|
Ok, with the two PRs list above (one for critools, and one for containerd/containerd) we will then pass all tests. As soon as those two PRs are committed I'll rebase this PR. |
|
Cool! Thanks~
…On Sep 20, 2017 11:31 AM, "Mike Brown" ***@***.***> wrote:
Ok, with the two PRs list above (one for critools, and one for
containerd/containerd) we will then pass all tests. As soon as those two
PRs are committed I'll rebase this PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#219 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFjVu6GQihlB-rM9u7YYPegyBsMrExf7ks5skVoLgaJpZM4POXkD>
.
|
|
rebased.. @Random-Liu fyi containerd guys already merged containerd/containerd#1532 so just need your review and merge on the critools fix.. then I can vendor the fixes and we'll be all good. |
|
@mikebrow I tried this PR with the newest seccomp test. Some tests are failing. |
|
Did you vendor over the fixes mentioned above to containerd? Those with routines get compiled into our code. I was going to vendor in the morning. |
|
rebased again... now need to vendor in the dependencies |
|
Ok finished vendoring and it looks good.. pushing the vendor updates.. |
|
@mikebrow That may be the cause. I didn't update vendor thing. :) Will review this now. Thanks! |
| # FOCUS focuses the test to run. | ||
| FOCUS=${FOCUS:-} | ||
| # SKIP skips the test to skip. | ||
| SKIP=${SKIP:-"SeccompProfilePath"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah~
pkg/server/container_create.go
Outdated
| // runtimeDefault indicates that we should use or create a runtime default apparmor profile. | ||
| // runtimeDefault indicates that we should use or create a runtime default profile. | ||
| runtimeDefault = "runtime/default" | ||
| // runtimeDefault indicates that we should use or create a docker default profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dockerDefault.
pkg/server/container_create.go
Outdated
| // unconfinedProfile is a string indicating one should run a pod/containerd without a security profile | ||
| unconfinedProfile = "unconfined" | ||
| // seccompDefaultPodProfile is the default seccomp profile for pods. | ||
| seccompDefaultSandboxProfile = unconfinedProfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use different default for sandbox container? Do we have different default in dockershim? I don't think so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause it might be a different, don't see tie between pod and container here as is done with privileged. We should take this up with the overall seccomp CRI requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with have one default variable for container and one for sandbox.
However, both of them should be docker/default now. Currently, in your PR docker/default or runtime/default for sandbox will be unconfined, :)
| dockerDefault = "docker/default" | ||
| // appArmorDefaultProfileName is name to use when creating a default apparmor profile. | ||
| appArmorDefaultProfileName = "cri-containerd.apparmor.d" | ||
| // unconfinedProfile is a string indicating one should run a pod/containerd without a security profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Change pod to sandbox? Since we are using sandbox in the variable name.
| } | ||
| } | ||
|
|
||
| // Set seccomp profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably move this into a separate function, since the logic is the same with sandbox. I'm fine with doing that in another PR, up to you. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it's almost the same.. I figured there may be a reason for the logic to split but it didn't so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo added
|
Closes #250 |
|
LGTM except: |
Signed-off-by: Mike Brown <[email protected]>
Signed-off-by: Mike Brown <[email protected]>
|
Good point @Random-Liu I changed pod's runtime and docker/default to docker/default as well. |
|
LGTM |
Generates runtime spec linux seccomp profile for Sandboxes and Containers with the following rules:
unset the seccomp profile, if seccomp is not enabled, or the security context is privileged, or the profile selected is unconfined.
with a future pr we'll allow a custom default profiles for cri-containerd, with this pr the "runtime/default" or "docker/default" is set to "unconfined" for pods and the docker/default for containers
if the seccomp profile is set to localhost/profileFileName, load and unmarshall the seccomp spec from the profileFileName
Signed-off-by: Mike Brown [email protected]