serverpolicy

package
v0.2.0-preview.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package serverpolicy validates the root-owned allowlist used by Tend's restricted SSH receiver. It contains service names and paths, never secrets.

Index

Constants

View Source
const SchemaVersion = 1

Variables

This section is empty.

Functions

func CheckConfig

func CheckConfig(path string, cfg config.Config) error

Types

type CheckedService

type CheckedService struct {
	Name   string
	Config config.Config
	Policy ServicePolicy
}

type Policy

type Policy struct {
	SchemaVersion  int                      `json:"schema_version"`
	ConfigRoot     string                   `json:"config_root"`
	IncomingRoot   string                   `json:"incoming_root"`
	SharedLockFile string                   `json:"shared_lock_file"`
	Services       map[string]ServicePolicy `json:"services"`
}

func Load

func Load(path string) (Policy, error)

func Parse

func Parse(reader io.Reader) (Policy, error)

func (Policy) CheckDirectories

func (policy Policy) CheckDirectories() error

func (Policy) CheckFiles

func (policy Policy) CheckFiles() ([]CheckedService, error)

func (Policy) CheckService

func (policy Policy) CheckService(name string) (CheckedService, error)

func (Policy) Validate

func (policy Policy) Validate() error

type ServicePolicy

type ServicePolicy struct {
	Config           string `json:"config"`
	MaxArtifactBytes int64  `json:"max_artifact_bytes"`
}

Jump to

Keyboard shortcuts

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