Documentation ¶
Index ¶
- Variables
- func EventToAttributes(event *audit.Event) authorizer.AttributesRecord
- func FilterEvent(event *audit.Event, userRegex *regexp.Regexp, UserFilterInverse bool, ...) bool
- func Output(w io.Writer, obj runtime.Object, format string) error
- func ReadAuditEvents(sources []string, filters ...func(*audit.Event) bool) (<-chan *StreamObject, error)
- type GenerateOptions
- type Generator
- type RBACObjects
- type StreamObject
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Scheme knows about audit and rbac types Scheme = runtime.NewScheme() // Decoder knows how to decode audit and rbac objects Decoder runtime.Decoder )
Functions ¶
func EventToAttributes ¶
func EventToAttributes(event *audit.Event) authorizer.AttributesRecord
func FilterEvent ¶
func ReadAuditEvents ¶
Types ¶
type GenerateOptions ¶
type GenerateOptions struct { VerbExpansions map[string][]string ExpandMultipleNamesToUnnamed bool ExpandMultipleNamespacesToClusterScoped bool Name string Annotations map[string]string }
GenerateOptions specifies options for generating RBAC roles
func DefaultGenerateOptions ¶
func DefaultGenerateOptions() GenerateOptions
DefaultGenerateOptions returns default generation options
type Generator ¶
type Generator struct { Options GenerateOptions // contains filtered or unexported fields }
Generator allows generating a set of covering RBAC roles and bindings
func NewGenerator ¶
func NewGenerator(existing RBACObjects, requests []authorizer.AttributesRecord, options GenerateOptions) *Generator
NewGenerator creates a new Generator
func (*Generator) Generate ¶
func (g *Generator) Generate() *RBACObjects
Generate returns a set of RBAC roles and bindings that cover the specified requests
type RBACObjects ¶
type RBACObjects struct { Roles []*rbacv1.Role RoleBindings []*rbacv1.RoleBinding ClusterRoles []*rbacv1.ClusterRole ClusterRoleBindings []*rbacv1.ClusterRoleBinding }
RBACObjects holds lists of RBAC API objects
func GetDiscoveryRoles ¶
func GetDiscoveryRoles() RBACObjects
type StreamObject ¶
Click to show internal directories.
Click to hide internal directories.