threatx

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoGenerated

type AutoGenerated struct {
	Ok ThreatXSite `json:"Ok"`
}

type ThreatXGetRequest

type ThreatXGetRequest struct {
	Command      string `json:"command"`
	Token        string `json:"token"`
	CustomerName string `json:"customer_name"`
	Name         string `json:"name"`
}

type ThreatXSite

type ThreatXSite struct {
	Hash                      int64           `json:"hash,omitempty"`
	Hostname                  string          `json:"hostname,omitempty"`
	Backend                   [][]interface{} `json:"backend,omitempty"`
	IsEnabled                 bool            `json:"isEnabled,omitempty"`
	RequestBlocking           bool            `json:"request_blocking,omitempty"`
	RiskBasedBlocking         bool            `json:"risk_based_blocking,omitempty"`
	ManualActionBlocking      bool            `json:"manual_action_blocking,omitempty"`
	StaticCachingEnabled      bool            `json:"static_caching_enabled,omitempty"`
	DynamicCachingEnabled     bool            `json:"dynamic_caching_enabled,omitempty"`
	SslEnabled                bool            `json:"ssl_enabled,omitempty"`
	SslBlob                   string          `json:"ssl_blob,omitempty"`
	SslExpTime                interface{}     `json:"ssl_exp_time,omitempty"`
	SslTerminateOnly          bool            `json:"ssl_terminate_only,omitempty"`
	OverrideResolve           interface{}     `json:"override_resolve,omitempty"`
	SslProtocols              interface{}     `json:"ssl_protocols,omitempty"`
	SslCiphers                interface{}     `json:"ssl_ciphers,omitempty"`
	SslRedirect               bool            `json:"ssl_redirect,omitempty"`
	AdvancedCaching           interface{}     `json:"advanced_caching,omitempty"`
	TimeCreated               int             `json:"time_created,omitempty"`
	CustomHTTPPort            int             `json:"custom_http_port,omitempty"`
	CustomHTTPSPort           int             `json:"custom_https_port,omitempty"`
	HTTP2Enabled              bool            `json:"http2_enabled,omitempty"`
	CustomResponseHeaders     interface{}     `json:"custom_response_headers,omitempty"`
	SetRealIPFrom             interface{}     `json:"set_real_ip_from,omitempty"`
	ClientMaxBodySize         interface{}     `json:"client_max_body_size,omitempty"`
	ProxyReadTimeout          interface{}     `json:"proxy_read_timeout,omitempty"`
	ProxySendTimeout          interface{}     `json:"proxy_send_timeout,omitempty"`
	WildcardSubdomainsEnabled bool            `json:"wildcard_subdomains_enabled,omitempty"`
}

type ThreatXStore

type ThreatXStore struct {
	SecretName      string
	SecretNamespace string
	APIToken        string `json:"api_token"`
	CustomerName    string `json:"customer_name"`
	AuthToken       string `json:"auth_token"`
	Hostname        string `json:"hostname"`
}

func (*ThreatXStore) GetAPIKey

func (s *ThreatXStore) GetAPIKey(ctx context.Context) error

func (*ThreatXStore) GetSite

func (s *ThreatXStore) GetSite(ctx context.Context) (ThreatXSite, error)

Get retrieves a single ThreatX site from the API

func (*ThreatXStore) ParseCertificate

func (s *ThreatXStore) ParseCertificate(c *tlssecret.Certificate) error

func (*ThreatXStore) ThreatxLogin

func (s *ThreatXStore) ThreatxLogin(ctx context.Context) error

ThreatxLogin retrieves the api token from k8s secret and then generates a short-term token against ThreatX API

func (*ThreatXStore) Update

func (s *ThreatXStore) Update(secret *corev1.Secret) error

func (*ThreatXStore) UpdateSite

func (s *ThreatXStore) UpdateSite(ctx context.Context, tx ThreatXSite) error

Update updates a single ThreatX site

Jump to

Keyboard shortcuts

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