Help us shape the future of Go! Take the 2026 Go Developer Survey

control

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0, Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package control authenticates public requests and authorizes administrative operations, then invokes the private provider protocols. Built-in private service handlers and storage adapters live in pkg/facts/server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admins

type Admins struct{ Users, Groups []string }

func (Admins) Allows

func (a Admins) Allows(u *facts.Actor) bool

type Config

type Config struct {
	Key                                                    sshcert.RawPrivateKey
	DirectoryURL, DirectoryBackendURL, InventoryBackendURL string
	Validator                                              TokenValidator
	DirectoryAdmins, InventoryAdmins                       Admins
	SCIMToken                                              string
	InventoryToken                                         string
	// EnrollmentToken authorizes pending submissions only. Empty disables that
	// path; single-use preapproval credentials are validated by inventory.
	EnrollmentToken string
	TLS             tlsconfig.Config
}

Config keeps identity and administrative grants at control. The directory complete lookup URL is required and discovers optional SCIM management. DirectoryBackendURL enables the built-in directory snapshot and audit APIs; InventoryBackendURL is the complete inventory fact endpoint where optional management resources are discovered.

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Server, error)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TokenValidator

type TokenValidator interface {
	Validate(context.Context, string) (*oidc.Claims, error)
}

Jump to

Keyboard shortcuts

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