Skip to content

Commit e5929b3

Browse files
authored
Merge pull request kubernetes#1963 from wangzhen127/update-seccomp
Update seccomp design doc to enable default seccomp profile
2 parents 171daba + c85008c commit e5929b3

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

node/seccomp.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This design should:
2828
* be container-runtime agnostic
2929
* allow use of custom profiles
3030
* facilitate containerized applications that link directly to libseccomp
31+
* enable a default seccomp profile for containers
3132

3233
## Use Cases
3334

@@ -40,14 +41,16 @@ This design should:
4041
unmediated by Kubernetes
4142
4. As a user, I want to be able to use a custom seccomp profile and use
4243
it with my containers
44+
5. As a user and administrator I want kubernetes to apply a sane default
45+
seccomp profile to containers unless I otherwise specify.
4346

4447
### Use Case: Administrator access control
4548

4649
Controlling access to seccomp profiles is a cluster administrator
4750
concern. It should be possible for an administrator to control which users
4851
have access to which profiles.
4952

50-
The [pod security policy](https://github.com/kubernetes/kubernetes/pull/7893)
53+
The [Pod Security Policy](https://github.com/kubernetes/kubernetes/pull/7893)
5154
API extension governs the ability of users to make requests that affect pod
5255
and container security contexts. The proposed design should deal with
5356
required changes to control access to new functionality.
@@ -101,9 +104,7 @@ implement a sandbox for user-provided code, such as
101104

102105
## Community Work
103106

104-
### Container runtime support for seccomp
105-
106-
#### Docker / opencontainers
107+
### Docker / OCI
107108

108109
Docker supports the open container initiative's API for
109110
seccomp, which is very close to the libseccomp API. It allows full
@@ -112,14 +113,21 @@ specification of seccomp filters, with arguments, operators, and actions.
112113
Docker allows the specification of a single seccomp filter. There are
113114
community requests for:
114115

115-
Issues:
116-
117116
* [docker/22109](https://github.com/docker/docker/issues/22109): composable
118117
seccomp filters
119118
* [docker/21105](https://github.com/docker/docker/issues/22105): custom
120119
seccomp filters for builds
121120

122-
#### rkt / appcontainers
121+
Implementation details:
122+
123+
* [docker/17989](https://github.com/moby/moby/pull/17989): initial
124+
implementation
125+
* [docker/18780](https://github.com/moby/moby/pull/18780): default blacklist
126+
profile
127+
* [docker/18979](https://github.com/moby/moby/pull/18979): default whitelist
128+
profile
129+
130+
### rkt / appcontainers
123131

124132
The `rkt` runtime delegates to systemd for seccomp support; there is an open
125133
issue to add support once `appc` supports it. The `appc` project has an open
@@ -133,23 +141,23 @@ Issues:
133141
* [appc/529](https://github.com/appc/spec/issues/529)
134142
* [rkt/1614](https://github.com/coreos/rkt/issues/1614)
135143

136-
#### HyperContainer
144+
### HyperContainer
137145

138146
[HyperContainer](https://hypercontainer.io) does not support seccomp.
139147

140-
### Other platforms and seccomp-like capabilities
141-
142-
FreeBSD has a seccomp/capability-like facility called
143-
[Capsicum](https://www.freebsd.org/cgi/man.cgi?query=capsicum&sektion=4).
144-
145-
#### lxd
148+
### lxd
146149

147150
[`lxd`](http://www.ubuntu.com/cloud/lxd) constrains containers using a default profile.
148151

149152
Issues:
150153

151154
* [lxd/1084](https://github.com/lxc/lxd/issues/1084): add knobs for seccomp
152155

156+
### Other platforms and seccomp-like capabilities
157+
158+
FreeBSD has a seccomp/capability-like facility called
159+
[Capsicum](https://www.freebsd.org/cgi/man.cgi?query=capsicum&sektion=4).
160+
153161
## Proposed Design
154162

155163
### Seccomp API Resource?
@@ -168,8 +176,6 @@ Instead of implementing a new API resource, we propose that pods be able to
168176
reference seccomp profiles by name. Since this is an alpha feature, we will
169177
use annotations instead of extending the API with new fields.
170178

171-
### API changes?
172-
173179
In the alpha version of this feature we will use annotations to store the
174180
names of seccomp profiles. The keys will be:
175181

@@ -191,7 +197,8 @@ profiles to be opaque to kubernetes for now.
191197

192198
The following format is scoped as follows:
193199

194-
1. `docker/default` - the default profile for the container runtime
200+
1. `runtime/default` - the default profile for the container runtime, can be
201+
overwritten by the following two.
195202
2. `unconfined` - unconfined profile, ie, no seccomp sandboxing
196203
3. `localhost/<profile-name>` - the profile installed to the node's local seccomp profile root
197204

0 commit comments

Comments
 (0)