nodeagentauthorizer

package
v1.108.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HandlerName is the name of this authorization webhook handler.
	HandlerName = "node-agent-authorizer"
	// WebhookPath is the HTTP handler path for this authorization webhook handler.
	WebhookPath = "/webhooks/auth/nodeagent"
)

Variables

This section is empty.

Functions

func GetNodeAgentIdentity

func GetNodeAgentIdentity(u user.Info) (string, bool)

GetNodeAgentIdentity returns the node name and a boolean which indicates whether the user is a gardener-node-agent.

func NewAuthorizer

func NewAuthorizer(logger logr.Logger, sourceClient, targetClient client.Client, machineNamespace string) *authorizer

NewAuthorizer returns a new authorizer for requests from gardener-node-agents. It never has an opinion on the request.

Types

type Webhook

type Webhook struct {
	Logger  logr.Logger
	Handler http.Handler
	Config  config.NodeAgentAuthorizerWebhookConfig
}

Webhook represents the webhook of node-agent authorizer.

func (*Webhook) AddToManager

func (w *Webhook) AddToManager(mgr manager.Manager, sourceClient, targetClient client.Client) error

AddToManager adds Handler to the given manager.

Jump to

Keyboard shortcuts

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