hoststore

package
v2.42.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandResult

type CommandResult struct {
	Command string `json:"command"`
	Allowed bool   `json:"allowed"`
}

CommandResult command result definition.

type DBServiceOptions

type DBServiceOptions struct {
	MaxBytesUpload   int64 `json:"max_bytes_upload,omitempty"`
	MaxBytesDownload int64 `json:"max_bytes_download,omitempty"`
}

type Host

type Host struct {
	ID                      string                   `json:"id"`
	Deployable              *bool                    `json:"deployable,omitempty"`
	Tofu                    *bool                    `json:"tofu,omitempty"`
	Toch                    *bool                    `json:"toch"` // Trust on Changed Hostkey
	StandAloneHost          bool                     `json:"stand_alone_host"`
	ExternalID              string                   `json:"external_id"`
	InstanceID              string                   `json:"instance_id"`
	SSHHostPubKeys          []HostSSHPubKeys         `json:"ssh_host_public_keys"`
	HostCertificateRaw      string                   `json:"host_certificate_raw"`
	HostCertificate         *HostCertificateInfo     `json:"host_certificate,omitempty"`
	ContactAddress          string                   `json:"contact_address"`
	PasswordRotationEnabled bool                     `json:"password_rotation_enabled"`
	Services                []HostService            `json:"services"`
	Principals              []HostPrincipals         `json:"principals"`
	PasswordRotation        *RotationMetadata        `json:"password_rotation,omitempty"`
	SourceID                string                   `json:"source_id"`
	AccessGroupID           string                   `json:"access_group_id"`
	CloudProvider           string                   `json:"cloud_provider"`
	CloudProviderRegion     string                   `json:"cloud_provider_region"`
	Status                  []HostStatus             `json:"status"`
	Created                 string                   `json:"created"`
	Updated                 string                   `json:"updated" diff:"-"`
	UpdatedBy               string                   `json:"updated_by"`
	DistinguishedName       string                   `json:"distinguished_name"`
	CommonName              string                   `json:"common_name"`
	Organization            string                   `json:"organization"`
	OrganizationalUnit      string                   `json:"organizational_unit"`
	Zone                    string                   `json:"zone"`
	Scope                   []string                 `json:"scope"`
	HostType                string                   `json:"host_type"`
	HostClassification      string                   `json:"host_classification"`
	Comment                 string                   `json:"comment"`
	Addresses               []string                 `json:"addresses"`
	AuditEnabled            *bool                    `json:"audit_enabled,omitempty"`
	Tags                    []string                 `json:"tags"`
	UserMessage             string                   `json:"user_message"`
	Disabled                string                   `json:"disabled"`
	SessionRecordingOptions *SessionRecordingOptions `json:"session_recording_options,omitempty"`
	Deleted                 bool                     `json:"deleted,omitempty"`
}

Host defines PrivX target

type HostCertificateInfo

type HostCertificateInfo struct {
	Subject           string   `json:"subject,omitempty"`
	Issuer            string   `json:"issuer,omitempty"`
	Serial            string   `json:"serial,omitempty"`
	NotBefore         string   `json:"not_before,omitempty"`
	NotAfter          string   `json:"not_after,omitempty"`
	DNSNames          []string `json:"dns_names,omitempty"`
	EmailAddresses    []string `json:"email_addresses,omitempty"`
	IPAddresses       []string `json:"ip_addresses,omitempty"`
	URIs              []string `json:"uris,omitempty"`
	FingerPrintSHA1   string   `json:"fingerprint_sha1,omitempty"`
	FingerPrintSHA256 string   `json:"fingerprint_sha256,omitempty"`
}

type HostCommandRestrictions

type HostCommandRestrictions struct {
	Enabled          bool             `json:"enabled"`
	RShellVariant    string           `json:"rshell_variant,omitempty"`
	DefaultWhiteList WhiteListHandle  `json:"default_whitelist"`
	WhiteLists       []WhiteListGrant `json:"whitelists"`
	AllowNoMatch     bool             `json:"allow_no_match,omitempty"`
	AuditMatch       bool             `json:"audit_match,omitempty"`
	AuditNoMatch     bool             `json:"audit_no_match,omitempty"`
	Banner           string           `json:"banner,omitempty"`
}

type HostDeployable

type HostDeployable struct {
	Deployable bool `json:"deployable"`
}

