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

controlplane

package
v0.40.0 Latest Latest
Warning

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

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

Documentation

Overview

Package controlplane separates public authentication from backend mutations.

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 *directory.User) bool

type Backend

type Backend struct {
	Store            *inventory.Managed
	ManagedDirectory directory.Store
	Directory        directory.Directory
}

Backend owns only storage and invariants. Only the configured control key can invoke it; CA reader credentials never confer mutation authority.

func (*Backend) Handler

func (c *Backend) Handler(key sshcert.RawPublicKey) (http.Handler, error)

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