user

package
v0.0.0-...-d0acf64 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AuthenticatedGroup = "mesh-system:authenticated"

Variables

View Source
var Admin = User{
	Name:   "mesh-system:admin",
	Groups: []string{"mesh-system:admin"},
}

Admin is a static user that can be used when authn mechanism does not authenticate to specific user, but authenticate to admin without giving credential (ex. authenticate as localhost, authenticate via legacy client certs).

View Source
var Anonymous = User{
	Name:   "mesh-system:anonymous",
	Groups: []string{"mesh-system:unauthenticated"},
}
View Source
var ControlPlane = User{
	Name:   "mesh-system:control-plane",
	Groups: []string{},
}

ControlPlane is a static user that is used whenever the control plane itself executes operations. For example: update of DataplaneInsight, creation of default resources etc.

Functions

func Ctx

func Ctx(ctx context.Context, user User) context.Context

Types

type User

type User struct {
	Name   string
	Groups []string
}

func FromCtx

func FromCtx(ctx context.Context) User

func (User) Authenticated

func (u User) Authenticated() User

func (User) String

func (u User) String() string

Jump to

Keyboard shortcuts

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