control

package
v0.42.0 Latest Latest
Warning

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

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

Documentation

Overview

Package control authenticates public requests and authorizes administrative operations, then invokes fact services through their typed clients. 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
	TLS                                                    tlsconfig.Config
}

Config keeps identity and administrative grants at control. The directory lookup URL is required; optional backend URLs enable the existing built-in management capabilities without imposing them on custom fact providers.

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