Documentation ¶
Index ¶
- func Covers(ownerRules, servantRules []authorizationapi.PolicyRule) (bool, []authorizationapi.PolicyRule)
- type AuthorizationRuleResolver
- type BindingLister
- type DefaultRuleResolver
- func (a *DefaultRuleResolver) GetEffectivePolicyRules(ctx kapi.Context) ([]authorizationapi.PolicyRule, error)
- func (a *DefaultRuleResolver) GetRole(roleBinding authorizationapi.RoleBinding) (*authorizationapi.Role, error)
- func (a *DefaultRuleResolver) GetRoleBindings(ctx kapi.Context) ([]authorizationapi.RoleBinding, error)
- type PolicyGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Covers ¶
func Covers(ownerRules, servantRules []authorizationapi.PolicyRule) (bool, []authorizationapi.PolicyRule)
Covers determines whether or not the ownerRules cover the servantRules in terms of allowed actions. It returns whether or not the ownerRules cover and a list of the rules that the ownerRules do not cover.
Types ¶
type AuthorizationRuleResolver ¶
type AuthorizationRuleResolver interface { GetRoleBindings(ctx kapi.Context) ([]authorizationapi.RoleBinding, error) GetRole(roleBinding authorizationapi.RoleBinding) (*authorizationapi.Role, error) // GetEffectivePolicyRules returns the list of rules that apply to a given user in a given namespace and error. If an error is returned, the slice of // PolicyRules may not be complete, but it contains all retrievable rules. This is done because policy rules are purely additive and policy determinations // can be made on the basis of those rules that are found. GetEffectivePolicyRules(ctx kapi.Context) ([]authorizationapi.PolicyRule, error) }
type BindingLister ¶
type BindingLister interface { // ListPolicyBindings obtains list of policyBindings that match a selector. ListPolicyBindings(ctx kapi.Context, label labels.Selector, field fields.Selector) (*authorizationapi.PolicyBindingList, error) }
type DefaultRuleResolver ¶
type DefaultRuleResolver struct {
// contains filtered or unexported fields
}
func NewDefaultRuleResolver ¶
func NewDefaultRuleResolver(policyGetter PolicyGetter, bindingLister BindingLister, clusterPolicyGetter PolicyGetter, clusterBindingLister BindingLister) *DefaultRuleResolver
func (*DefaultRuleResolver) GetEffectivePolicyRules ¶
func (a *DefaultRuleResolver) GetEffectivePolicyRules(ctx kapi.Context) ([]authorizationapi.PolicyRule, error)
GetEffectivePolicyRules returns the list of rules that apply to a given user in a given namespace and error. If an error is returned, the slice of PolicyRules may not be complete, but it contains all retrievable rules. This is done because policy rules are purely additive and policy determinations can be made on the basis of those rules that are found.
func (*DefaultRuleResolver) GetRole ¶
func (a *DefaultRuleResolver) GetRole(roleBinding authorizationapi.RoleBinding) (*authorizationapi.Role, error)
func (*DefaultRuleResolver) GetRoleBindings ¶
func (a *DefaultRuleResolver) GetRoleBindings(ctx kapi.Context) ([]authorizationapi.RoleBinding, error)
type PolicyGetter ¶
Click to show internal directories.
Click to hide internal directories.