Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Blocking pods/exec and pods/attach functionality requires a small change to operations field of ValidatingWebHookConfiguration gatekeeper-validating-webhook-configuration in Azure Policy addon #4255

Closed
Speeddymon opened this issue May 2, 2024 · 5 comments
Labels

Comments

@Speeddymon
Copy link

Is your feature request related to a problem? Please describe.
I want to have an Azure Policy which blocks the usage of kubectl exec and kubectl attach to AKS resources.

This is pretty well documented in upstream Gatekeeper issue 1056

We can implement the policy in our clusters but it will have no effect.

The validating webhook gatekeeper-validating-webhook-configuration in AKS with Azure Policy addon has the webhook rules.operations field set to only apply to CREATE and UPDATE operations, but in order to block pods/exec and pods/attach, the operations would need to also include CONNECT.

Describe the solution you'd like
Since I cannot configure the Gatekeeper validating webhook configuration in Azure Policy, I wanted to feature request for the addition of CONNECT to the webhook rules.operations field.

Describe alternatives you've considered
I opened a support ticket in the Azure Portal and they referred me here

Additional context
N/A

@Speeddymon Speeddymon added the feature-request Requested Features label May 2, 2024
@Speeddymon Speeddymon changed the title [Feature Request] Support said to open this feature request [Feature Request] Blocking pods/exec and pods/attach functionality requires a small change to operations field of ValidatingWebHookConfiguration gatekeeper-validating-webhook-configuration in Azure Policy addon May 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added action-required Needs Attention 👋 Issues needs attention/assignee/owner labels Oct 30, 2024
@Speeddymon
Copy link
Author

Speeddymon commented Jan 20, 2025

Is it possible to get this update made? It's not a difficult thing to implement and testing should be straightforward.

@Speeddymon
Copy link
Author

Thank you

@anlandu
Copy link
Member

anlandu commented Jan 21, 2025

@Speeddymon CONNECT ops should already be enabled in AKS release 1025/policy addon version 1.8. What region are your clusters in? You can cross-reference the region against the AKS releases link to determine whether you should have received it yet

@Speeddymon
Copy link
Author

Thank you, I admit I hadn't checked again lately because there was no update here. I will check and confirm.

@Speeddymon
Copy link
Author

Speeddymon commented Jan 23, 2025

Thanks for your response, I've confirmed I can see CONNECT under the operations and pods/exec and pods/attach under the resources. Hence I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants