Skip to content

Commit

Permalink
add caps defaulting
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Weil committed Jan 19, 2016
1 parent 46069e5 commit 6cb0a4c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cmd/server/bootstrappolicy/securitycontextconstraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ func GetBootstrapSecurityContextConstraints(sccNameToAdditionalGroups map[string
SupplementalGroups: kapi.SupplementalGroupsStrategyOptions{
Type: kapi.SupplementalGroupsStrategyRunAsAny,
},
// drops unsafe caps
RequiredDropCapabilities: []kapi.Capability{"KILL", "MKNOD", "SYS_CHROOT", "SETUID", "SETGID"},
},
// SecurityContextConstraintsAnyUID allows no host access and allocates SELinux.
{
Expand All @@ -217,6 +219,8 @@ func GetBootstrapSecurityContextConstraints(sccNameToAdditionalGroups map[string
},
// prefer the anyuid SCC over ones that force a uid
Priority: &securityContextConstraintsAnyUIDPriority,
// drops unsafe caps
RequiredDropCapabilities: []kapi.Capability{"KILL", "MKNOD", "SYS_CHROOT", "SETUID", "SETGID"},
},
}

Expand Down

0 comments on commit 6cb0a4c

Please sign in to comment.