HostDeployable host deployable request definition.

type HostDisabled

type HostDisabled struct {
	Disabled bool `json:"disabled"`
}

HostDisabled host disabled request definition.

type HostPrincipalApplications

type HostPrincipalApplications struct {
	Name             string `json:"name,omitempty"`
	Application      string `json:"application,omitempty"`
	Arguments        string `json:"arguments,omitempty"`
	WorkingDirectory string `json:"working_directory,omitempty"`
}

type HostPrincipals

type HostPrincipals struct {
	Principal              string                             `json:"principal"`
	TargetDomain           *secretsmanager.TargetDomainHandle `json:"target_domain,omitempty"`
	Passphrase             string                             `json:"passphrase"`
	Rotate                 bool                               `json:"rotate"`
	UseForPasswordRotation bool                               `json:"use_for_password_rotation"`
	UsernameAttribute      string                             `json:"username_attribute"`
	UseUserAccount         bool                               `json:"use_user_account"`
	Source                 string                             `json:"source"`
	Roles                  []HostRole                         `json:"roles"`
	Applications           []HostPrincipalApplications        `json:"applications"`
	ServiceOptions         *HostServiceOptions                `json:"service_options,omitempty"`
	CommandRestrictions    HostCommandRestrictions            `json:"command_restrictions,omitempty"`
}

type HostResolve

type HostResolve struct {
	Service string `json:"service"`
	Address string `json:"address"`
	Port    int    `json:"port"`
}

HostResolve host resolve request definition.

type HostResponse

type HostResponse struct {
	ID     string `json:"id"`
	Action string `json:"action"`
}

HostResponse host response definition.

type HostRole

type HostRole struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Deleted bool   `json:"deleted,omitempty"`
}

type HostSSHPubKeys

type HostSSHPubKeys struct {
	Key         string `json:"key"`
	FingerPrint string `json:"fingerprint"`
}

type HostSearch

type HostSearch struct {
	ID                    string   `json:"id,omitempty"`
	Keywords              string   `json:"keywords,omitempty"`
	DistinguishedName     []string `json:"distinguished_name,omitempty"`
	ExternalID            string   `json:"external_id,omitempty"`
	InstanceID            string   `json:"instance_id,omitempty"`
	SourceID              string   `json:"source_id,omitempty"`
	CommonName            []string `json:"common_name,omitempty"`
	Organization          []string `json:"organization,omitempty"`
	OrganizationalUnit    []string `json:"organizational_unit,omitempty"`
	Address               []string `json:"address,omitempty"`
	Service               []string `json:"service,omitempty"`
	Port                  []int    `json:"port,omitempty"`
	Zone                  []string `json:"zone,omitempty"`
	HostType              []string `json:"host_type,omitempty"`
	HostClassification    []string `json:"host_classification,omitempty"`
	Role                  []string `json:"role,omitempty"`
	Scope                 []string `json:"scope,omitempty"`
	IgnoreDisabledSources bool     `json:"ignore_disabled_sources,omitempty"`
	Tags                  []string `json:"tags,omitempty"`
	AccessGroupIDs        []string `json:"access_group_ids,omitempty"`
	CloudProviders        []string `json:"cloud_providers,omitempty"`
	CloudProviderRegions  []string `json:"cloud_provider_regions,omitempty"`
	Deployable            bool     `json:"deployable,omitempty"`
	Statuses              []string `json:"statuses,omitempty"`
	Disabled              string   `json:"disabled,omitempty"`
	Filter                string   `json:"filter,omitempty"`
}

HostSearch host search request definition.

type HostService

