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

Conversation

alban
Copy link
Member

@alban alban commented May 4, 2016

Fixes #598


/cc @iaguis @jonboulle


* Scope: app

**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 added in the process's capabilities bounding set in addition to the default app capabilities defined thereafter.
Copy link
Contributor

Choose a reason for hiding this comment

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

What you're describing sounds like "add-set", but this is "retain-set". I would expect "retain-set" to reference a final set of capabilities that the process should have, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure to understand the difference.

If it is the final set of capabilities, what is the remove set below for?

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I'd been considering them mutually exclusive. Either you use the retain-set in which case you're specifying exactly which capabilities you want, or you specify nothing in which case you get the default set, or you specify remove-set in which case you get the default set minus remove-set.

Copy link
Contributor

Choose a reason for hiding this comment

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

"retain" sounds much like, "ensure these capabilities are present", but below the remove-set booleans from this list. Sounds a little confusing.

Copy link
Member Author

@alban alban May 4, 2016

Choose a reason for hiding this comment

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

@jonboulle ohh... that's not what has been implemented. It's possible to change this but I wonder if previous images with a retain-set of cap_net_admin would expect other caps as well but would not get them anymore.

Docker also has --cap-add and --cap-drop that can be used together:
https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

By default, Docker has a default list of capabilities that are kept.

The default list for Docker is defined there:
https://github.com/docker/docker/blob/master/oci/defaults_linux.go#L64-L79

/cc @s-urbaniak

Copy link

Choose a reason for hiding this comment

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

While it is possible for earlier versions of application images may be looking for additional capabilities, my understanding of the retain set from the specification was that it allowed the developer to create a whitelist of capabilities their application should have access to.

Additionally, once the remove set is implemented in rkt it will be possible to have a smaller set of capabilities but it is far easier in cases where a small number of capabilities are required to say:
I need CAP_KILL, and CAP_CHOWN only, rather than specifying the 12 or so capabilities that they do not need from the default capability list.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, I will update this PR following your semantics.

@alban
Copy link
Member Author

alban commented May 5, 2016

Patch updated, PTAL.

@jonboulle
Copy link
Contributor

LGTM

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

Successfully merging this pull request may close these issues.

4 participants