Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify io.podman.annotations.seccomp #12679

Merged
merged 2 commits into from
Dec 23, 2021

Conversation

vrothberg
Copy link
Member

Clarify the semantics of the io.podman.annotations.seccomp annotation
which is set when a container has been created with a custom seccomp
profile.

Fixes: #12671
Signed-off-by: Valentin Rothberg [email protected]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 22, 2021
@vrothberg
Copy link
Member Author

@containers/podman-maintainers PTAL

@vrothberg vrothberg changed the title [CI:DOCS] clarify io.podman.annotations.seccomp clarify io.podman.annotations.seccomp Dec 22, 2021
@vrothberg
Copy link
Member Author

@containers/podman-maintainers PTAL

@rhatdan please note the 2nd commit.

@vrothberg
Copy link
Member Author

Quay.io is down -> CI is red.

@vrothberg
Copy link
Member Author

/retest

test/e2e/build_test.go Outdated Show resolved Hide resolved
@umohnani8
Copy link
Member

LGTM

@@ -156,7 +156,9 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat

// Add annotations from the image
for k, v := range inspectData.Annotations {
annotations[k] = v
if !define.IsReservedAnnotation(k) {
Copy link
Member

Choose a reason for hiding this comment

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

Seems like it would be at least worth warning about completely ignoring a user-defined annotation?

Copy link
Member Author

Choose a reason for hiding this comment

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

A warning seems too aggressive IMO since it's not defined by the user but by the image. Note that Docker does not apply image annotations to the containers.

Cool with a debug message?

Copy link
Member

Choose a reason for hiding this comment

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

Sure

- **seccomp=unconfined**: Turn off seccomp confinement for the container
- **seccomp**=_profile.json_: Allowed syscall list seccomp JSON file to be used as a seccomp filter
- **seccomp=unconfined**: Turn off seccomp confinement for the container.
- **seccomp=profile.json**: White listed syscalls seccomp Json file to be used as a seccomp filter. Note that the `io.podman.annotations.seccomp` annotation is set with the specified value as shown in `podman inspect`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- **seccomp=profile.json**: White listed syscalls seccomp Json file to be used as a seccomp filter. Note that the `io.podman.annotations.seccomp` annotation is set with the specified value as shown in `podman inspect`.
- **seccomp=profile.json**: Whitelisted syscalls seccomp JSON file to be used as a seccomp filter. Note that the `io.podman.annotations.seccomp` annotation is set with the specified value as shown in `podman inspect`.

Copy link
Member

Choose a reason for hiding this comment

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

since we are at it, should we s|white|allow|?

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 think it should be JSON file to be used as a seccomp filter since it could be any kind of filter.

Clarify the semantics of the `io.podman.annotations.seccomp` annotation
which is set when a container has been created with a custom seccomp
profile.

Fixes: containers#12671
Signed-off-by: Valentin Rothberg <[email protected]>
Do not apply reserved annotations from the image to the container.
Reserved annotations are applied during container creation to retrieve
certain information (e.g., custom seccomp profile or autoremoval)
once a container has been created.

Context: containers#12671
Signed-off-by: Valentin Rothberg <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Dec 23, 2021

/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 23, 2021
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 23, 2021
@vrothberg
Copy link
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 23, 2021
@openshift-merge-robot openshift-merge-robot merged commit 5570b5b into containers:main Dec 23, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotation "io.podman.annotations.seccomp" has no effect
7 participants