cziti

package
v0.0.0-...-adf3037 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDnsRequests   = 64
	DnsMsgBufferSize = 1024
)

Variables

View Source
var BulkServiceChanges = make(chan BulkServiceChange, 32)

Functions

func AddIntercept

func AddIntercept(addWaitGroup *TunnelerActionWaitGroup)

func AuthMFA

func AuthMFA(id *ZIdentity, code string) error

used when an identity is partially authenticated and waiting on 2fa, i.e. for authentication and for timeouts

func DnsInit

func DnsInit(ip string, maskBits int)

func EnableMFA

func EnableMFA(id *ZIdentity)

func EndpointStateChanged

func EndpointStateChanged(id *ZIdentity, woken bool, unlocked bool)

func GenerateMfaCodes

func GenerateMfaCodes(id *ZIdentity, code string) ([]string, error)

func HookupTun

func HookupTun(dev tun.Device) error

func InitTunnelerDns

func InitTunnelerDns(ipBase uint32, mask int)

func LoadZiti

func LoadZiti(zid *ZIdentity, cfg string, refreshInterval int, apiPageSize int)

func RemoveIntercept

func RemoveIntercept(removeWaitGroup *TunnelerActionWaitGroup)

func RemoveMFA

func RemoveMFA(id *ZIdentity, code string)

func ReturnMfaCodes

func ReturnMfaCodes(id *ZIdentity, code string) ([]string, error)

func RunDNSserver

func RunDNSserver(dnsBind []net.IP, ready chan bool)

func SetInterfaceMetric

func SetInterfaceMetric(interfaceName string, metric int)

func SetLogLevel

func SetLogLevel(level int)

func Start

func Start(a api.DesktopEdgeIface, ip string, maskBits int, loglevel int)

func VerifyMFA

func VerifyMFA(id *ZIdentity, code string) error

requires that the identity already be fully authenticated and used specifically for enrollment

func ZitiDump

func ZitiDump(zid *ZIdentity, path string)

func ZitiDumpOnShutdown

func ZitiDumpOnShutdown(zid *ZIdentity)

Types

type BulkServiceChange

type BulkServiceChange struct {
	Fingerprint        string
	HostnamesToAdd     map[string]bool
	HostnamesToRemove  map[string]bool
	ServicesToRemove   []*dto.Service
	ServicesToAdd      []*dto.Service
	MfaMinTimeout      int32
	MfaMaxTimeout      int32
	MfaMinTimeoutRem   int32
	MfaMaxTimeoutRem   int32
	MfaLastUpdatedTime time.Time
	ServiceUpdatedTime time.Time
}

type DnsManager

type DnsManager interface {
	Resolve(dnsName string) net.IP
	ApplyDNS(dnsNameToReg string, ip string)
}
var DNSMgr DnsManager = dnsMgrPrivate

type NotificationMessage

type NotificationMessage struct {
	IdentityName      string
	Fingerprint       string
	Message           string
	MfaMinimumTimeout int32
	MfaMaximumTimeout int32
	MfaTimeDuration   int
	Severity          string
}

type RefreshRequiredCheck

type RefreshRequiredCheck func(int32, int32) bool

type ServiceChange

type ServiceChange struct {
	Operation   string
	Service     *ZService
	ZitiContext *ZIdentity
}

type Tunnel

type Tunnel interface {
	AddIntercept(svcId string, service string, hostname string, port int, ctx unsafe.Pointer)
}

type TunnelNotificationEvent

type TunnelNotificationEvent struct {
	Op           string
	Notification []NotificationMessage
}

type TunnelerActionWaitGroup

type TunnelerActionWaitGroup struct {
	Wg    *sync.WaitGroup
	Czsvc *ZService
}

type ZIdentity

type ZIdentity struct {
	Options *C.ziti_options

	Loaded             bool
	Name               string
	Version            string
	Services           sync.Map
	Fingerprint        string
	Active             bool
	StatusChanges      func(int)
	MfaNeeded          bool
	MfaEnabled         bool
	MfaMinTimeout      int32
	MfaMaxTimeout      int32
	MfaMinTimeoutRem   int32
	MfaMaxTimeoutRem   int32
	MfaLastUpdatedTime time.Time
	ServiceUpdatedTime time.Time
	// contains filtered or unexported fields
}

func NewZid

func NewZid(statusChange func(int)) *ZIdentity

func (*ZIdentity) AsKey

func (zid *ZIdentity) AsKey() string

func (*ZIdentity) Controller

func (zid *ZIdentity) Controller() string

func (*ZIdentity) GetMFAState

func (zid *ZIdentity) GetMFAState(interval int32) int

func (*ZIdentity) GetMetrics

func (zid *ZIdentity) GetMetrics() (int64, int64, bool)

func (*ZIdentity) GetRemainingTime

func (zid *ZIdentity) GetRemainingTime(timeout int32, timeoutRemaining int32) int32

func (*ZIdentity) MfaRefreshNeeded

func (zid *ZIdentity) MfaRefreshNeeded() bool

func (*ZIdentity) Shutdown

func (zid *ZIdentity) Shutdown()

func (*ZIdentity) Status

func (zid *ZIdentity) Status() (int, error)

func (*ZIdentity) UnsafePointer

func (zid *ZIdentity) UnsafePointer() unsafe.Pointer

func (*ZIdentity) UpdateMFATime

func (zid *ZIdentity) UpdateMFATime()

func (*ZIdentity) UpdateMFATimeRem

func (zid *ZIdentity) UpdateMFATimeRem()

type ZService

type ZService struct {
	Name    string
	Id      string
	Service *dto.Service
	Czsvc   *C.ziti_service
	Czctx   C.ziti_context
}

Jump to

Keyboard shortcuts

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