Using audit2rbac to debug policies
There is a tool called audit2rbac
that can reverse engineer errors in the audit log into RBAC policy objects. In this section, we'll use this tool to generate an RBAC policy after discovering that one of our users can't perform an action they need to be able to do. This is a typical RBAC debugging process and learning how to use this tool can save you hours trying to isolate RBAC issues:
- In the previous chapter, a generic RBAC policy was created to allow all members of the
k8s-cluster-admins
group to be administrators in our cluster. If you're logged into OpenUnison, log out. - Now, log in again, but before hitting the Finish Login button at the bottom of the screen, remove the
k8s-cluster-admins
group and addcn=k8s-create-ns,cn=users,dc=domain,dc=com
: - Next, click on Finish Login. Once logged in, go to the dashboard. Just as when OpenUnison was first deployed, there won&apos...