type HostService struct {
	Service                      string                           `json:"service"`
	Address                      string                           `json:"address"`
	Port                         int                              `json:"port"`
	UseForPasswordRotation       bool                             `json:"use_for_password_rotation"`
	TunnelPort                   int                              `json:"ssh_tunnel_port"`
	UsePlainTextVNC              bool                             `json:"use_plaintext_vnc"`
	Source                       string                           `json:"source"`
	Realm                        string                           `json:"realm,omitempty"`
	LoginPageURL                 string                           `json:"login_page_url"`
	UsernameFieldName            string                           `json:"username_field_name"`
	PasswordFieldName            string                           `json:"password_field_name"`
	LoginRequestUrl              string                           `json:"login_request_url"`
	LoginRequestPasswordProperty string                           `json:"login_request_password_property"`
	AuthType                     string                           `json:"auth_type"`
	HealthCheckStatus            string                           `json:"status"`
	HealthCheckStatusUpdated     string                           `json:"status_updated"`
	AllowedDomains               []string                         `json:"allowed_domains"`
	Browser                      string                           `json:"browser"`
	BrowserKioskMode             bool                             `json:"kiosk_mode"`
	BrowserUrlBar                bool                             `json:"enable_urlbar"`
	BrowserNaviBar               bool                             `json:"enable_navibar"`
	BrowserNaviBarAutoHide       bool                             `json:"autohide_navibar"`
	BrowserDevTools              bool                             `json:"enable_devtools"`
	BrowserPopups                bool                             `json:"enable_popups"`
	BrowserWebCompatibleMode     bool                             `json:"enable_web_compatibility_mode"`
	BrowserTimeZone              string                           `json:"timezone"`
	WebIdleTimeLimit             int                              `json:"idle_time_limit"`
	WebX11Backend                string                           `json:"web_x11_backend"`
	ServiceVersion               string                           `json:"service_version"`
	Created                      time.Time                        `json:"created"`
	Updated                      time.Time                        `json:"updated"`
	CertificateTemplate          string                           `json:"certificate_template"`
	AllowModifiedWebParams       bool                             `json:"allow_modified_web_params"`
	ProtocolVersion              string                           `json:"protocol_version,omitempty"`
	Latency                      int                              `json:"latency_in_microseconds,omitempty"`
	DB                           HostServiceDBParameters          `json:"db"`
	UseLegacyCipherSuites        bool                             `json:"use_legacy_cipher_suites"`
	TLSMinVersion                string                           `json:"tls_min_version"`
	TLSMaxVersion                string                           `json:"tls_max_version"`
	RDSType                      string                           `json:"rds_type"`
	RDSLoadBalancer              HostServiceRDSLoadBalancerParams `json:"rds_lb"`
	RDSBroker                    HostServiceRDSBrokerParams       `json:"rds_broker"`
}

type HostServiceDBParameters

type HostServiceDBParameters struct {
	Protocol                   string `json:"protocol"`
	TLSCertificateValidation   string `json:"tls_certificate_validation"`
	TLSCertificateTrustAnchors string `json:"tls_certificate_trust_anchors"`
	AuditSkipBytes             int64  `json:"audit_skip_bytes"`
}

type HostServiceOptions

type HostServiceOptions struct {
	SSHServiceOptions *SSHServiceOptions `json:"ssh,omitempty"`
	RDPServiceOptions *RDPServiceOptions `json:"rdp,omitempty"`
	WebServiceOptions *WebServiceOptions `json:"web,omitempty"`
	VNCServiceOptions *VNCServiceOptions `json:"vnc,omitempty"`
	DBServiceOptions  *DBServiceOptions  `json:"db,omitempty"`
}

type HostServiceRDSBrokerParams added in v2.42.0

type HostServiceRDSBrokerParams struct {
	BrokerHostname    string `json:"broker_hostname,omitempty"`
	BrokerPort        int    `json:"broker_port,omitempty"`
	CollectionName    string `json:"collection_name,omitempty"`
	SessionHostsCount uint16 `json:"session_hosts_count,omitempty"`
}

type HostServiceRDSLoadBalancerParams added in v2.42.0

type HostServiceRDSLoadBalancerParams struct {
	SessionHostsCount uint16 `json:"session_hosts_count,omitempty"`
}

type HostStatus

type HostStatus struct {
	Key   string `json:"k"`
	Value string `json:"v"`
}

type HostStore

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

HostStore is a host store client instance.

func New

func New(api restapi.Connector) *HostStore

New host store client constructor.

func (*HostStore) CreateHost

func (c *HostStore) CreateHost(host *Host) (response.Identifier, error)

CreateHost create a host.

func (*HostStore) CreateWhitelist

func (c *HostStore) CreateWhitelist(whitelist *Whitelist) (response.Identifier, error)

CreateWhitelist create whitelist.

func (*HostStore) DeleteHost

func (c *HostStore) DeleteHost(hostID string) error

DeleteHost delete host.

func (*HostStore) DeleteSessionHostCertificate added in v2.42.0

func (c *HostStore) DeleteSessionHostCertificate(hostID, certID string) error

