aks-engine icon indicating copy to clipboard operation
aks-engine copied to clipboard

Add ability to manually specify an AuditPolicy for the kube-apiserver

Open carlsoncoder opened this issue 5 years ago • 1 comments

Describe the request After reviewing the documentation, I'm unable to find a way to do this. If there is a way I'm missing, please let me know.

Currently, kubernetes auditing is enabled on the k8s master nodes when deployed via aks-engine. While I don't know the specifics of what is all audited, I do know that "Secret" objects are being audited with either a "Request" or "RequestResponse" policy. What this means, is that when I say, create a new secret object in Kubernetes with a password, I can then view the logs and see the base64 encoded value of that secret in plain-text in the log file.

I would like to be able to specify my own Audit Policy file that would be used by the kube-apiserver deployed by aks-engine, so I can specify to either not audit ConfigMap/Secret objects at all, or log them with the "Metadata" policy which I believe would NOT include the base64 encoded secret value in the audit logs.

Explain why AKS Engine needs it

Aks-engine needs this so users have a way to specify what objects they do or do not want audited in kubernetes

Describe the solution you'd like

I would think it'd be a new property you could set in the apiServerConfig options, but I'm not exactly sure how that would work since you'd need a full YAML file. Maybe the cluster definition JSON would just point to a local YAML file, and then aks-engine would read the contents out of that file, and update the existing audit-policy file with the user specified one? However if you just have that default audit policy right on the actual kube-apiserver image itself that might not be possible.

I'm not sure of the best way to implement it, but the ask is simply "provide a way that a user can specify their own audit policy YAML file, which will then be used by the kube-apiserver component, instead of the default one provided with aks-engine"

Describe alternatives you've considered I'm not really sure there are any alternatives, short of SSH'ing into each master node and manually modifying the audit policy file.

Additional context

carlsoncoder avatar Feb 25 '21 19:02 carlsoncoder

Hi, @carlsoncoder - Thank you for opening this issue. As AKS Engine is deprecated, we are not adding features. Please see the project status (https://github.com/Azure/aks-engine#project-status) and use either AKS or CAPZ as your needs require.

bridgetkromhout avatar Feb 11 '22 23:02 bridgetkromhout