这个工具看起来比 rakkess 好得多,
正是我想要的
https://github.com/reactiveops/rbac-lookup
在最简单的用例中,rbac-lookup 将返回任何匹配的用户、服务帐户或组以及所赋予的角色。
rbac-lookup rob
SUBJECT SCOPE ROLE
rob@example.com cluster-wide ClusterRole/view
rob@example.com nginx-ingress ClusterRole/edit
The wide output option includes the kind of subject along with the source role binding.
Run Code Online (Sandbox Code Playgroud)
rbac-lookup ro --output wide
SUBJECT SCOPE ROLE SOURCE
User/rob@example.com cluster-wide ClusterRole/view ClusterRoleBinding/rob-cluster-view
User/rob@example.com nginx-ingress ClusterRole/edit RoleBinding/rob-edit
User/ron@example.com web ClusterRole/edit RoleBinding/ron-edit
ServiceAccount/rops infra ClusterRole/admin RoleBinding/rops-admin
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6909 次 |
| 最近记录: |