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

Conversation

@mikebrow
Copy link
Member

@mikebrow mikebrow commented Sep 6, 2017

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]

@mikebrow
Copy link
Member Author

mikebrow commented Sep 6, 2017

Generated an issue to track work on a docker/default seccomp helper needed in containerd/containerd
containerd/containerd#1476

@mikebrow
Copy link
Member Author

mikebrow commented Sep 8, 2017

Generated a PR over in containerd to provide the helpers we need: containerd/containerd#1493

@mikebrow
Copy link
Member Author

rebased to pick up the build fix and new seccomp helpers from containerd.

@Random-Liu Random-Liu added this to the v1.0.0-alpha.0 milestone Sep 15, 2017
@mikebrow
Copy link
Member Author

modified vendor commit to pick up the new critools seccomp test bucket

@mikebrow
Copy link
Member Author

mikebrow commented Sep 20, 2017

@Random-Liu
CI shows the issues I was talking about..

ok 137 - 128 maps to SIGKILL

@mikebrow
Copy link
Member Author

mikebrow commented Sep 20, 2017

@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

@mikebrow
Copy link
Member Author

mikebrow commented Sep 20, 2017

@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..
kubernetes-sigs/cri-tools#143 kubernetes-sigs/cri-tools@4f0e801

@mikebrow mikebrow changed the title [WIP:testing] adds seccomp support Adds seccomp support Sep 20, 2017
@mikebrow
Copy link
Member Author

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.

@Random-Liu
Copy link
Member

Random-Liu commented Sep 20, 2017 via email

@mikebrow
Copy link
Member Author

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.

@Random-Liu Random-Liu self-assigned this Sep 20, 2017
@Random-Liu
Copy link
Member

@mikebrow I tried this PR with the newest seccomp test. Some tests are failing.

@mikebrow
Copy link
Member Author

mikebrow commented Sep 21, 2017

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.

@mikebrow
Copy link
Member Author

rebased again... now need to vendor in the dependencies

@mikebrow
Copy link
Member Author

Ok finished vendoring and it looks good.. pushing the vendor updates..

mike@mike-VirtualBox:~/go/src/github.com/kubernetes-incubator/cri-containerd$ sudo make test-cri FOCUS="SeccompProfilePath"
/home/mike/go/bin/critest
Running Suite: E2ECRI Suite
===========================
Random Seed: 1505977832 - Will randomize all specs
Will run 9 of 54 specs

SSSSSSSSSSS
------------------------------
[k8s.io] Security Context SeccompProfilePath 
  runtime should support an seccomp profile that blocks setting hostname with no sysCaps
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:510
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] runtime should support an seccomp profile that blocks setting hostname with no sysCaps
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:510
STEP: create pod
STEP: create container with seccompBlockHostNameProfile and test
STEP: create localhost//tmp/seccomp-tests654397238/block-host-name.json Seccomp container
STEP: Get image status for image: busybox:1.26
STEP: Pull image : busybox:1.26
STEP: Create container.
Sep 21 02:10:39.198: INFO: Created container "9e916627b60c5266cd49604c685a52788b814d55cfa73ee5693346978ec56203"

STEP: Start container for containerID: 9e916627b60c5266cd49604c685a52788b814d55cfa73ee5693346978ec56203
Sep 21 02:10:39.315: INFO: Started container "9e916627b60c5266cd49604c685a52788b814d55cfa73ee5693346978ec56203"

STEP: Get container status for containerID: 9e916627b60c5266cd49604c685a52788b814d55cfa73ee5693346978ec56203
STEP: set hostname in container to determine whether sethostname is blocked
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51

• [SLOW TEST:7.129 seconds]
[k8s.io] Security Context
/home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:72
  SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:581
    runtime should support an seccomp profile that blocks setting hostname with no sysCaps
    /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:510
------------------------------
SSS
------------------------------
[k8s.io] Security Context SeccompProfilePath docker/default 
  should support seccomp docker/default on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:549
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] should support seccomp docker/default on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:549
STEP: create seccomp sandbox and container
STEP: create seccomp sandbox
STEP: create container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
Sep 21 02:10:42.152: INFO: Created container "e6e2b9ba4193dfd2128240cecc4beee7989019ca346a90a020c25bdded01b525"

STEP: start container
STEP: Start container for containerID: e6e2b9ba4193dfd2128240cecc4beee7989019ca346a90a020c25bdded01b525
Sep 21 02:10:42.308: INFO: Started container "e6e2b9ba4193dfd2128240cecc4beee7989019ca346a90a020c25bdded01b525"

