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

docker: add capabilities and privileged support #11962

Closed
wants to merge 3 commits into from

Conversation

artur-rs
Copy link

@artur-rs artur-rs commented May 29, 2019

Added options for running container with:

  • privileged mode
  • all Linux capabilities added/dropped
  • add/drop specific Linux capabilities (multiple)

Implements https://github.com/cockpit-project/cockpit/issues/10637

Copy link
Contributor

@KKoukiou KKoukiou left a comment

Choose a reason for hiding this comment

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

Took a very quick look, the code looks good.
Some comments only, some for duscussion,

  • Please add a test ins test/verify/check-docker, (ask on IRC for help with that if needed)
  • Remove the signoff line in the commit message pls, we don't use it in this project
  • I am ok with the checkboxes, "Add ALL" "Drop ALL" but what's the default state? Some capabilities are added?

@artur-rs artur-rs force-pushed the docker-caps-priv branch 2 times, most recently from 53bb050 to 1bf5a51 Compare June 12, 2019 13:23
@KKoukiou
Copy link
Contributor

@artur-rs this still needs a test in test/veify/check-docker in order to get merged. Are you fine to work on it?

@artur-rs
Copy link
Author

@KKoukiou yes, I have tests ready, but the test architecture were a little problematic, so the tests weren't fully verified locally. I can push the code though.

I am ok with the checkboxes, "Add ALL" "Drop ALL" but what's the default state? Some capabilities are added?

Yes, by default some of the capabilities are added. Full list can be found here: url

@artur-rs
Copy link
Author

@KKoukiou rebased and resolved merge conflicts

@marusak
Copy link
Member

marusak commented Jul 23, 2019

Needs to rebase to master since #12367 changed tests names

artur-rs added 3 commits July 25, 2019 12:05
Added options for running container with:
* all Linux capabilities added/dropped
* add/drop specific Linux capabilities (multiple)
* privileged mode
Copy link
Member

@marusak marusak left a comment

Choose a reason for hiding this comment

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

This looks really nice! :)
I would like to hear what does @andreasn think about the design, but I think it fits very nicely.
I have noticed that when I tab through the selections it jumps "randomly" (left section first then right and from left to right - this should be fixable very easily with using display:flex; justify-context:space-between)
Also the tests do not run. Have you been able to run them locally and debug it or can I help you with it?
Lastly can you please squash the commits into one?

I didn't check the code fully right now, but seems rather nice. Lets fix what I mentioned above first, thanks!


# add ALL capabilities and drop specific one
b.click("#add-all-capabilities")
b.click("claim-capabilities")
Copy link
Member

Choose a reason for hiding this comment

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

Have you figured out how to run tests? This needs # as it is id. I havn't run anymore tests.

@marusak marusak requested a review from andreasn August 9, 2019 14:34
Copy link
Contributor

@andreasn andreasn left a comment

Choose a reason for hiding this comment

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

Great start, but it seems the UI has some weird states that I think we can fix to make it easier to operate.

  • Enable seems to be mutually exclusive with everything else. It cancels out all other actions, and removes any other rules. What's the opposite of this state? Is it more of a "bring-out-the-big-hammer" vs. select what capabilities you want? If so, it needs some improved labels and I probably a radio button between this mode and the pick-your-priviledges mode. It would be especially good if it could recall the state of the other mode, so if I switch between them, I don't throw away all the work I put into the fine grained rules.
  • Add ALL and Drop ALL seems mutually exclusive, so should probably use radio buttons to select those modes instead of checkboxes.
  • How is "Choose specific Linux capabilities" related to Add/Drop ALL? Are the labels below included in the list of ALL?
  • The "Choose specific Linux capabilities" ends up in a weird state if I remove the last item in the list. I have to uncheck and then check the checkbox for "Choose specific Linux capabilities" to get the list back. Could be solved by not allowing to delete the last item, if there is only one item in the list. Seems like the other controls works like this as well though, so not as critical.

@marusak
Copy link
Member

marusak commented Oct 7, 2019

@artur-rs ping, are you block on something that I may help you with?

@marusak
Copy link
Member

marusak commented Mar 19, 2020

We announced that we are deprecating cockpit-docker, so this is obsolete. Moving the underlying issue into cockpit-podman.

@marusak marusak closed this Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants