Skip to content

Commit

Permalink
Restore fs group and supplemental groups to explicit range starting a…
Browse files Browse the repository at this point in the history
…t 0 else persistent volumes fail under baseline.
  • Loading branch information
GrahamDumpleton committed May 8, 2022
1 parent ccb075c commit 4804efe
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions carvel-package/bundle/config/01-podsecuritypolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,19 @@ spec:
#! so if using SELinux, you must choose a more restrictive default.
rule: 'RunAsAny'
supplementalGroups:
rule: 'RunAsAny'
#! XXX Standard policy usually has RunAsAny, but we set a range so that
#! it will add a supplementalGroup if none set.
rule: 'MustRunAs'
ranges:
- min: 0
max: 65535
fsGroup:
rule: 'RunAsAny'
#! XXX Standard policy usually has RunAsAny, but we set a range so that
#! it will add a supplementalGroup if none set.
rule: 'MustRunAs'
ranges:
- min: 0
max: 65535

---
apiVersion: policy/v1beta1
Expand Down Expand Up @@ -150,14 +160,14 @@ spec:
supplementalGroups:
rule: 'MustRunAs'
ranges:
#! Forbid adding the root group.
- min: 1
#! XXX Allow group ID of 0. This deviates from standard policies.
- min: 0
max: 65535
fsGroup:
rule: 'MustRunAs'
ranges:
#! Forbid adding the root group.
- min: 1
#! XXX Allow group ID of 0. This deviates from standard policies.
- min: 0
max: 65535
readOnlyRootFilesystem: false
#@ end

0 comments on commit 4804efe

Please sign in to comment.