STEP: Get container status for containerID: e6e2b9ba4193dfd2128240cecc4beee7989019ca346a90a020c25bdded01b525
STEP: verify seccomp profile
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•SSSSSSS
------------------------------
[k8s.io] Security Context SeccompProfilePath 
  runtime should ignore a seccomp profile that blocks setting hostname when privileged
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:537
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] runtime should ignore a seccomp profile that blocks setting hostname when privileged
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:537
STEP: create privileged pod
STEP: create Privileged podSandbox
STEP: create privileged container with seccompBlockHostNameProfile and test
STEP: create localhost//tmp/seccomp-tests017010648/block-host-name.json Seccomp container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
Sep 21 02:10:44.680: INFO: Created container "dacdf17091dd9c2a4969c3f08501aee3ef0992ccc2bce1217604b7de22ddae96"

STEP: Start container for containerID: dacdf17091dd9c2a4969c3f08501aee3ef0992ccc2bce1217604b7de22ddae96
Sep 21 02:10:44.792: INFO: Started container "dacdf17091dd9c2a4969c3f08501aee3ef0992ccc2bce1217604b7de22ddae96"

STEP: Get container status for containerID: dacdf17091dd9c2a4969c3f08501aee3ef0992ccc2bce1217604b7de22ddae96
STEP: set hostname in container to determine whether sethostname is blocked
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•SSSSSSSS
------------------------------
[k8s.io] Security Context SeccompProfilePath 
  should support seccomp unconfined on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:473
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] should support seccomp unconfined on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:473
STEP: create seccomp sandbox and container
STEP: create seccomp sandbox
STEP: create container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
Sep 21 02:10:47.469: INFO: Created container "bfe62cc640145a45c23e3aeb77b6533a3ced3d4b70df11875604cf306eaace5f"

STEP: start container
STEP: Start container for containerID: bfe62cc640145a45c23e3aeb77b6533a3ced3d4b70df11875604cf306eaace5f
Sep 21 02:10:47.585: INFO: Started container "bfe62cc640145a45c23e3aeb77b6533a3ced3d4b70df11875604cf306eaace5f"

STEP: Get container status for containerID: bfe62cc640145a45c23e3aeb77b6533a3ced3d4b70df11875604cf306eaace5f
STEP: verify seccomp profile
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•
------------------------------
[k8s.io] Security Context SeccompProfilePath 
  runtime should not support a custom seccomp profile without using localhost/ as a prefix
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:521
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] runtime should not support a custom seccomp profile without using localhost/ as a prefix
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:521
STEP: create pod
STEP: create container with seccompBlockHostNameProfile and test
STEP: create /tmp/seccomp-tests429637322/block-host-name.json Seccomp container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
E0921 02:10:50.073665   11680 remote_runtime.go:187] CreateContainer in sandbox "7b21f15af333ed6deaedb7625d02f1321616365342ff5d8395646c31d8500e51" from runtime service failed: rpc error: code = Unknown desc = invalid seccomp profile "/tmp/seccomp-tests429637322/block-host-name.json"
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•
------------------------------
[k8s.io] Security Context SeccompProfilePath docker/default 
  runtime should block sethostname with docker/default seccomp profile and no sysCaps
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:579
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] runtime should block sethostname with docker/default seccomp profile and no sysCaps
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:579
STEP: create pod
STEP: create container with docker/default seccomp profile and test
STEP: create docker/default Seccomp container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
Sep 21 02:10:51.846: INFO: Created container "24d00e3dfa1cba8d307ff98c4a064cc973f4bd6ab1e70c13eeb8b7467a95d2f9"

STEP: Start container for containerID: 24d00e3dfa1cba8d307ff98c4a064cc973f4bd6ab1e70c13eeb8b7467a95d2f9
Sep 21 02:10:51.985: INFO: Started container "24d00e3dfa1cba8d307ff98c4a064cc973f4bd6ab1e70c13eeb8b7467a95d2f9"

STEP: Get container status for containerID: 24d00e3dfa1cba8d307ff98c4a064cc973f4bd6ab1e70c13eeb8b7467a95d2f9
STEP: set hostname in container to determine whether sethostname is blocked
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•
------------------------------
[k8s.io] Security Context SeccompProfilePath 
  should support seccomp localhost/profile on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:483
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] should support seccomp localhost/profile on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:483
STEP: create seccomp sandbox and container
STEP: create seccomp sandbox
STEP: create container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
Sep 21 02:10:54.006: INFO: Created container "0c0e961ee681408c912640ad4794f6cc71a6ea3eeb2b454ecfcf96d8ee545d2c"

