authproxy

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: 6 Imported by: 0

Documentation

Overview

Package authproxy is a simple reverse proxy for Apple MDM clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dest string, opts ...Option) (*httputil.ReverseProxy, error)

New creates a new NanoMDM enrollment authenticating reverse proxy. This reverse proxy is mostly the standard httputil proxy. It depends on middleware HTTP handlers to enforce authentication and set the context value for the enrollment ID.

Types

type HeaderFunc

type HeaderFunc func(context.Context) string

HeaderFunc takes an HTTP request and returns a string value. Ostensibly to be set in a header on the proxy target.

type Option

type Option func(*config)

func WithForwardMDMSignature

func WithForwardMDMSignature() Option

WithForwardMDMSignature forwards the MDM-Signature header onto the proxy destination. This option is off by default because the header adds about two kilobytes to the request.

func WithHeaderFunc

func WithHeaderFunc(header string, fn HeaderFunc) Option

WithHeaderFunc configures fn to be called and added as an HTTP header to the proxy target request.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger sets a logger for error reporting.

Jump to

Keyboard shortcuts

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