rbac

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizedClusterIDsKey = "authorized_cluster_ids"
)
View Source
const (
	UserIDKey = "rbac_user_id"
)

Variables

This section is empty.

Functions

func AuthorizedClusterIDs

func AuthorizedClusterIDs(c *gin.Context) []string

func AuthorizedUserID

func AuthorizedUserID(c *gin.Context) (string, bool)

func NewMiddleware

func NewMiddleware(provider Provider, codec HeaderCodec) gin.HandlerFunc

Types

type HeaderCodec

type HeaderCodec interface {
	Key() string
	Encode(ids []string) string
	Decode(s string) []string
}

type Provider

type Provider interface {
	SubjectAccess(context.Context, *corev1.SubjectAccessRequest) (*corev1.ReferenceList, error)
}

Jump to

Keyboard shortcuts

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