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

How to manipulate azure policies on the basis of cluster roles in AKS #748

Closed
smartaquarius10 opened this issue Apr 20, 2021 · 8 comments
Closed
Labels
azure-policy-kubernetes Label to use for Azure Policy for Kubernetes issues

Comments

@smartaquarius10
Copy link

Team,

In kubernetes, we can take the benefit of cluster role and rolebindings to bifurcate the pod security policies as per the privileges of admin and non-admin users.

In Azure kubernetes, if we apply any azure policy for eg. not allowing privilege pods then it will restrict all the users including admins as well.

How to control this restriction in Azure policies because PSP in AKS are deprecated and it is mandatory to use Azure policies now onwards.

Thank you

@ritazh
Copy link
Member

ritazh commented Apr 22, 2021

Thank you for the feedback @smartaquarius10! Do you mind opening an issue in https://github.com/open-policy-agent/gatekeeper-library/issues? As PSP is moving from v1 to v2 design, there are some recommended practices around user-based exemptions. Let's talk about the tradeoffs and alternatives to fit your use case in the gatekeeper-library repo with other community members.

@smartaquarius10
Copy link
Author

smartaquarius10 commented Apr 24, 2021

@ritazh Sure Rita. Will do that. Thanks for the info. I have opened this issue in the suggested repository.

Should I close the issue here?

@smartaquarius10
Copy link
Author

@ritazh , Hello Rita. Hope you're doing well.

Is there any other repository or community portal where I can ask this question because its been 3 days and I have not received any reply on that repository.

I have to convert the AKS to a shared resource for which psp's are required and Admin vs non-admin bifurcation is necessary. But, as per my understanding, the current architecture of Azure policies is not adhering to this role based segregation which is definitely a need.

Please let me know if you can share any other contacts. Thank you. Take care.

@ritazh
Copy link
Member

ritazh commented Apr 28, 2021

@smartaquarius10 Thanks for opening the other issue. Let’s continue the discussion in Gatekeeper as it applies to K8s PSP v2 guidance as well as Gatekeepr policies. Feel free to close this issue here.

@smartaquarius10
Copy link
Author

Thanks

@ritazh
Copy link
Member

ritazh commented May 18, 2021

@RamyasreeChakka can you pls help @smartaquarius10 with the issue raised open-policy-agent/gatekeeper-library#78 (comment) regarding how to apply labelSelector to builtin policies? Seems we are missing docs around this new feature.

@RamyasreeChakka RamyasreeChakka added the azure-policy-kubernetes Label to use for Azure Policy for Kubernetes issues label May 18, 2021
@nreisch
Copy link
Member

nreisch commented May 18, 2021

Addressing this comment : open-policy-agent/gatekeeper-library#78 (comment)

Hi @smartaquarius10, although it may be hard to parse, the schema tab in the assignment UI shows the expected format. In this case try adding matchExpressions like the following:
image

@smartaquarius10
Copy link
Author

smartaquarius10 commented May 19, 2021

@ritazh , @nreisch , Thank you so much. Will try that right now. Take care.

Regards
Tanul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-policy-kubernetes Label to use for Azure Policy for Kubernetes issues
Projects
None yet
Development

No branches or pull requests

4 participants