STEP: start container
STEP: Start container for containerID: 0c0e961ee681408c912640ad4794f6cc71a6ea3eeb2b454ecfcf96d8ee545d2c
Sep 21 02:10:54.133: INFO: Started container "0c0e961ee681408c912640ad4794f6cc71a6ea3eeb2b454ecfcf96d8ee545d2c"

STEP: Get container status for containerID: 0c0e961ee681408c912640ad4794f6cc71a6ea3eeb2b454ecfcf96d8ee545d2c
STEP: verify seccomp profile
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•SS
------------------------------
[k8s.io] Security Context SeccompProfilePath docker/default 
  runtime should support setting hostname with docker/default seccomp profile and sysCaps
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:564
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] runtime should support setting hostname with docker/default seccomp profile and sysCaps
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:564
STEP: create pod
STEP: create container with docker/default seccomp profile and test
STEP: create docker/default Seccomp container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
Sep 21 02:10:56.785: INFO: Created container "f9449ce0e0e825a1b184be31f1c2f9ac1f85c58dd21681d620fdd462e1932a27"

STEP: Start container for containerID: f9449ce0e0e825a1b184be31f1c2f9ac1f85c58dd21681d620fdd462e1932a27
Sep 21 02:10:56.915: INFO: Started container "f9449ce0e0e825a1b184be31f1c2f9ac1f85c58dd21681d620fdd462e1932a27"

STEP: Get container status for containerID: f9449ce0e0e825a1b184be31f1c2f9ac1f85c58dd21681d620fdd462e1932a27
STEP: set hostname in container to determine whether sethostname is blocked
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•SSSSSSSSSSSS
------------------------------
[k8s.io] Security Context SeccompProfilePath 
  should support seccomp default which is unconfined on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:494
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:52
[BeforeEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:452
[It] should support seccomp default which is unconfined on the container
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:494
STEP: create seccomp sandbox and container
STEP: create seccomp sandbox
STEP: create container
STEP: Get image status for image: busybox:1.26
STEP: Create container.
Sep 21 02:10:58.686: INFO: Created container "c683bf059b92b302537f4754f9a4dc6f2a4b9499a6a1bf8970638938ee351524"

STEP: start container
STEP: Start container for containerID: c683bf059b92b302537f4754f9a4dc6f2a4b9499a6a1bf8970638938ee351524
Sep 21 02:10:58.815: INFO: Started container "c683bf059b92b302537f4754f9a4dc6f2a4b9499a6a1bf8970638938ee351524"

STEP: Get container status for containerID: c683bf059b92b302537f4754f9a4dc6f2a4b9499a6a1bf8970638938ee351524
STEP: verify seccomp profile
[AfterEach] SeccompProfilePath
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/security_context.go:462
STEP: stop PodSandbox
STEP: delete PodSandbox
[AfterEach] [k8s.io] Security Context
  /home/mike/go/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
•SS
Ran 9 of 54 Specs in 26.399 seconds
SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 45 Skipped PASS

Ginkgo ran 1 suite in 26.479461042s
Test Suite Passed

@Random-Liu
Copy link
Member

@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"}
Copy link
Member

Choose a reason for hiding this comment

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

Yeah~

// 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.
Copy link
Member

Choose a reason for hiding this comment

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

dockerDefault.

// 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
Copy link
Member

@Random-Liu Random-Liu Sep 21, 2017

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.

Copy link
Member Author

@mikebrow mikebrow Sep 21, 2017

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.

Copy link
Member

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
Copy link
Member

@Random-Liu Random-Liu Sep 21, 2017

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
Copy link
Member

@Random-Liu Random-Liu Sep 21, 2017

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. :)

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

todo added

@Random-Liu
Copy link
Member

Closes #250

@Random-Liu
Copy link
Member

Random-Liu commented Sep 21, 2017

LGTM except:

However, both of them should be docker/default now. Currently, in your PR docker/default or runtime/default for sandbox will become unconfined, :)

Signed-off-by: Mike Brown <[email protected]>
@mikebrow
Copy link
Member Author

Good point @Random-Liu I changed pod's runtime and docker/default to docker/default as well.

@Random-Liu
Copy link
Member

LGTM

@Random-Liu Random-Liu merged commit 411c03b into containerd:master Sep 21, 2017
@Random-Liu Random-Liu mentioned this pull request Sep 21, 2017
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.

3 participants