matching

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package matching contains useful functionality for matching users

Index

Constants

View Source
const WildcardAll = "*"

WildcardAll is a character which represents all elements in a set.

Variables

This section is empty.

Functions

func ConvertUserInfoToSubject added in v0.3.0

func ConvertUserInfoToSubject(userInfo authenticationv1.UserInfo, namespace string) (subject rbacv1.Subject)

func IsRightUser

func IsRightUser(userInfo authenticationv1.UserInfo, subject rbacv1.Subject) bool

IsRightUser determine whether the two types of users match

func ServiceAccountMatches

func ServiceAccountMatches(subject rbacv1.Subject, userInfo authenticationv1.UserInfo) bool

ServiceAccountMatches returns `true` if the given service account in the subject has a match in the given userConfig. Supports `WildcardAll` in subject name.

func UserGroupMatches

func UserGroupMatches(subject rbacv1.Subject, userInfo authenticationv1.UserInfo) bool

UserGroupMatches returns `true` if the given group in the subject has a match in the given userConfig. Always returns true if `WildcardAll` is used in subject.

func UserMatches

func UserMatches(subject rbacv1.Subject, userInfo authenticationv1.UserInfo) bool

UserMatches returns `true` if the given user in the subject has a match in the given userConfig.

Types

This section is empty.

Jump to

Keyboard shortcuts

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