util

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizationAttributesFrom

func AuthorizationAttributesFrom(spec authv1.SubjectAccessReviewSpec) authorizer.AttributesRecord

AuthorizationAttributesFrom takes a spec and returns the proper authz attributes to check it.

func AuthorizationAttributesListFrom

func AuthorizationAttributesListFrom(spec authv1.SubjectAccessReviewSpec) []authorizer.AttributesRecord

AuthorizationAttributesListFrom takes a spec and returns the proper authz attribute list to check it.

func NonResourceAttributesFrom

func NonResourceAttributesFrom(user user.Info, in authv1.NonResourceAttributes) authorizer.AttributesRecord

NonResourceAttributesFrom combines the API object information and the user.Info from the context to build a full authorizer.AttributesRecord for non resource access. Tke-auth considers non-resource path as the resource field.

func ResourceAttributesFrom

func ResourceAttributesFrom(user user.Info, in authv1.ResourceAttributes) authorizer.AttributesRecord

ResourceAttributesFrom combines the API object information and the user.Info from the context to build a full authorizer.AttributesRecord for resource access.

func ValidateSubjectAccessReview

func ValidateSubjectAccessReview(sar *authv1.SubjectAccessReview) field.ErrorList

ValidateSubjectAccessReview validates SubjectAccessReview

func ValidateSubjectAccessReviewSpec

func ValidateSubjectAccessReviewSpec(spec authv1.SubjectAccessReviewSpec, fldPath *field.Path) field.ErrorList

ValidateSubjectAccessReviewSpec validates SubjectAccessReviewSpec resource attributes and user

Types

This section is empty.

Jump to

Keyboard shortcuts

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