Documentation ¶
Index ¶
- func AddUserToSAR(user user.Info, sar *authorization.SubjectAccessReview) *authorization.SubjectAccessReview
- func Authorize(sarClient internalversion.SubjectAccessReviewInterface, user user.Info, ...) error
- func NewLiveRuleResolver(policyRegistry policyregistry.Registry, ...) rulevalidation.AuthorizationRuleResolver
- type AuthorizationStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUserToSAR ¶
func AddUserToSAR(user user.Info, sar *authorization.SubjectAccessReview) *authorization.SubjectAccessReview
AddUserToSAR adds the requisite user information to a SubjectAccessReview. It returns the modified SubjectAccessReview.
func Authorize ¶
func Authorize(sarClient internalversion.SubjectAccessReviewInterface, user user.Info, resourceAttributes *authorization.ResourceAttributes) error
Authorize verifies that a given user is permitted to carry out a given action. If this cannot be determined, or if the user is not permitted, an error is returned.
func NewLiveRuleResolver ¶
func NewLiveRuleResolver(policyRegistry policyregistry.Registry, policyBindingRegistry policybindingregistry.Registry, clusterPolicyRegistry clusterpolicyregistry.Registry, clusterBindingRegistry clusterpolicybindingregistry.Registry) rulevalidation.AuthorizationRuleResolver
Types ¶
type AuthorizationStorage ¶
type AuthorizationStorage struct { Policy policyregistry.Storage PolicyBinding policybindingregistry.Storage ClusterPolicy clusterpolicyregistry.Storage ClusterPolicyBinding clusterpolicybindingregistry.Storage Role role.Storage RoleBinding rolebinding.Storage ClusterRole clusterrole.Storage ClusterRoleBinding clusterrolebinding.Storage }
func GetAuthorizationStorage ¶
func GetAuthorizationStorage(optsGetter restoptions.Getter, cachedRuleResolver rulevalidation.AuthorizationRuleResolver) (*AuthorizationStorage, error)
Click to show internal directories.
Click to hide internal directories.