server

package
v0.0.0-...-b0d25e1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logging.GetLogger("server").WithField("pkg", "server")

Functions

func RecoverHandler

func RecoverHandler(lf logrus.Fields) echo.MiddlewareFunc

Simplified version of the echo's recover handler with support for logrus logging

func RequestLogger

func RequestLogger(lf logrus.Fields) echo.MiddlewareFunc

Types

type AuthBackend

type AuthBackend struct {
	Type    string
	Config  string
	Default bool
}

type CertificateConfig

type CertificateConfig struct {
	Certificates   []tls.Certificate
	CertificateMap map[string]*tls.Certificate
}

type Config

type Config struct {
	Listen                    string
	TLSCertFile               string        `yaml:"TLSCertFile"`
	TLSKeyFile                string        `yaml:"TLSKeyFile"`
	TLSCertFiles              []string      `yaml:"TLSCertFiles"`
	TLSKeyFiles               []string      `yaml:"TLSKeyFiles"`
	TLSCertNames              []string      `yaml:"TLSCertNames"`
	AuthBackends              []AuthBackend `yaml:"authBackends"`
	DefaultAuthBackends       []string      `yaml:"defaultAuthBackends"`
	MaxCertLifetime           string        `yaml:"maxCertLifetime"`
	DefaultCertLifetime       string        `yaml:"defaultCertLifetime"`
	CaChallengeLifetime       string        `yaml:"caChallengeLifetime"`
	AgentSocket               string        `yaml:"agentSocket"`
	PKCS11Provider            string        `yaml:"pkcs11Provider"`
	PKCS11Pin                 string        `yaml:"pkcs11Pin"`
	CertSigningKeyFingerprint string        `yaml:"certSigningKeyFingerprint"`
	TokenSigningKey           string        `yaml:"tokenSigningKey"`
}
var Defaults *Config = &Config{
	Listen:       ":8540",
	TLSCertFile:  "",
	TLSKeyFile:   "",
	TLSCertFiles: []string{},
	TLSKeyFiles:  []string{},
	AuthBackends: []AuthBackend{
		AuthBackend{
			Type:    "authfile",
			Config:  "authfile",
			Default: false,
		},
	},
	DefaultAuthBackends:       []string{},
	MaxCertLifetime:           "24h",
	DefaultCertLifetime:       "1h",
	CaChallengeLifetime:       "5m",
	AgentSocket:               path.Join(globals.VarDir(), "ssh_inscribe_agent.sock"),
	PKCS11Provider:            "",
	PKCS11Pin:                 "",
	CertSigningKeyFingerprint: "",
	TokenSigningKey:           "",
}

func (Config) GetCertificateMap

func (c Config) GetCertificateMap() (cc CertificateConfig, err error)

type Server

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

func Build

func Build() (*Server, error)

func (*Server) Start

func (s *Server) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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