DeleteSessionHostCertificates delete session host certificate by host id.

func (*HostStore) DeleteSessionHostCertificates added in v2.42.0

func (c *HostStore) DeleteSessionHostCertificates(hostID string) error

DeleteSessionHostCertificates delete all session host certificates by host id.

func (*HostStore) DeleteWhitelist

func (c *HostStore) DeleteWhitelist(whitelistID string) error

DeleteWhitelist delete whitelist.

func (*HostStore) DeployHost

func (c *HostStore) DeployHost(host *Host) (HostResponse, error)

DeployHost deploy host.

func (*HostStore) EvaluateWhitelist

func (c *HostStore) EvaluateWhitelist(evaluate *WhitelistEvaluate) (*WhitelistEvaluateResponse, error)

EvaluateWhitelist evaluate commands against whitelist patterns.

func (*HostStore) GetHost

func (c *HostStore) GetHost(hostID string) (*Host, error)

GetHost get host by id.

func (*HostStore) GetHostTags

func (c *HostStore) GetHostTags(opts ...filters.Option) (*response.ResultSet[string], error)

GetHostTags get host tags.

func (*HostStore) GetHosts

func (c *HostStore) GetHosts(opts ...filters.Option) (*response.ResultSet[Host], error)

GetHosts get hosts.

func (*HostStore) GetServiceOptions

func (c *HostStore) GetServiceOptions() (*HostServiceOptions, error)

MARK: Settings GetServiceOptions get default service options.

func (*HostStore) GetSessionHostCertificates added in v2.42.0

func (c *HostStore) GetSessionHostCertificates(hostID string, opts ...filters.Option) (*response.ResultSet[SessionHostCertificateResponse], error)

MARK: Session Host Certificates GetSessionHostCertificates get session host certificates by host id.

func (*HostStore) GetWhitelist

func (c *HostStore) GetWhitelist(whitelistID string) (*Whitelist, error)

GetWhitelist get whitelist by id.

func (*HostStore) GetWhitelists

func (c *HostStore) GetWhitelists(opts ...filters.Option) (*response.ResultSet[Whitelist], error)

MARK: WhiteLists GetWhitelists get whitelists.

func (*HostStore) ResolveHost

func (c *HostStore) ResolveHost(resolve HostResolve) (*Host, error)

ResolveHost resolve service to a single host.

func (*HostStore) SearchHosts

func (c *HostStore) SearchHosts(search *HostSearch, opts ...filters.Option) (*response.ResultSet[Host], error)

MARK: Hosts SearchHosts search hosts.

func (*HostStore) SearchWhitelists

func (c *HostStore) SearchWhitelists(search WhitelistSearch, opts ...filters.Option) (*response.ResultSet[Whitelist], error)

SearchWhitelists search whitelists.

func (*HostStore) Status

func (c *HostStore) Status() (*response.ServiceStatus, error)

MARK: Status Status get host store microservice status.

func (*HostStore) UpdateDeployStatus

func (c *HostStore) UpdateDeployStatus(hostID string, deployable bool) error

UpdateDeployStatus update host to be deployable or undeployable.

func (*HostStore) UpdateHost

func (c *HostStore) UpdateHost(hostID string, host *Host) error

UpdateHost update host.

func (*HostStore) UpdateHostStatus

func (c *HostStore) UpdateHostStatus(hostID string, disabled bool) error

UpdateHostStatus enable/disable host.

func (*HostStore) UpdateWhitelist

func (c *HostStore) UpdateWhitelist(whitelistID string, whitelist Whitelist) error

UpdateWhitelist update whitelist.

type Principal

type Principal struct {
	ID             string                 `json:"principal"`
	Roles          []rolestore.RoleHandle `json:"roles"`
	Source         string                 `json:"source"`
	UseUserAccount bool                   `json:"use_user_account"`
	Passphrase     string                 `json:"passphrase"`
	Applications   []string               `json:"applications"`
}

Principal of the target host

type RDPServiceOptions

type RDPServiceOptions struct {
	FileTransfer bool `json:"file_transfer"`
	Audio        bool `json:"audio"`
	Clipboard    bool `json:"clipboard"`
}

type RotationMetadata

