Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer interface { // ListRoleBindingsForSubject returns all role bindings for the subject in the namespace(empty for all namespaces) ListRoleBindingsForSubject(sbj *rbacv1.Subject, namespace string) []*rbacv1.RoleBinding // ListClusterRoleBindingsForSubject returns all role bindings for the subject in the namespace(empty for all namespaces) ListClusterRoleBindingsForSubject(sbj *rbacv1.Subject) []*rbacv1.ClusterRoleBinding // GetRoleForRoleBinding returns the role specified by RoleBinding, or nil if not exists GetRoleForRoleBinding(rb *rbacv1.RoleBinding) *rbacv1.Role // GetRoleForRoleRef returns the role specified by RoleRef, or nil if not exists GetRoleForRoleRef(namespace string, roleRef *rbacv1.RoleRef) *rbacv1.Role // GetClusterRoleForRoleBinding returns the role specified by RoleBinding, or nil if not exists GetClusterRoleForRoleBinding(rb *rbacv1.RoleBinding) *rbacv1.ClusterRole // GetClusterRoleForClusterRoleBinding returns the role specified by ClusterRoleBinding, or nil if not exists GetClusterRoleForClusterRoleBinding(rb *rbacv1.ClusterRoleBinding) *rbacv1.ClusterRole // GetClusterRoleForRoleRef returns the role specified by RoleRef, or nil if not exists GetClusterRoleForRoleRef(roleRef *rbacv1.RoleRef) *rbacv1.ClusterRole // ListPermissionsForRole returns associations related to all APIResources for Role ListPermissionsForRole(role *rbacv1.Role) []*rbactypes.APIResourcePermissionsList ListPermissionsForClusterRole(role *rbacv1.ClusterRole) []*rbactypes.APIResourcePermissionsList }
Analyzer analyzes Kubernetes RBAC resources
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option has all resources for Analyzer
func (*Option) AddAPIResourceList ¶
func (o *Option) AddAPIResourceList(apiResourceList *metav1.APIResourceList) *Option
AddAPIResourceList adds a new APIResourceList
func (*Option) AddRoleBinding ¶
func (o *Option) AddRoleBinding(rb *rbacv1.RoleBinding)
AddRoleBinding adds a new RoleBinding
func (*Option) AddSubject ¶
AddSubject adds a new Subject
Source Files
¶
Click to show internal directories.
Click to hide internal directories.