Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

spec/ace.md: define the default capability set #600

Merged
merged 1 commit into from
May 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/image.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"value": {"limit": "1G"}
},
{
"name": "os/linux/capabilities-remove-set",
"value": {"set": ["CAP_NET_BIND_SERVICE", "CAP_SYS_ADMIN"]}
"name": "os/linux/capabilities-retain-set",
"value": {"set": ["CAP_NET_ADMIN", "CAP_NET_BIND_SERVICE"]}
}
],
"mountPoints": [
Expand Down
37 changes: 32 additions & 5 deletions spec/ace.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,35 +138,62 @@ The first example is "capabilities" but this will be expanded to include things

**Parameters:**

* **set** list of capabilities that will be removed from the process's capabilities bounding set, all others will be included.
* **set** list of capabilities that will be removed from the process's capabilities bounding set, all others from the default set will be included.

The default set is defined by the following 14 capabilities:
- `CAP_AUDIT_WRITE`
- `CAP_CHOWN`
- `CAP_DAC_OVERRIDE`
- `CAP_FSETID`
- `CAP_FOWNER`
- `CAP_KILL`
- `CAP_MKNOD`
- `CAP_NET_RAW`
- `CAP_NET_BIND_SERVICE`
- `CAP_SETUID`
- `CAP_SETGID`
- `CAP_SETPCAP`
- `CAP_SETFCAP`
- `CAP_SYS_CHROOT`

When the app does not have any capability isolator, the process's capabilities bounding set is just the default set defined above.

```json
"name": "os/linux/capabilities-remove-set",
"value": {
"set": [
"CAP_SYS_PTRACE"
"CAP_SYS_CHROOT",
"CAP_MKNOD"
]
}
```

In the example above, the process will have 12 capabilities in its bounding set: the 14 default capabilities minus the 2 from the remove set.

The default set is a small subset of all capabilities as there are today 37 capabilities on Linux.
Listing a capability in the remove set that is not in the default set such as `CAP_SYS_ADMIN` has no effect.

#### os/linux/capabilities-retain-set

* Scope: app

**Parameters:**

* **set** list of capabilities that will be retained in the process's capabilities bounding set, all others will be removed
* **set** list of capabilities that will be retained in the process's capabilities bounding set, all others will be removed.

```json
"name": "os/linux/capabilities-retain-set",
"value": {
"set": [
"CAP_KILL",
"CAP_CHOWN"
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE"
]
}
```

In the example above, the process will only have the two capabilities in its bounding set.
The retain set cannot be used in conjunction with the remove set.

### Resource Isolators

A _resource_ is something that can be consumed by an application (app) or group of applications (pod), such as memory (RAM), CPU, and network bandwidth.
Expand Down