type RotationMetadata struct {
	AccessGroupID                    string               `json:"access_group_id"`
	UseMainAccount                   bool                 `json:"use_main_account"`
	OperatingSystem                  string               `json:"operating_system"`
	WinrmAddress                     string               `json:"winrm_address"`
	WinrmPort                        int                  `json:"winrm_port,omitempty"`
	CertificateValidationOptions     string               `json:"certificate_validation_options"`
	WinRMHostCertificateTrustAnchors string               `json:"winrm_host_certificate_trust_anchors"`
	Protocol                         string               `json:"protocol"`
	RotationStatus                   []RotationStatusItem `json:"rotation_status,omitempty"`
	PasswordPolicyId                 string               `json:"password_policy_id"`
	ScriptTemplateId                 string               `json:"script_template_id"`
	Created                          *time.Time           `json:"created,omitempty"`
	Updated                          *time.Time           `json:"updated,omitempty"`
	CreatedBy                        string               `json:"created_by,omitempty"`
	UpdatedBy                        string               `json:"updated_by,omitempty"`
}

type RotationStatusItem

type RotationStatusItem struct {
	Account          string     `json:"principal"`
	LastRotated      *time.Time `json:"last_rotated,omitempty"`
	LastError        *time.Time `json:"last_error,omitempty"`
	LastErrorDetails string     `json:"last_error_details"`
}

type SSHServiceOptions

type SSHServiceOptions struct {
	Shell        bool `json:"shell"`
	FileTransfer bool `json:"file_transfer"`
	Exec         bool `json:"exec"`
	Tunnels      bool `json:"tunnels"`
	X11          bool `json:"x11"`
	Other        bool `json:"other"`
}

type SessionHostCertificateResponse added in v2.42.0

type SessionHostCertificateResponse struct {
	ID                 string               `json:"id"`
	Hostname           string               `json:"hostname"`
	HostCertificate    *HostCertificateInfo `json:"host_certificate"`
	HostCertificateRaw string               `json:"host_certificate_raw"`
}

type SessionRecordingOptions

type SessionRecordingOptions struct {
	DisableClipboardRecording    bool `json:"disable_clipboard_recording"`
	DisableFileTransferRecording bool `json:"disable_file_transfer_recording"`
}

SessionRecordingOptions optional host options to disable session recording per feature.

type VNCServiceOptions

type VNCServiceOptions struct {
	FileTransfer bool `json:"file_transfer"`
	Clipboard    bool `json:"clipboard"`
}

type WebServiceOptions

type WebServiceOptions struct {
	FileTransfer bool `json:"file_transfer"`
	Audio        bool `json:"audio"`
	Clipboard    bool `json:"clipboard"`
}

type WhiteListGrant

type WhiteListGrant struct {
	WhiteList WhiteListHandle `json:"whitelist"`
	Roles     []HostRole      `json:"roles"`
}

type WhiteListHandle

type WhiteListHandle struct {
	ID      string `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Deleted bool   `json:"deleted,omitempty"`
}

type Whitelist

type Whitelist struct {
	ID                string   `json:"id"`
	Name              string   `json:"name"`
	Comment           string   `json:"comment,omitempty"`
	Type              string   `json:"type"`
	WhiteListPatterns []string `json:"whitelist_patterns,omitempty"`
	Author            string   `json:"author"`
	Created           string   `json:"created"`
	UpdatedBy         string   `json:"updated_by,omitempty"`
	Updated           string   `json:"updated,omitempty"`
}

Whitelist whitelist definition.

type WhitelistEvaluate

type WhitelistEvaluate struct {
	WhiteList     Whitelist `json:"whitelist"`
	RShellVariant string    `json:"rshell_variant"`
	Commands      []string  `json:"commands"`
}

WhitelistEvaluate whitelist evaluate request definition.

type WhitelistEvaluateResponse

type WhitelistEvaluateResponse struct {
	WhiteListPatternResults []WhitelistPatternResult `json:"whitelist_pattern_results"`
	CommandResults          []CommandResult          `json:"command_results"`
}

WhitelistEvaluateResponse white list evaluate response definition.

type WhitelistPatternResult

type WhitelistPatternResult struct {
	WhiteListPattern string   `json:"whitelist_pattern"`
	Status           []string `json:"status"`
}

WhitelistPatternResult whitelist pattern result definition.

type WhitelistSearch

type WhitelistSearch struct {
	Keywords string `json:"keywords"`
}

WhitelistSearch whitelist search request definition.

Jump to

Keyboard shortcuts

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