freeradius

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChownR

func ChownR(path string, uid, gid int, logger *log.Entry) error

func GetDefaultConfigurationValue

func GetDefaultConfigurationValue(name string) (string, error)

Types

type Configuration

type Configuration struct {
	// Path to the FreeRadius binary
	Binary string `yaml:"binary"`
	// Launch Freeradius in debug mode (-X)
	BinaryDebug bool `yaml:"debug"`
	// Write Freeradius std{out,err} to this file
	BinaryLog string `yaml:"log_file"`
	// Make Freeradius listen on this interface
	Interface    string `yaml:"interface"`
	InterfaceNet string `yaml:"-"`
	InterfaceIP  string `yaml:"-"`
	// Make Freeradius listen on this port
	Port uint32 `yaml:"port" default:"1812"`
	// Base directory for configuration files
	RunDirectory string `yaml:"run_directory"`
	CleanOnStop  bool   `yaml:"clean_on_stop"`
	StayRoot     bool   `yaml:"stay_root"`
	// Freeradius secret
	Secret          string `yaml:"secret"`
	CA              string `yaml:"ca"`
	EnableAutoChain bool   `yaml:"enable_auto_chain"`
	NoBundle        bool   `yaml:"no_bundle"`
	Certificate     string `yaml:"certificate"`
	Key             string `yaml:"key"`
	ApiToken        string
	ApiHost         string
	ApiPort         uint32
	EnableAdmin     bool   `yaml:"enable_admin"`
	ClientNet       string `yaml:"client_net" validate:"isdefault|cidrv4"`
}

Configuration holds the parameters needed to manage a dedicated Freeradius daemon

func (*Configuration) Check

func (c *Configuration) Check() error

type Freeradius

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

func New

func New(logger *log.Entry, config *Configuration) (*Freeradius, error)

func (*Freeradius) Configure

func (f *Freeradius) Configure() error

func (*Freeradius) Start

func (f *Freeradius) Start() error

func (*Freeradius) Stop

func (f *Freeradius) Stop() error

type TemplatesConfiguration

type TemplatesConfiguration struct {
	RadiusConfDir              string
	RadiusLibDir               string
	RadiusPrivateKey           string
	RadiusCertificateBundle    string
	RadiusCertificateAuthority string
	RadiusAutoChain            string
	RadiusDHParam              string
	RadiusSecret               string
	ApiServer                  string
	ApiToken                   string
	ApiAuthorizePath           string
	ApiDynamicPath             string
	FreeradiusChangeUser       bool
	FreeRadiusUser             string
	FreeRadiusGroup            string
	ListenAddress              string
	ListenPort                 uint32
	ClientNet                  string
	PrefixDirectory            string
}

Jump to

Keyboard shortcuts

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