explorer

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerbGet uint = 1 << iota
	VerbList
	VerbWatch
	VerbCreate
	VerbUpdate
	VerbPatch
	VerbDelete
	VerbDeletionC
	VerbAll = VerbGet | VerbList | VerbUpdate | VerbDelete | VerbDeletionC | VerbPatch | VerbCreate | VerbWatch
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyExplorer

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

func NewPolicyExplorer

func NewPolicyExplorer(client *kubernetes.Clientset) *PolicyExplorer

func (*PolicyExplorer) ClusterSbjRoles

func (e *PolicyExplorer) ClusterSbjRoles(ctx context.Context, sbj *rbacv1.Subject) ([]*SubjectRole, error)

ClusterSbjRoles explores bound cluster roles to the specified subject.

func (*PolicyExplorer) NamespacedSbjRoles

func (e *PolicyExplorer) NamespacedSbjRoles(ctx context.Context, sbj *rbacv1.Subject) ([]*SubjectRole, error)

NamespacedSbjRoles explores bound namespaced roles to the specified subject.

type Resource

type Resource struct {
	Name        string
	Groups      []string
	Subresource string
}

func (Resource) String

func (r Resource) String() string

type ResourceAPIPolicy

type ResourceAPIPolicy struct {
	Resource       Resource
	APIVerbFlag    uint
	OtherVerbs     []string
	ResourceName   []string
	NonResourceURL []string
}

func NewResourceAPIPolicy

func NewResourceAPIPolicy(res Resource, rule rbacv1.PolicyRule) *ResourceAPIPolicy

func (*ResourceAPIPolicy) SetVerbs

func (r *ResourceAPIPolicy) SetVerbs(verbs []string)

type SubjectPolicyList

type SubjectPolicyList struct {
	APIPolicies []*ResourceAPIPolicy
	PSPs        []*policyv1beta1.PodSecurityPolicy
}

type SubjectRole

type SubjectRole struct {
	BindingName      string
	BindingNamespace string
	BindingType      string
	Name             string
	Namespace        string
	Type             string
	PolicyList       *SubjectPolicyList
}

Jump to

Keyboard shortcuts

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