api

package
v0.16.89 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PostureCheckTypeOs      = "OS"
	PostureCheckTypeDomain  = "DOMAIN"
	PostureCheckTypeProcess = "PROCESS"
	PostureCheckTypeMAC     = "MAC"
)

Variables

View Source
var AuthMfaUrl, _ = url.Parse("/edge/client/v1/authenticate/mfa")
View Source
var AuthUrl, _ = url.Parse("/edge/client/v1/authenticate?method=cert")
View Source
var CurrIdentityUrl, _ = url.Parse("/edge/client/v1/current-identity")
View Source
var CurrSessUrl, _ = url.Parse("/edge/client/v1/current-api-session")
View Source
var CurrentIdentityMfaRecoveryCodesUrl, _ = url.Parse("/edge/client/v1/current-identity/mfa/recovery-codes")
View Source
var CurrentIdentityMfaUrl, _ = url.Parse("/edge/client/v1/current-identity/mfa")
View Source
var CurrentIdentityMfaVerifyUrl, _ = url.Parse("/edge/client/v1/current-identity/mfa/verify")
View Source
var NotAuthorized = notAuthorized{}
View Source
var PostureResponseBulkUrl, _ = url.Parse("/edge/client/v1/posture-response-bulk")
View Source
var PostureResponseUrl, _ = url.Parse("/edge/client/v1/posture-response")
View Source
var ServiceUpdateUrl, _ = url.Parse("/edge/client/v1/current-api-session/service-updates")
View Source
var ServicesUrl, _ = url.Parse("/edge/client/v1/services")
View Source
var SessionUrl, _ = url.Parse("/edge/client/v1/sessions")
View Source
var WellKnownCaStoreUrl, _ = url.Parse("/edge/client/v1/.well-known/est/cacerts")

Functions

func NewMFACodeBody added in v0.15.12

func NewMFACodeBody(code string) []byte

Types

type ApiEnvelope added in v0.15.12

type ApiEnvelope struct {
	Meta map[string]interface{} `json:"meta"`
	Data map[string]interface{} `json:"data"`
}

type AuthFailure

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

func (AuthFailure) Error

func (e AuthFailure) Error() string

type Client

type Client interface {
	Initialize() error
	GetIdentity() identity.Identity
	RestClient
}

func NewLazyClient added in v0.15.1

func NewLazyClient(config *config.Config, initCallback func(Client) error) Client

type Errors added in v0.15.46

type Errors struct {
	Errors []error
}

func (Errors) Error added in v0.15.46

func (e Errors) Error() string

type MFACode added in v0.15.12

type MFACode struct {
	Code string `json: "code"`
}

type MfaEnrollment added in v0.15.12

type MfaEnrollment struct {
	ProvisioningUrl string
	RecoveryCodes   []string
}

type NotAccessible

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

func (NotAccessible) Error

func (e NotAccessible) Error() string

type NotFound added in v0.13.35

type NotFound NotAccessible

func (NotFound) Error added in v0.13.35

func (e NotFound) Error() string

type PostureResponse added in v0.14.5

type PostureResponse struct {
	Id             string `json:"id"`
	TypeId         string `json:"typeId"`
	PostureSubType `json:"-"`
}

func (PostureResponse) MarshalJSON added in v0.14.5

func (response PostureResponse) MarshalJSON() ([]byte, error)

type PostureResponseDomain added in v0.14.5

type PostureResponseDomain struct {
	Domain string `json:"domain"`
}

func (PostureResponseDomain) IsPostureSubType added in v0.14.5

func (p PostureResponseDomain) IsPostureSubType()

type PostureResponseMac added in v0.14.5

type PostureResponseMac struct {
	MacAddresses []string `json:"macAddresses"`
}

func (PostureResponseMac) IsPostureSubType added in v0.14.5

func (p PostureResponseMac) IsPostureSubType()

type PostureResponseOs added in v0.14.5

type PostureResponseOs struct {
	Type    string `json:"type"`
	Version string `json:"version"`
	Build   string `json:"build"`
}

func (PostureResponseOs) IsPostureSubType added in v0.14.5

func (p PostureResponseOs) IsPostureSubType()

type PostureResponseProcess added in v0.14.5

type PostureResponseProcess struct {
	IsRunning          bool     `json:"isRunning"`
	Hash               string   `json:"hash"`
	SignerFingerprints []string `json:"signerFingerprints"`
}

func (PostureResponseProcess) IsPostureSubType added in v0.14.5

func (p PostureResponseProcess) IsPostureSubType()

type PostureSubType added in v0.14.5

type PostureSubType interface {
	IsPostureSubType()
}

type RestClient added in v0.15.5

type RestClient interface {
	GetCurrentApiSession() *edge.ApiSession
	GetCurrentIdentity() (*edge.CurrentIdentity, error)
	Login(info map[string]interface{}) (*edge.ApiSession, error)
	Refresh() (*time.Time, error)
	GetServices() ([]*edge.Service, error)
	GetServiceTerminators(service *edge.Service, offset, limit int) ([]*edge.Terminator, int, error)
	IsServiceListUpdateAvailable() (bool, error)
	CreateSession(svcId string, kind edge.SessionType) (*edge.Session, error)
	RefreshSession(id string) (*edge.Session, error)
	SendPostureResponse(response PostureResponse) error
	SendPostureResponseBulk(responses []*PostureResponse) error

	AuthenticateMFA(code string) error
	VerifyMfa(code string) error
	EnrollMfa() (*MfaEnrollment, error)
	RemoveMfa(code string) error
	GenerateNewMfaRecoveryCodes(code string) error
	GetMfaRecoveryCodes(code string) ([]string, error)
	Shutdown()
}

func NewClient

func NewClient(ctrl *url.URL, tlsCfg *tls.Config, configTypes []string) (RestClient, error)

type ServiceNotAccessible added in v0.15.125

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

func (ServiceNotAccessible) Error added in v0.15.125

func (e ServiceNotAccessible) Error() string

Jump to

Keyboard shortcuts

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