package util

import "k8s.io/kubernetes/pkg/registry/authorization/util"

Index

Functions

func AuthorizationAttributesFrom

func AuthorizationAttributesFrom(spec authorizationapi.SubjectAccessReviewSpec) authorizer.AttributesRecord

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

func BuildEvaluationError

func BuildEvaluationError(evaluationError error, attrs authorizer.AttributesRecord) string

BuildEvaluationError constructs the evaluation error string to include in *SubjectAccessReview status based on the authorizer evaluation error and any field and label selector parse errors.

func NonResourceAttributesFrom

func NonResourceAttributesFrom(user user.Info, in authorizationapi.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

func ResourceAttributesFrom

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

Source Files

helpers.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
12 packages
Last checked
3 hours ago

Tools for package owners.