Authorization mode set to always allow This product is not supported for your selected
Datadog site . (
).
Id: kubernetes-authorization-mode-set-to-always-allow
Platform: Kubernetes
Severity: High
Category: Access Control
Learn More Description When using kubelet or kube-apiserver, the --authorization-mode flag should not be set to AlwaysAllow. The rule also checks KubeletConfiguration resources and flags an authorization.mode equal to AlwaysAllow. The AlwaysAllow mode grants unrestricted access to all requests and bypasses cluster authorization controls.
Compliant Code Examples apiVersion : v1
kind : Pod
metadata :
name : command-demo
labels :
purpose : demonstrate-command
spec :
containers :
- name : command-demo-container
image : gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command : [ "kube-apiserver" ]
args : [ "--authorization-mode=MyMode" ]
restartPolicy : OnFailure
apiVersion : v1
kind : Pod
metadata :
name : command-demo
labels :
purpose : demonstrate-command
spec :
containers :
- name : command-demo-container
image : gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command : [ "kube-apiserver" , "--authorization-mode=MyMode" ]
restartPolicy : OnFailure
apiVersion : v1
kind : Pod
metadata :
name : command-demo
labels :
purpose : demonstrate-command
spec :
containers :
- name : command-demo-container
image : foo/bar
command : [ "kubelet" ]
args : [ "--authorization-mode=MyMode" ]
restartPolicy : OnFailure
Non-Compliant Code Examples apiVersion : v1
kind : Pod
metadata :
name : command-demo
labels :
purpose : demonstrate-command
spec :
containers :
- name : command-demo-container
image : gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command : [ "kube-apiserver" ]
args :
[ "--anonymous-auth=false" , "--authorization-mode=MyMode,AlwaysAllow" ]
restartPolicy : OnFailure
apiVersion : v1
kind : Pod
metadata :
name : command-demo
labels :
purpose : demonstrate-command
spec :
containers :
- name : command-demo-container
image : gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command : [ "kube-apiserver" , "--authorization-mode=MyMode,AlwaysAllow" ]
restartPolicy : OnFailure
apiVersion : v1
kind : Pod
metadata :
name : command-demo
labels :
purpose : demonstrate-command
spec :
containers :
- name : command-demo-container
image : foo/bar
command : [ "kubelet" ]
args :
[ "--anonymous-auth=false" , "--authorization-mode=MyMode,AlwaysAllow" ]
restartPolicy : OnFailure