Skip to content

Commit

Permalink
make the kubelet cafile test posix compliant (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwmonroe committed Jul 21, 2020
1 parent 6669295 commit 2a325bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions cfg/cis-1.3/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,7 @@ groups:
text: Ensure that the client certificate authorities file ownership is set to root:root (Scored)
audit: |
CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}')
if [[ -z $CAFILE ]]; then
CAFILE=$kubeletcafile
fi
if test -z $CAFILE; then CAFILE=$kubeletcafile; fi
if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi
tests:
test_items:
Expand Down
4 changes: 1 addition & 3 deletions cfg/cis-1.4/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,7 @@ groups:
text: Ensure that the client certificate authorities file ownership is set to root:root (Scored)
audit: |
CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}')
if [[ -z $CAFILE ]]; then
CAFILE=$kubeletcafile
fi
if test -z $CAFILE; then CAFILE=$kubeletcafile; fi
if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi
tests:
test_items:
Expand Down
4 changes: 1 addition & 3 deletions cfg/cis-1.5/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ groups:
text: "Ensure that the client certificate authorities file ownership is set to root:root (Scored)"
audit: |
CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}')
if [[ -z $CAFILE ]]; then
CAFILE=$kubeletcafile
fi
if test -z $CAFILE; then CAFILE=$kubeletcafile; fi
if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi
tests:
test_items:
Expand Down

0 comments on commit 2a325bd

Please sign in to comment.