-
Notifications
You must be signed in to change notification settings - Fork 8
[WIP] [RELEASE-1.6][SRVKS-985] Add revision security defaults #68
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
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: skonto The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@skonto Thanks for the detailed analysis. If I understand it correctly setting the defaults as currently implemented in this PR will still produce a warning. It is slightly different warning but still it's there. |
Container sc seccompProfile is not configurable at all. User can only set seccompProfile at the podsecurity sc. TestShouldRunAsUserContainerDefault requires not to set the seccompProfile. Not sure we can distinguish between a normal ksvc and one that has anyuid set for its sa that is why I proposed to have a label. |
|
closing in favor of #132 |
SeccompProfile on OCP filters certain syscalls:
This means TestShouldRunAsUserContainerDefault will not work. Tried it with the ksvc here.
The downside here is that we still see the warning in the controller (other fields are fine) :
The warning seems weird (invalid?) because it is reported here that:
For this PR using
runAsUserworks as expected by setting:oc adm policy add-scc-to-user anyuid -z default -n {ns}if there is no labelpod-security.kubernetes.io/enforce=restricted. Tested with ksvc and by executinidin pod's containers.If such a namespace label exists then user needs to set:
oc adm policy add-scc-to-user nonroot-v2 -z default -n {ns}That would deviate from unfinished upstream work and also would require docs for that case.
However even if we set all fields we still get a different warning because seccompProfile is not available in crds:
unconfinedor "" for the seccompProfile as defined here (trying to figure out what empty means and it was supposed to be turned into runtime/default on OCP but it does not work or I am missing something):