certauth

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package certauth

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCertReuse = errors.New("cert re-use not permitted")
	ErrNoCertAssoc = errors.New("enrollment not associated with cert")
	ErrMissingCert = errors.New("missing MDM certificate")
)

Functions

func HashCert added in v0.6.0

func HashCert(cert *x509.Certificate) string

HashCert returns the string representation

Types

type CertAuth

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

func New

New creates a new certificate authorization middleware service. It will forward requests to next or return errors for failing authentication.

func (*CertAuth) Authenticate

func (s *CertAuth) Authenticate(r *mdm.Request, m *mdm.Authenticate) error

func (*CertAuth) CheckOut

func (s *CertAuth) CheckOut(r *mdm.Request, m *mdm.CheckOut) error

func (*CertAuth) CommandAndReportResults

func (s *CertAuth) CommandAndReportResults(r *mdm.Request, results *mdm.CommandResults) (*mdm.Command, error)

func (*CertAuth) DeclarativeManagement added in v0.3.0

func (s *CertAuth) DeclarativeManagement(r *mdm.Request, m *mdm.DeclarativeManagement) ([]byte, error)

func (*CertAuth) GetBootstrapToken

func (s *CertAuth) GetBootstrapToken(r *mdm.Request, m *mdm.GetBootstrapToken) (*mdm.BootstrapToken, error)

func (*CertAuth) SetBootstrapToken

func (s *CertAuth) SetBootstrapToken(r *mdm.Request, m *mdm.SetBootstrapToken) error

func (*CertAuth) TokenUpdate

func (s *CertAuth) TokenUpdate(r *mdm.Request, m *mdm.TokenUpdate) error

func (*CertAuth) UserAuthenticate

func (s *CertAuth) UserAuthenticate(r *mdm.Request, m *mdm.UserAuthenticate) ([]byte, error)

type Option

type Option func(*CertAuth)

func WithAllowRetroactive

func WithAllowRetroactive() Option

func WithLogger

func WithLogger(logger log.Logger) Option

Jump to

Keyboard shortcuts

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