Documentation
¶
Index ¶
- Constants
- type Address
- type DBService
- type DefaultServiceOptions
- type Host
- type HostDisabledRequest
- type HostSearchObject
- type HostServiceDBCertificateValidation
- type HostServiceDBParameters
- type HostServiceDBProtocol
- type HostStore
- func (store *HostStore) CreateHost(host Host) (string, error)
- func (store *HostStore) DeleteHost(hostID string) error
- func (store *HostStore) Host(hostID string) (*Host, error)
- func (store *HostStore) HostTags(offset, limit int, sortdir, query string) ([]string, error)
- func (store *HostStore) Hosts(offset, limit int, sortkey, sortdir, filter string) ([]Host, error)
- func (store *HostStore) ResolveHost(service Service) (*Host, error)
- func (store *HostStore) SearchHost(sortkey, sortdir, filter string, offset, limit int, ...) ([]Host, error)
- func (store *HostStore) ServiceOptions() (*DefaultServiceOptions, error)
- func (store *HostStore) UpdateDeployStatus(hostID string, status bool) error
- func (store *HostStore) UpdateDisabledHostStatus(hostID string, status bool) error
- func (store *HostStore) UpdateHost(hostID string, host *Host) error
- type Params
- type Principal
- type RDPService
- type SSHPublicKey
- type SSHService
- type Scheme
- type Service
- type SessionRecordingOptions
- type Source
- type Status
- type VNCService
- type WebService
Constants ¶
const ( UI = Source("UI") SCAN = Source("SCAN") )
Source constants
const ( SSH = Scheme("SSH") RDP = Scheme("RDP") VNC = Scheme("VNC") WEB = Scheme("WEB") DB = Scheme("DB") )
Scheme constants, all supported protocols
const ( DBProtocolPostgres = HostServiceDBProtocol("postgres") DBProtocolMySQL = HostServiceDBProtocol("mysql") DBProtocolPassthrough = HostServiceDBProtocol("passthrough") DBProtocolTLS = HostServiceDBProtocol("tls") )
DB protocols constants, all supported protocols
const ( DBCertificateValidationEnabled = HostServiceDBCertificateValidation("ENABLED") DBCertificateValidationDisabled = HostServiceDBCertificateValidation("DISABLED") )
DBCertificateValidation Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address string
Address is fully qualified domain names, IPv4 or IPv6 addresses of the host
type DefaultServiceOptions ¶ added in v0.6.0
type DefaultServiceOptions struct {
SSH SSHService `json:"ssh"`
RDP RDPService `json:"rdp"`
Web WebService `json:"web"`
VNC VNCService `json:"vnc"`
DB DBService `json:"db"`
}
DefaultServiceOptions default service options
type Host ¶
type Host struct {
ID string `json:"id,omitempty"`
AccessGroupID string `json:"access_group_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
SourceID string `json:"source_id,omitempty"`
Name string `json:"common_name,omitempty"`
ContactAdress string `json:"contact_address,omitempty"`
CloudProvider string `json:"cloud_provider,omitempty"`
CloudProviderRegion string `json:"cloud_provider_region,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
DistinguishedName string `json:"distinguished_name,omitempty"`
Organization string `json:"organization,omitempty"`
OrganizationUnit string `json:"organizational_unit,omitempty"`
Zone string `json:"zone,omitempty"`
HostType string `json:"host_type,omitempty"`
HostClassification string `json:"host_classification,omitempty"`
Comment string `json:"comment,omitempty"`
Disabled string `json:"disabled,omitempty"`
Deployable bool `json:"deployable,omitempty"`
Tofu bool `json:"tofu,omitempty"`
StandAlone bool `json:"stand_alone_host,omitempty"`
Audit bool `json:"audit_enabled,omitempty"`
Scope []string `json:"scope,omitempty"`
Tags []string `json:"tags,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
Services []Service `json:"services,omitempty"`
Principals []Principal `json:"principals,omitempty"`
PublicKeys []SSHPublicKey `json:"ssh_host_public_keys,omitempty"`
Status []Status `json:"status,omitempty"`
SessionRecordingOptions *SessionRecordingOptions `json:"session_recording_options,omitempty"`
}
Host defines PrivX target
type HostDisabledRequest ¶ added in v0.6.0
type HostDisabledRequest struct {
Disabled bool `json:"disabled"`
}
HostDisabledRequest host disabled request definition
type HostSearchObject ¶ added in v0.6.0
type HostSearchObject struct {
ID string `json:"id,omitempty"`
Keywords string `json:"keywords,omitempty"`
ExternalID string `json:"external_id,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
SourceID string `json:"source_id,omitempty"`
Disabled string `json:"disabled,omitempty"`
Deployable bool `json:"deployable,omitempty"`
IgnoreDisabledSources bool `json:"ignore_disabled_sources,omitempty"`
Port []int `json:"port,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"`
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"`
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"`
Statuses []string `json:"statuses,omitempty"`
DistinguishedName []string `json:"distinguished_name,omitempty"`
}
HostSearchObject host search object definition
type HostServiceDBCertificateValidation ¶ added in v1.30.0
type HostServiceDBCertificateValidation string
DBCertificateValidation of HostServiceDBParameters objects
type HostServiceDBParameters ¶ added in v1.30.0
type HostServiceDBParameters struct {
Protocol HostServiceDBProtocol `json:"protocol"`
TLSCertificateValidation HostServiceDBCertificateValidation `json:"tls_certificate_validation"`
TLSCertificateTrustAnchors string `json:"tls_certificate_trust_anchors"`
AuditSkipBytes int64 `json:"audit_skip_bytes"`
}
type HostServiceDBProtocol ¶ added in v1.30.0
type HostServiceDBProtocol string
DB protocols allowed by the host
type HostStore ¶
type HostStore struct {
// contains filtered or unexported fields
}
HostStore is a role-store client instance.
func New ¶
New creates a new host-store client instance See http://apispecs.ssh.com/#swagger-ui-4 for details about api
func (*HostStore) CreateHost ¶ added in v0.6.0
CreateHost create a host to host store
func (*HostStore) DeleteHost ¶ added in v0.6.0
DeleteHost delete a host
func (*HostStore) ResolveHost ¶ added in v0.6.0
ResolveHost resolve service and address to a single host in host store
func (*HostStore) SearchHost ¶ added in v0.6.0
func (store *HostStore) SearchHost(sortkey, sortdir, filter string, offset, limit int, searchObject *HostSearchObject) ([]Host, error)
SearchHost search for existing hosts
func (*HostStore) ServiceOptions ¶ added in v0.6.0
func (store *HostStore) ServiceOptions() (*DefaultServiceOptions, error)
ServiceOptions returns default serivce options
func (*HostStore) UpdateDeployStatus ¶ added in v0.6.0
UpdateDeployStatus update host to be deployable or undeployable
func (*HostStore) UpdateDisabledHostStatus ¶ added in v0.6.0
UpdateDisabledHostStatus enable/disable host
type Params ¶ added in v0.6.0
type Params struct {
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
Sortdir string `json:"sortdir,omitempty"`
Sortkey string `json:"sortkey,omitempty"`
Filter string `json:"filter,omitempty"`
Query string `json:"query,omitempty"`
}
Params struct for pagination queries
type Principal ¶
type Principal struct {
ID string `json:"principal"`
Roles []rolestore.RoleRef `json:"roles"`
Source Source `json:"source"`
UseUserAccount bool `json:"use_user_account"`
Passphrase string `json:"passphrase"`
Applications []string `json:"applications"`
}
Principal of the target host
type RDPService ¶ added in v0.6.0
type RDPService struct {
FileTransfer bool `json:"file_transfer"`
Audio bool `json:"audio"`
Clipboard bool `json:"clipboard"`
}
RDPService default options
type SSHPublicKey ¶ added in v0.6.0
type SSHPublicKey struct {
Key string `json:"key,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
}
SSHPublicKey host public keys
type SSHService ¶ added in v0.6.0
type SSHService struct {
Shell bool `json:"shell"`
FileTransfer bool `json:"file_transfer"`
Exec bool `json:"exec"`
Tunnels bool `json:"tunnels"`
Xeleven bool `json:"x11"`
Other bool `json:"other"`
}
SSHService default options
type Service ¶
type Service struct {
Scheme Scheme `json:"service"`
Address Address `json:"address"`
Port int `json:"port"`
DB HostServiceDBParameters `json:"db"`
Source Source `json:"source"`
}
Service specify the service available on target host
type SessionRecordingOptions ¶ added in v1.32.0
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 VNCService ¶ added in v1.30.0
type WebService ¶ added in v0.6.0
type WebService struct {
FileTransfer bool `json:"file_transfer"`
Audio bool `json:"audio"`
Clipboard bool `json:"clipboard"`
}
WebService default options