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

[CI:DOCS] Fix up documentation of the userns audit flag #10909

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jul 12, 2021

Add reference to the containers user in the /etc/subuid and
/etc/subgid files.

Fixes: #10906

Signed-off-by: Daniel J Walsh [email protected]

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

rhatdan commented Jul 12, 2021

@TomSweeneyRedHat @giuseppe @mheon PTAL

@rhatdan rhatdan force-pushed the docs branch 9 times, most recently from 2695ebb to ce423c5 Compare July 12, 2021 16:28
- **auto[:**_OPTIONS,..._**]**: automatically create a namespace. It is possible to specify these options to `auto`:
**auto[:_OPTIONS,..._]**: automatically create a unigue user namespace.

The `--userns=auto` flag, requires that the user name `containers` and a range of subordinate user ids that the Podman container is allowed to use be specified in the /etc/subuid and /etc/subgid files. Example: `containers:2147483647:2147483648`. Podman allocates unigue ranges of UIDs and GIDs from the `containers` group. The size of the ranges is based on the number of UIDs required in the image. The number of UIDs and GIDs can be overridden with the `size` option.
Copy link
Member

Choose a reason for hiding this comment

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

Should we mention root vs rootless usage here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a comment about only being rootless.

@@ -1676,6 +1686,16 @@ $ echo "asdf" | podman run --rm -i --entrypoint /bin/cat someimage
asdf
```

### Setting automatic User Namespace separated containers
Copy link
Member

Choose a reason for hiding this comment

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

Is this just in run, not create?

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 will work with create as well. But I wanted to show examples and the userns generated, with the main goal showing they are unigue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a create example.

@rhatdan
Copy link
Member Author

rhatdan commented Jul 13, 2021

@containers/podman-maintainers PTAL
@mheon @TomSweeneyRedHat PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 14, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, 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

The `--userns=auto` flag, requires that the user name `containers` and a range of subordinate user ids that the Podman container is allowed to use be specified in the /etc/subuid and /etc/subgid files. Example: `containers:2147483647:2147483648`. Podman allocates unigue ranges of UIDs and GIDs from the `containers` group. The size of the ranges is based on the number of UIDs required in the image. The number of UIDs and GIDs can be overridden with the `size` option. The `auto` options currently does not work in rootless mode

Valid `auto`options:

- **gidmapping=**_HOST_GID:CONTAINER_GID:SIZE_: to force a GID mapping to be present in the user namespace.
Copy link
Member

Choose a reason for hiding this comment

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

to fit the new manpage syntax, these should be only a single asterisk, except for the default value.

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

Couple nits that need tending....

@rhatdan rhatdan force-pushed the docs branch 2 times, most recently from 1877a7c to 883495f Compare July 14, 2021 19:26
Add reference to the `containers` user in the /etc/subuid and
/etc/subgid files.

Fixes: containers#10906

Signed-off-by: Daniel J Walsh <[email protected]>
@TomSweeneyRedHat
Copy link
Member

LGTM

@TomSweeneyRedHat
Copy link
Member

/lgtm
/hold
#until tests pass

@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 Jul 14, 2021
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2021
@TomSweeneyRedHat
Copy link
Member

/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 Jul 14, 2021
@openshift-merge-robot openshift-merge-robot merged commit 1e23684 into containers:main Jul 14, 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.

Unexpected different behavior between rootless and root podman
5 participants