rbac

package
v0.0.0-...-03b3356 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGroupMatches

func APIGroupMatches(rule *rbacv1.PolicyRule, requestedGroup string) bool

func CompactString

func CompactString(r rbacv1.PolicyRule) string

CompactString exposes a compact string representation for use in escalation error messages

func NonResourceURLMatches

func NonResourceURLMatches(rule *rbacv1.PolicyRule, requestedURL string) bool

func ResourceMatches

func ResourceMatches(rule *rbacv1.PolicyRule, combinedRequestedResource, requestedSubresource string) bool

func ResourceNameMatches

func ResourceNameMatches(rule *rbacv1.PolicyRule, requestedName string) bool

func RoleRefGroupKind

func RoleRefGroupKind(roleRef rbacv1.RoleRef) schema.GroupKind

func String

func String(r rbacv1.PolicyRule) string

func SubjectsStrings

func SubjectsStrings(subjects []rbacv1.Subject) ([]string, []string, []string, []string)

subjectsStrings returns users, groups, serviceaccounts, unknown for display purposes.

func VerbMatches

func VerbMatches(rule *rbacv1.PolicyRule, requestedVerb string) bool

Types

type RBACAuthorizer

type RBACAuthorizer struct {
	// contains filtered or unexported fields
}

func (*RBACAuthorizer) Authorize

func (r *RBACAuthorizer) Authorize(requestAttributes authorizer.Attributes) (authorizer.Decision, string, error)

type SortableRuleSlice

type SortableRuleSlice []rbacv1.PolicyRule

func (SortableRuleSlice) Len

func (s SortableRuleSlice) Len() int

func (SortableRuleSlice) Less

func (s SortableRuleSlice) Less(i, j int) bool

func (SortableRuleSlice) Swap

func (s SortableRuleSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL